Skip to content
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

The type 'PermissionSet' exists in both 'System.Runtime.Extensions' and 'System.Security.Permissions' #28348

Closed
danzil opened this issue Jan 8, 2019 · 7 comments
Milestone

Comments

@danzil
Copy link

danzil commented Jan 8, 2019

This is a recent regressions.

I just updated my local WPF repo to use ‘SDK 3.0.100-preview-010024’ and that breaks System.Xaml compilation. The SDK I had previously (3.0.100-preview-009764) works just file.

System\Xaml\Runtime\DynamicMethodRuntime.cs(43,16): error CS0433: The type 'PermissionSet' exists in both 'System.Runtime.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Security.Permissions, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' [Y:\dotnet-wpf-prototype\src\Microsoft.DotNet.Wpf\src\System.Xaml\System.Xaml.csproj]

System\Xaml\Permissions\XamlLoadPermission.cs(20,35): error CS0433: The type 'PermissionState' exists in both 'System.Runtime.Extensions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'System.Security.Permissions, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' [Y:\dotnet-wpf-prototype\src\Microsoft.DotNet.Wpf\src\System.Xaml\System.Xaml.csproj]

@danzil
Copy link
Author

danzil commented Jan 8, 2019

@rladuca found these similar reports which may be related: #28323 and #28299

@danmoseley
Copy link
Member

@joperezr @ericstj could one of you please help figure out the resolution to these linked issues? Beyond my expertise.

@ericstj
Copy link
Member

ericstj commented Jan 9, 2019

That new SDK will be delivering a new System.Runtime.Extensions via the shared framework. We moved types down from S.S.Permissions into S.R.E. We left type-forwards behind so it is binary compatible, but you need to update the reference of S.S.Permissions to the new one so that the compiler knows which typedef to use.

You need to update your System.Security.Permissions reference to be in sync.
https://github.com/dotnet/wpf/blob/39c46e1d69df6d3ad10e60d5f07db3bc5e6c81a7/eng/Versions.props#L7-L8

@stevenbrix @rladuca Any reason why you are using old versions here? I'd expect you to be keeping these in sync with the latest packages out of corefx so that you build/test against what eventually gets packaged into the windowsdesktop shared framework.

@rladuca
Copy link
Member

rladuca commented Jan 9, 2019

@ericstj This is a better question for @danzil as he is working on the specific repo where this is occurring.

@ericstj
Copy link
Member

ericstj commented Jan 9, 2019

@rladuca if I understand correctly he's working on http://github.com/dotnet/wpf and the problems I point out above are issues with that repository.

@ericstj
Copy link
Member

ericstj commented Jan 9, 2019

Closing this issue in favor of this: dotnet/wpf#248.

@ericstj ericstj closed this as completed Jan 9, 2019
@danzil
Copy link
Author

danzil commented Jan 9, 2019

Thanks for looking at this @ericstj - I'll look at the package versions we use there

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the 3.0 milestone Feb 1, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants