简体   繁体   中英

Found conflicts between different versions of "Microsoft.CSharp" that could not be resolved

Trying to Archive for Publishing our Xamarin.iOS app in Visual Studio on Mac but I get this error.

"Microsoft.CSharp, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was chosen because it was primary and "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" was not.
References which depend on "Microsoft.CSharp, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Microsoft.CSharp.dll].
    /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Microsoft.CSharp.dll
      Project file item includes which caused reference "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Microsoft.CSharp.dll".
        Microsoft.CSharp
References which depend on "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" [].
    /Users/user193748/Documents/repos/APP/APP/APP/bin/Release/netstandard2.0/APP.dll
      Project file item includes which caused reference "/Users/user193748/Documents/repos/APP/APP/APP/bin/Release/netstandard2.0/APP.dll".
        /Users/user193748/Documents/repos/APP/APP/APP/bin/Release/netstandard2.0/APP.dll

This has happened since I update Xamarin.Forms from 5.0.0.2196 to 5.0.0.2244. I tried to reverting the version and deploying but the same error occurs. I also tried going from .NET Standard 2.0 to 2.1. I've had the warning before and I was still able to Archive for Publishing. The app can be deployed on Visual Studio in Windows to the Android store but for some reason the iOS side of things is preventing it.

We had to update to a new MacInCloud server which had the latest iOS version (Monterey). This solved the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM