-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DisableImplicitTransitiveReferences #1751
Conversation
This implements the feature described in dotnet#1750. It provides projects with a way to explicitly opt-out of implicit transitive refernces by setting the DisableImplicitTransitiveReferences property to `'true'`. closes dotnet#1750
@@ -462,6 +462,7 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
--> | |||
|
|||
<Target Name="_ComputeTransitiveProjectReferences" | |||
Condition="'$(DisableImplicitTransitiveReferences)' != 'true'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is needed from a correctness perspective. But it seemed to avoid unnecessary computation.
Note: this feature idea was not formally approved. It is just a suggestion I made. Wanted to see how difficult it would be to implement myself. Turned out to be rather straight forward. Sending the PR optimistically 😄 |
cc @nguerrera |
Change looks good to me. On the property name, I think we should include "Project" in there. I think we can cut Implicit to keep it short enough. DisableTransitiveProjectReferences The reason why I think "Project" is important: this will have no impact on the transitivity of nuget references |
@nguerrera name sounds good. Just pushed an update. |
hi. help pls. how it use? where need it write? |
@decv86 Edit your .csproj file and add: <PropertyGroup>
<DisableTransitiveProjectReferences>true</DisableTransitiveProjectReferences>
</PropertyGroup> |
What you are seeing has nothing to do with this issue. That is not a project that uses Microsoft.NET.Sdk, therefore it wouldn't have transitive project references to begin with. Also, you've used the property name as it was spelled in the PR description above, but not how it was finally spelled when the PR was done. The correct spelling is DisableTransitiveProjectReferences, not DisableImplicitTransitiveReferences. But just delete it, because it doesn't do anything in non-sdk projects. You will get the transitive references of your package references as well as support dlls to handle .net earlier than 4.7.2 referencing .net standard greater than 1.5, which applies here I believe. I can't say offhand if that's 111 (was that the actual count?) because I don't know all the dependencies of your package references are. If you can target .net 4.7.2, you will get fewer dlls because it has more of what you reference in the box. If you want to discuss this further, please file a new issue, and include the text of a repro project, not a screenshot. |
[main] Update dependencies from dotnet/roslyn
This implements the feature described in #1750. It provides projects with a way to
explicitly opt-out of implicit transitive refernces by setting the
DisableImplicitTransitiveReferences property to
'true'
.closes #1750