.net-standard-1.4

How to include asset files in a .NET Standard 1.4 library in ARM platform?

一世执手 提交于 2019-12-24 19:28:39
问题 Anyone know what is the correct way of referencing assets if the platform is ARM? In x86 I can use appX folder with linking but its not working on ARM thanks 回答1: If you want to get assets files from a .NET Standard library, you would need to mark the file as EmbeddedResource and Copy Always . Then, you need to add a method to get these files in your .NET Standard library's class. For example: namespace ClassLibrary1 { public class Class1 { public static Stream GetImage() { var assembly =

Could not load file or assembly 'System.Security.Cryptography.Algorithms, Version = 4.1.0.0

喜你入骨 提交于 2019-12-10 13:49:53
问题 I'm trying to use System.Security.Cryptography.RNGCryptoServiceProvider class in my .NET Standard 1.4 library and according to this topic my code looks like this: private byte[] GenerateRandomNumber(int length) { using (var randomNumberGenerator = RandomNumberGenerator.Create()) { var number = new byte[length]; randomNumberGenerator.GetBytes(number); return number; } } I have also installed from NuGet libraries: System.Security.Cryptography.Algorithms v=4.3.0 System.Security.Cryptography

Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.1.0.0

梦想与她 提交于 2019-11-28 08:02:00
I have a .NET Standard 1.4 class library that references the System.ComponentModel.Annotations (4.3.0) NuGet package. I'm then referencing this class library from a .NET Framework 4.6.2 test project. It builds fine, but at runtime I get the following error: System.IO.FileLoadException occurred HResult=0x80131040 Message= Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT:

Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.1.0.0

白昼怎懂夜的黑 提交于 2019-11-26 20:19:18
问题 I have a .NET Standard 1.4 class library that references the System.ComponentModel.Annotations (4.3.0) NuGet package. I'm then referencing this class library from a .NET Framework 4.6.2 test project. It builds fine, but at runtime I get the following error: System.IO.FileLoadException occurred HResult=0x80131040 Message= Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located