-
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
New winmd reference enforcement targets wrong items #13233
Comments
That behavior is expected from our perspective. Can you elaborate on why you think this is a bug? |
@jaredpar It presents a false negative. I can try to address a NETSDK11130 by removing ReferencePath items, and _BlockWinMDsOnUnsupportedTFMs will no longer trigger an error. But csc will still receive the winmd references, creating a potentially incorrect assembly. |
Still not sure how this is a bug in the csc task though. Our MSBuild API is to use this item group as our input for references. This is a design done in collaboration with MSBuild to ensure we get the proper benefits from reference assemblies at build times. Moving to It sounds like another target updating the incorrect item group here and that is the source of the issue. Can't tell from the discussion though where this would be occuring. |
There's nothing wrong with the csc task, but with the _BlockWinMDsOnUnsupportedTFMs target |
that may not have been clear in my description. The _BlockWinMDsOnUnsupportedTFMs is targeting the wrong item (ReferencePath) because the csc task refers to ReferencePathWithRefAssemblies |
@Scottj1s gotcha. Thanks for the clarification. Moving to SDK as this is one of their targets. |
Fix dotnet#13233 and mitigate dotnet#12087
The csc task uses ReferencePathWithRefAssemblies, rather than ReferencePath:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(111):
References="@(ReferencePathWithRefAssemblies)"
/cc @jkoritzinsky
The text was updated successfully, but these errors were encountered: