.net-standard-1.5

Using .net standard 1.5 lib in .net 4.6.2 misses System.Runtime 4.1.0.0

给你一囗甜甜゛ 提交于 2019-11-27 14:29:05
I've some problem when using .net standard in .net framework 4.6.2 consoleapps. I could reduce the problem to this: Given: I create a .net standard 1.5 client library vis vs 2017 with this single class public class Class1 { public List<int> Get() { return new List<int>() { 1, 2, 3, 4, 5, 65, 6 }; } } Now I create a new .net 4.6.2 console application which is just calling the method of this class: static void Main(string[] args) { var foo = new Class1(); Console.WriteLine("Done!"); Console.ReadLine(); } Now I get System.IO.FileNotFoundException: 'The File or Assembly "System.Runtime, Version=4

Visual Studio 2017 - Could not load file or assembly 'System.Runtime, Version=4.1.0.0' or one of its dependencies

落花浮王杯 提交于 2019-11-27 06:35:18
I am using Visual Studio 2017 and am trying to create a .Net Standard 1.5 library and use it in a .Net 4.6.2 nUnit test project. I am getting the following error... Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. I have tried the following: Reference Std library as project reference. Error: gives me the previous error. Create a NuGet pkg for my Std library and reference that. Error: The type is System.String, expecting System.String. This is because System

Visual Studio 2017 - Could not load file or assembly &#39;System.Runtime, Version=4.1.0.0&#39; or one of its dependencies

断了今生、忘了曾经 提交于 2019-11-26 12:04:38
问题 I am using Visual Studio 2017 and am trying to create a .Net Standard 1.5 library and use it in a .Net 4.6.2 nUnit test project. I am getting the following error... Could not load file or assembly \'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\' or one of its dependencies. The system cannot find the file specified. I have tried the following: Reference Std library as project reference. Error: gives me the previous error. Create a NuGet pkg for my Std