Comments (3)
Since Directory.Packages.props
is imported by MSBuild, it gets added to the MSBuildAllProjects
property. If any MSBuild import is newer than the output of a project then it will rebuilt due to this declaration. Unfortunately, this is by design at the moment. A user could place any MSBuild logic in Directory.Packages.props
that actually affects the compilation such as adding a new target that needs to run.
For example, I add this to my Directory.Packages.props
:
<Target Name="MyCustomTarget" BeforeTargets="CoreCompile">
<Message Text="Example" />
</Target>
If the CoreCompile target didn't consider $(MSBuildAllProjects)
as an input, my projects won't re-run compilation and I would be scratching my head. Obviously, sometimes its desirable to trigger a rebuild and sometimes it isn't. But editing an MSBuild import currently always triggers a rebuild.
from home.
@jeffkl Can you help me triage this issue? I'm not sure if this is something we already have planned
from home.
The rationale and the mechanism of it is totally clear to me. However, it may not be clear to all who read the CPM documentation and do not realize this regression in the behavior of a common scenario - a NuGet version is changed for a package. Before CPM only the touched project and its dependents are recompiled. When using CPM it is the entire solution. For big solutions containing unit test projects (which usually do not carry a lot of dependents) this is a big deal, as any change in the versions of the packages consumed by the unit tests, will now recompile all the business logic.
The CPM documentation should indicate that and provide workarounds, e.g. structuring the solution in a way that consolidates all the unit tests under a single folder and allows for a hierarchy of Directory.Packages.props
files.
But not everything can be resolved with restructuring, so the side effect of recompiling it all is there all the time.
At least this should be emphasized.
from home.
Related Issues (20)
- Drive insertion of new dependency graph resolution algorithm
- Add property for toggling the to the previous NuGet resolver: RestoreUseLegacyDependencyResolver HOT 1
- Document: RestoreUseLegacyDependencyResolver
- dotnet list package should warn when restore is not current
- Latest NuGet Version not displaying correctly in Visual Studio Code HOT 1
- Vulnerabilities filter is not showing vulnerable packages in Solution PM UI HOT 1
- NuGet Search box in VS Win is teeny tiny on higher resolution devices
- dotnet restore should report security vulnerabilities for shared assembly projects.
- update dotnet nuget why docs for optional path argument
- The "RestoreTask" task returned false but did not log an error HOT 2
- Nuget: Central Directory corrupt HOT 3
- LockFileUtils.CreateLockFileTargetProject allocates a lot
- [Bug Bash] The package versions are inconsistent in the “Project” node and the “Packages” node of the Solution Explorer window after updating the parent project package HOT 1
- [Build][Source-Build] Multiple code style rule violations prevent successfull build of this repo and dotnet/dotnet repo
- Error reports of invalid or missing transitive NuGet dependencies are unusable
- <vulnerabilityDataSource> in Nuget.config not working if Nuget.org is added as a disabled package source HOT 4
- dotnet build/restore/run is not working HOT 13
- dotnet nuget why should check RID specific packages
- Version in GlobalPackageReference is resolved incorrectly for legacy-style csproj projects HOT 4
- NuGetAuditSuppress is ignored by dotnet list package HOT 3
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 home.