Automatically reference assembly packs for .NET Framework#10981
Conversation
| </GetReferenceAssemblyPaths> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" IsImplicitlyDefined="true" Condition="'$(_FullFrameworkReferenceAssemblyPaths)' == ''"/> |
There was a problem hiding this comment.
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.
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.
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.
| </GetReferenceAssemblyPaths> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" IsImplicitlyDefined="true" Condition="'$(_FullFrameworkReferenceAssemblyPaths)' == ''"/> |
There was a problem hiding this comment.
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?
| </GetReferenceAssemblyPaths> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" IsImplicitlyDefined="true" Condition="'$(_FullFrameworkReferenceAssemblyPaths)' == ''"/> |
There was a problem hiding this comment.
What if the project has an existing reference to this? Does this conflict or supersede?
There was a problem hiding this comment.
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