- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
Exclude System.* reference assemblies in ILCompiler.Build.Tasks #86423
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
Conversation
We expect the implementation of these assemblies to come as part of msbuild. Fixes dotnet#83695
| Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsWe expect the implementation of these assemblies to come as part of msbuild. Fixes #83695 
 | 
| It is not the most robust fix, but I cannot think about anything better that would not be too complicated. | 
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 think this looks good, but I'm not sure why we're getting reference assemblies being copied (per your other comment). This is netstandard2.0, so I would expect that we would get either real assemblies for the non-inbox stuff, or facade assemblies. Why reference assemblies?
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" PrivateAssets="all" ExcludeAssets="runtime" /> | ||
| <PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" PrivateAssets="all" ExcludeAssets="runtime" /> | ||
| <PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" /> | 
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.
Actually, SRM should be in the SDK as well. Can we add PrivateAssets here as well?
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.
Delete CopyLocalLockFileAssemblies property instead.
| OK, I think I'm even more confused after thinking about this more. I previously said S.R.M is in the SDK. I think that's nominally correct -- the MSBuild.deps.json file lists S.R.M as a dependency. But presumably if we're running the desktop MSBuild, that will not load the MSBuild from the SDK. But if we're running desktop MSBuild I would presume that we do actually need things like System.Memory and System.Numerics.Vectors. Those are not in-box in 48, are they? So this kind of leads me back to the original question: why are there ref assemblies of those DLLs in the output? Shouldn't those be actual DLLs that are loaded only on desktop FX? Looking at Roslyn, they eventually moved to multi-targeting the task, for a variety of reasons, but one of them was this kind of confusion about what needed to be included in the package. I don't really have an opinion either way on whether we should go in that direction, but I find it notable that System.Memory and System.Numerics.Vectors do appear in the 472 version of their task (and are missing from the netcore version). | 
| 
 Desktop MSBuild in supported VS versions comes with these  We should be able to delete  
 No idea. Publishing of libraries projects has rough edges. I count this as one of the rough edges. 
 I do not think we need to do that. We have much smaller support matrix compared to Roslyn (last SDK only, VS versions that have support for the given SDK only), so the current scheme is good enough for us. Also, other tasks in the repo are on the same plan. | 
We expect the implementation of these assemblies to come as part of msbuild.
Fixes #83695