-
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
Automatically reference assembly packs for .NET Framework #10981
Conversation
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.
💯
</GetReferenceAssemblyPaths> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" IsImplicitlyDefined="true" Condition="'$(_FullFrameworkReferenceAssemblyPaths)' == ''"/> |
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.
Let's use a property here instead of hardcoding 1.0.0
for the version number. How about MicrosoftNETFrameworkReferenceAssembliesLatestPackageVersion
?
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.
Can you confirm that you tested restore in VS from a clean project?
My concern is: does VS use a design-time build to extract PackageReference
when it does restore, or does it use only evaluated state, which wouldn't see this?
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.
VS does use design-time builds. They would like to be able to restore based only on evaluation, but we add PackageReference and PackageDownload items in targets as a core part of the build for .NET Core, so it's not currently feasible for Sdk-style projects.
...sks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets
Outdated
Show resolved
Hide resolved
</GetReferenceAssemblyPaths> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" IsImplicitlyDefined="true" Condition="'$(_FullFrameworkReferenceAssemblyPaths)' == ''"/> |
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.
Can you confirm that you tested restore in VS from a clean project?
My concern is: does VS use a design-time build to extract PackageReference
when it does restore, or does it use only evaluated state, which wouldn't see this?
...sks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets
Outdated
Show resolved
Hide resolved
</GetReferenceAssemblyPaths> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" IsImplicitlyDefined="true" Condition="'$(_FullFrameworkReferenceAssemblyPaths)' == ''"/> |
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.
What if the project has an existing reference to this? Does this conflict or supersede?
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.
It supersedes, I added test coverage in the latest update: fb3772a#diff-8ba7e75c46a5fe96b147fd79709da01eR116
…erage for existing references
fb3772a
to
c6b2f33
Compare
Cool! Just saw this. Here are two projects that I'll want to test/convert: |
Fixes #4009