Project-system: SkipCompilerExecution and ProvideCommandLineArgs should be set before calling the CompileDesignTime target

Created on 8 Mar 2017  路  8Comments  路  Source: dotnet/project-system

_From @AArnott on March 7, 2017 22:55_

Version Used:

VS 2017 RTW (dev15rtwsvc 26228.04)

Steps to Reproduce:

git clone https://github.com/aarnott/pinvoke
cd pinvoke
git checkout c5642c29ddd
src\pinvoke.sln

Expected Behavior:

No errors in error list

Actual Behavior:

3 errors in error list:

SkipCompilerExecution and ProvideCommandLineArgs should be set before calling the CompileDesignTime target
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\Managed\Microsoft.Managed.DesignTime.targets:243

image

_Copied from original issue: dotnet/roslyn#17613_

Bug

Most helpful comment

@AArnott Basically this occurs when CPS thinks it's out of sync with what's on disk (say you did a NuGet restore via disk and it overwrote props) and it does a design-time build at the same time as another project that has a P2P to it. MSBuild is incorrectly reusing a project instance from a cache, resulting in these properties not being set. MSBuild has a fix on their side, we're trying to figure out what release we'll put this in.

All 8 comments

_From @AArnott on March 7, 2017 22:55_

This doesn't always repro. But it's one of many issues I've run into when converting the PInvoke.sln to the new .NET SDK project type.

I've also seen this sporadically when opening the SDK repo https://github.com/dotnet/sdk

@AArnott Basically this occurs when CPS thinks it's out of sync with what's on disk (say you did a NuGet restore via disk and it overwrote props) and it does a design-time build at the same time as another project that has a P2P to it. MSBuild is incorrectly reusing a project instance from a cache, resulting in these properties not being set. MSBuild has a fix on their side, we're trying to figure out what release we'll put this in.

Thanks, @davkean.

any work around for this ?

I hit this approximately every other time I open Roslyn.sln, resulting in an amortized doubling of the time it takes to open that solution.

MSBuild fixed one instance of this, however, we're still running into it for other cases. We're tracking the new issue via https://github.com/Microsoft/msbuild/issues/2123.

Was this page helpful?
0 / 5 - 0 ratings