Comments (6)
It appears that this change was made, but I don't see any indication of this in the release notes, and there aren't any commits linked here.
Is the "Proposed change in behavior" the actual VS2015 RTM behavior?
from msbuild.
Yes this is the behavior for RTM. We did this to make builds more deterministic across machines and to make servicing assemblies that might be in the GAC and referenced from NuGet more predictable. Hopefully it's an overall positive change.
It can be disabled and the behavior reverted by adding a property "DoNotCopyLocalIfInGac" to your project (or props file). We'll work on getting this documented on MSDN for the Resolve Assembly Reference task.
And now that VS2015 has shipped I'll be working on getting that fix (and others since the last snap) out to GitHub. Our intention is to make GitHub our primary source control location, but as you can see that hasn't happened quite yet.
from msbuild.
Thanks for the confirmation.
I only discovered the DoNotCopyLocalIfInGac
by diffing the 12.0 to 14.0 targets files. This is a pretty significant change and I'm surprised there was no advance warning.
I would consider this a regression / breaking change for anyone who XCopy deploys from the build folder (which we do). Unless you get lucky and inspect the contents of your output folder, you may not realize that the size of the deployment package can increase a lot, and worse, the versions of assemblies bound at runtime on end-user machines can change.
from msbuild.
Andy, I understand the change but I think there are still some problems. Consider I have a reference like this in Project A:
<Reference Include="System.Web.Mvc">
<HintPath>..\References\System\System.Web.Mvc.dll</HintPath>
<Private>False</Private>
</Reference>
Note that there is a Private property explicitly set to false. However when I reference Project A in a web application named Project B (web-forms), System.Web.Mvc.dll and some related DLLs are unexpectedly copied to the bin folder.
Yes, I can fix it by adding this in Project B:
<PropertyGroup>
<!-- Fix the default copy local behaviour changed in VS 2015 -->
<DoNotCopyLocalIfInGac>true</DoNotCopyLocalIfInGac>
</PropertyGroup>
But I think I should not require this as I already have an explicit Private property. I guess there is a bug with this new behavior when using project-to-project references.
from msbuild.
We have recently moved to VS2017 and we are seing very bad build times, 2 to 3 times slower.
And maybe we are facing the issue above.
The problem is that for our overnight builds we are using nmake to build project with makefiles we generate.
Is there a way to use the option DoNotCopyLocalIfInGac in a makefile our as an option to nmake?
from msbuild.
@AndyGerlicher I was surprised to discover that there is no documentation on the DoNotCopyLocalIfInGac property on MSDN. The closest I could find was the answer to this question on StackOverflow
https://stackoverflow.com/questions/32647713/vs-2015-copies-to-output-gac-references-of-a-project-reference-regardless-of-cop
This ended up working for me because I have a project that was recently upgraded from VS2013 to VS2019. I would be more comfortable with some "official" doc that outlines how the property needs to be used rather than relying on here-say elsewhere on the internet.
from msbuild.
Related Issues (20)
- [Feature Request]: Expand BuildCheck editorconfig allowable syntax HOT 2
- [Bug]: VS and MSBuild/dotnet build produce behave differently with Build Dependencies
- SharedOutputPathAnalyzer false negative case
- [Bug]: MSBuild automatically escapes all my strings for me with seemingly no way to have it not do that? HOT 2
- Add help hyperlinks to reported results
- [Bug]: Error MSB4166 shows in about 1% of our builds in the same machine HOT 1
- Serialize build cancellation event to the binlog HOT 1
- Remove code repetition in EventSourceSink.cs
- [Bug]: When Publishing with .sln, MSBuild doesn't use `BaseOutputPath` HOT 1
- Release 17.11
- [Kitten] Fix binskim warnings in msbuild pipeline HOT 3
- [Bug]: Running a specific target which depends on ResolveReferences fails when TargetFrameworks is specified HOT 4
- Visual Studio 2022 17.10 fails to load csproj - error : The "Target" name is reserved, and cannot be used HOT 3
- Is the double-checked locking pattern in BuildManager correct?
- [Bug]: Parsing `-property:Configuration` with Command-line comments HOT 5
- [BuildCkeck] No warning or error message visible when replaying binlog of an analyzed build
- [Feature Request]: Support building the new Visual Studio solution file format (.slnx) HOT 7
- [Bug]: HOT 2
- [Bug]: CustomAnalyzerTest test fails in the CI pipeline HOT 2
- Retarget to .NET 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msbuild.