1

在多次错误启动后,我将 Microsoft.NETCore.Portable.Compatibility NuGet 包添加到公共项目中,然后能够添加 Xamarin.Auth 包并编译公共项目。然后,我将 Xamarin.Auth 包添加到我的 Android 和 UWP 项目中,事情就匆匆而过。编译Android项目给了我大约4300个错误,并表明基类被定义了两次,出现以下错误。

Multiple assemblies with equivalent identity have been imported: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll' and 'C:\Users\Roy\.nuget\packages\microsoft.netcore.portable.compatibility\1.0.1\ref\netstandard1.0\mscorlib.dll'. Remove one of the duplicate references.

UWP 应用程序错误更加神秘。它说

Could not locate C:\NorSoft\MPAPool\MPAApp\MPAApp\MPAApp\packages.config.  Ensure that this project has Microsoft.Bcl.Build installed and packages.config is located next to the project file.

我添加了一个虚拟 packages.config。我已将 Microsoft.Bcl.Build 包添加到项目中,并且已添加

<Properties>SkipValidatePackageReferences=true</Properties>

到 .csproj 文件中的 <PackageReference> 元素。

4

0 回答 0