It so often happens that I start by creating some solution on the command line using msbuild, run it for a while, but then find that I need to change it and debug it. So, I open it in Visual Studio and eventually create it inside Visual Studio.
What happens is that VS restores many parts of the solution, even when I am not changing anything!
Falling into it, you will see the following:
Creating inside Visual Studio generates empty cs files and inserts them into a group of Compile elements. . Naturally, they are newer than already created binaries, and therefore devenv.exe restores a lot of projects. Thanks to TemporaryGeneratedFile_ [guid] in / obj / debug break build
This is a real bummer. I disabled this behavior by renaming the Microsoft.WorkflowBuildExtensions.targets file - I am not running a workflow.
Suppose I could hack CoreCompileDependsOn and somehow neutralize the target of Microsoft.WorkflowBuildExtensions.targets GenerateCompiledExpressionsTempFile , but this needs to be done in 190 projects! This is a major change.
devenv.exe seems to take care that some files are always copied to the output directory , even if msbuild does not consider this to be a problem.
Indeed, here is a line from the devenv.exe build log:
Project 'HRCore.Tests' is not up to date. Project item 'C:\abc\UI\HRCore.Tests\HRImport\Import_missing_state_county.xml' has 'Copy to Output Directory' attribute set to 'Copy always'.
So what? msbuild does not care about this, but devenv does. These files are not dependent on HRCore.Tests , and msbuild is correct.
In the meantime, I changed it from Always to PreserveNewest .
In any case, I am interested to know how I can eliminate these differences.
For example, is it worth setting BuildingInsideVisualStudio to true even when creating with msbuild?
Any ideas?
PS
We create .NET and Silverlight. Console applications, dll and web applications.