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
WPF project with AutoGenerateBindingRedirects enabled produces MSB3277 #30813
Comments
I fixed my actual project by disabling |
@vatsan-madhavan, @ericstj, any ideas? The manifests in the 3.0 preview 9 packages seem to match up with this note:
netcoreapp:
windowsdesktop:
Did Core-Setup miss an update? Did CoreFX not mark the package to service properly? |
The version differences are due to dotnet/corefx@4e76a6c which removed the package. Now the reference assembly is built in CoreFx and not shipped anywhere, but is a seed for the desktop facades. In the past we used assembly-rewriting to 0.0.0.0-out all the references from these facades, but now in 3.0 they reference the exact version. The fix here would be to freeze the reference assembly to the version that was shipped in the package. That should have been done when the package was removed. Alternatively we could decide to add this assembly (and its closure) to the shared framework in 5.0. The implementation is already part of the shared framework, we're just not exposing the references since it doesn't make sense to do so on unix since this API is not supported there. I'll move this to corefx. |
We should see if this means that you cannot use a desktop library that exposes types in this assembly. If so, this may meet the bar for 3.0 / 3.1. The types forwarded in this assembly are PipeSecurity, PipesAclExtensions, PipeAuditRule, PipeAccessRule, PipeAccessRights. |
Looks like the compiler is permitting this, so it is not a blocking issue, however we should clean this up in 5.0. |
@ericstj I just hit this in WPF's test repository when trying to flow 3.1 bits and build off of them. If you clone this branch and then build you should hit this issue. Building the below project is sufficient.
FYI @vatsan-madhavan |
Yep we understand the issue and it’s not blocking. Setting AutoGeneratBindingRedirects isn’t even relevant for .NetCoreApp projects. You can work around the warning by conditioning that property to only be set for desktop TargetFrameworks. We’ll fix up the warning in 5.0. If you’re hitting this warning without setting AutoGenerateBindingRedirects then open a new issue. |
@Anipik since you are touching versions of these assemblies in 3.1 can you address this here? |
@ericstj In our case, we're using the Microsoft.Build.Locator package which includes a props file that sets |
Added the workaround to the summary. (Please feel free to edit further!) |
@Anipik is this still a 3.x issue? I don't know why your PR above didn't resolve it since it says "fixes dotnet/corefx#40978". Although reading above it sounds like there's work for 5.0 so this should stay open? |
yes we need to port the change it to 5.0 as well. i will do that. |
…s MSB3277 Disable AutoGenerateBindingRedirects when targeting netcoreapp. Normally you do not need it on .NET Core. Look at https://github.com/dotnet/corefx/issues/40978
…B3277 Disable AutoGenerateBindingRedirects when targeting netcoreapp. Normally you do not need it on .NET Core. Look at dotnet/corefx#40978
WPF project with
AutoGenerateBindingRedirects
enabled produces a MSB3277 warning, which is a similar issue to https://github.com/dotnet/corefx/issues/40012#issuecomment-522209519:I started to get this MSB3277 warning after migrating my WPF project from 3.0 preview 7 to 3.0 preview 9.
Workaround
Disable
AutoGenerateBindingRedirects
when targeting netcoreapp. Normally you do not need it on .NET Core.Steps to reproduce
dotnet build
the following project: WpfApp.zipor
Expected behavior
No warning.
Actual behavior
Build generates an MSB3277 warning.
Environment data
Notes
C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\3.0.0-preview9-19423-09\ref\netcoreapp3.0\System.IO.Pipes.AccessControl.dll
is 4.0.3.0 whileC:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.0.0-preview9-19423-09\ref\netcoreapp3.0\System.Core.dll
references 4.0.4.0.System.IO.Pipes.AccessControl, Version=4.0.3.0
is the one published at https://www.nuget.org/packages/System.IO.Pipes.AccessControl/4.5.1.System.IO.Pipes.AccessControl, Version=4.0.4.0
is not publicly published as a NuGet package.The text was updated successfully, but these errors were encountered: