Tag: .net standard

无法加载文件或程序集’System.Private.CoreLib …’

我有一个针对.net标准1.4的Xamarin.Forms应用程序。 在具有最低版本14393(和目标16299)的UWP应用程序上,我从Microsoft Store获得以下exception(尽管在我的计算机上它甚至可以从appxbundle文件运行良好): 注意要点: Xamarin.Forms.Forms.Init(e);发生错误Xamarin.Forms.Forms.Init(e); 在OnLaunched 。 错误本身是Could not load file or assembly ‘System.Private.CoreLib…’ 。 System.IO.FileNotFoundException:无法加载文件或程序集’System.Private.CoreLib,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a’或其依赖项之一。 该系统找不到指定的文件。 文件名:System.ModuleHandle.ResolveType的’System.Private.CoreLib,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a’(RuntimeModule模块,Int32 typeToken,IntPtr * typeInstArgs,Int32 typeInstCount,IntPtr * methodInstArgs,Int32 methodInstCount ,ObjectHandleOnStack类型)在System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule模块,Int32 typeToken,RuntimeTypeHandle [] typeInstantiationContext,RuntimeTypeHandle [] methodInstantiationContext)处于System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken,Type [] genericTypeArguments,Type [] genericMethodArguments)at at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord,MetadataImport范围,Assembly&lastAptcaOkAssembly,RuntimeModule decoratedModule,MetadataToken decoratedToken,RuntimeType attributeFilterType,Boolean mustBeInheritable,Object […]

在.net 4.6.2中使用.net标准1.5 lib错过了System.Runtime 4.1.0.0

在.net framework 4.6.2 consoleapps中使用.net标准时遇到了一些问题。 我可以把问题减少到这个:给定: 我使用这个单独的类创建了一个.net标准1.5客户端库vs 2017 public class Class1 { public List Get() { return new List() { 1, 2, 3, 4, 5, 65, 6 }; } } 现在我创建一个新的.net 4.6.2控制台应用程序,它只是调用这个类的方法: static void Main(string[] args) { var foo = new Class1(); Console.WriteLine(“Done!”); Console.ReadLine(); } 现在我明白了 System.IO.FileNotFoundException:’文件或程序集’System.Runtime,Version = 4.1.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a未找到 当我将.net standardlib nuget包添加到.net […]