-
Notifications
You must be signed in to change notification settings - Fork 533
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
Could not load assembly 'System.Security.Permissions' during startup registration. #2076
Comments
here output from 15.8 Preview 5 debug window where it works fine:
|
Can you please provide a reproduction project as outlined in the bug report wiki? Having a project that we can run will help reduce the potential back and forth to reproduce this issue. We will want to find an isolated case in which might have a specific version of SignalR that causes this issue. If you can provide that for us, it will help us look into this issue! Thanks for filing an issue and we look forward to hearing from you soon! |
I took a look at the build output and see that the Preview5 uses the DLL from lib
while the RTM picks the ref one:
At end of Build in the RTM I see the XA0107 warning
Why does Preview5 uses correct dll and RTM the ref one? |
this looks like a known issue:
An user said that switching back to packages.config works for him. I'll try this now. |
this also works for me. Now I can build, deploy and debug the app in 15.8.1 production and can ditch the 15.8 Preview VM. Xamarin.Android tools should notify the users to use old packages.config until this issue is solved. |
Any update to this problem? I believe the same issue is also tracked here dotnet/msbuild#2776 |
After switching to package.config I have no issues and haven't tried it again. I want to wait for VS2019 before trying it again. |
@MagicAndre1981 that's what I been doing for the past year and a half. I'm just surprised 1) so few people seem to run into this issue 2) it's still around |
This is indeed very confusing why some users have it and others not. I only had this in the release version, but in Preview it worked. 🤔 🤷♂️ |
Is there an update on this issue? Microsoft.Identity.Client started shipping ref assemblies and customers are beginning to encounter this issue. |
@bgavrilMS use old packages.config to install nuget packages, this fixes it for me |
Thanks @MagicAndre1981 - this is a good workaround, but not an actual fix. Visual Studio and NuGet are trying to move away from package.config, so we cannot tell our customers to use packages.config as a permanent solution. |
as you can see, we haven't heard anything from Microsoft. I'll try it with 2019 Rc again until this I use the old working way and not the NOT working but maybe cool way. |
We've started to see this issue using the latest version of Microsoft.Identity.Client (2.7.0) in our Xamarin android app when building remotely, everything seems fine when building locally. Are there updates on this? |
@bugail use old packages.config to workaround the issue until we have a proper fix |
@MagicAndre1981 Thanks for the workaround, unfortunately we're unable to use it as this creates another issue in the project we're working on (see https://github.com/aritchie/userdialogs/issues/550 for example). We're also able to build correctly using Visual Studio 2017, our issue occurs when using a hosted/local build agent or using MSBuild locally. |
@baulig - you could use a non-Hosted VSTS agent until VSTS updates their hosted images. They should do it by end of month, but are having problems with image size. |
@bugail I also use the Acr.UserDialogs package and the old packages.config and it works fine 🤔 🤷♂️ |
@bugail I tested it in VS2019 Preview 2 and here it works for me with PackageReference. But with 15.8 Preview it also worked for me, but not in the stable. So I have no idea if the Xamarin.Android tools in VS2019 have it fixed or not 🤔 🤷♂️ |
have you tried the 2019 RC? I only tested it in preview, but with 15.x the previews also worked but not the release versions. |
@MagicAndre1981 No, I haven't. I tried ~Preview 2 with no success. I will try it again once we have the official release in April. |
this is again wired. Like in 15.8 preview it also works for me in 2019 Preview. I'll also test it with RTM of 2019 again |
have you tried the 2019 GA version? For me it works, but I'm worried about VS2019 UI, so that I stay at VS2017 but here I now run into this new issue with System.Threading.Tasks.Extensions for the Android app if I use Package Reference. VS complains I need to add this lib as SignalR requires it, but I already have it referenced 😡 So I need to stay at VS2017 and the old packages.config, but here I sometimes get Xamarin.Forms targets have been imported multiple times. But this only happens sometimes, not always 🤔 🤷♂️ |
@MagicAndre1981 I will try it once the project I'm working on currently is finished (end of April). Will post any updates |
have you ever tried it with VS2019? Does PackageReference Include now works? |
@MagicAndre1981 I have migrated to PackageReference when I replaced |
and everything works now (with VS2019)? @pikausp |
@MagicAndre1981 sorry, thought I have replied to this. It does, but |
ok, so it still doesn't work all time. I gave it up and will stay for always at
|
We suspect this issue is stale and no longer relevant. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process. |
I've no longer seen this in VS2019/VS2022, so yes, this can be closed |
Steps to Reproduce
Expected Behavior
app starts fine and can be debugged.
Actual Behavior
App crashes at startup and in Output/Debug I see the following:
Version Information
I also played with settings for Mono Shared Runtime/Linking/apk per ABi, installed OpenJDK, but nothing helps.
The strange thing is that I was able to build/launch the app in the 15.8 preview 5 without any issues and now in the 15.8 stable I have the issues again like in 15.7.x.
The text was updated successfully, but these errors were encountered: