.net-standard

How do I target .NET Standard 2.0 in a freshly created .NET Core 2.0 web app?

自闭症网瘾萝莉.ら 提交于 2020-05-14 18:11:29
问题 I've just created a fresh project using dotnet new web . My Google-foo may be failing me, but I didn't find anything relating to my answer (please link to another SO answer, or relevant documentation if I've missed something obvious). If I want to ensure this new project is .NET Standard 2.0 compliant, what do I now do? 回答1: NET Standard is for class libraries. Applications must target netcoreapp* where * is a version number. The following shows the compatibility matrix: https://docs

Why is my .NET framework app looking for the wrong version of the .NET core/standard platform extension assembly, and how do I fix it?

眉间皱痕 提交于 2020-05-13 01:31:49
问题 From the .NET APIs catalog, I understand that the Microsoft.Win32.Registry class is declared in the .NET Standard + Platform Extensions 2.0 package in an assembly Microsoft.Win32.Registry, Version=4.1.1.0, PublicKeyToken=b03f5f7f11d50a3a . I've created a class library which targets .NET Standard 2.0, and here's a simple class: public class NetStandardClass { public string GetHklmRegValue() { var lmKey = Microsoft.Win32.Registry.LocalMachine; var softwareKey = lmKey.OpenSubKey("Software");

Why is my .NET framework app looking for the wrong version of the .NET core/standard platform extension assembly, and how do I fix it?

爷,独闯天下 提交于 2020-05-13 01:26:55
问题 From the .NET APIs catalog, I understand that the Microsoft.Win32.Registry class is declared in the .NET Standard + Platform Extensions 2.0 package in an assembly Microsoft.Win32.Registry, Version=4.1.1.0, PublicKeyToken=b03f5f7f11d50a3a . I've created a class library which targets .NET Standard 2.0, and here's a simple class: public class NetStandardClass { public string GetHklmRegValue() { var lmKey = Microsoft.Win32.Registry.LocalMachine; var softwareKey = lmKey.OpenSubKey("Software");

Could not load file or assembly 'Microsoft.Data.SqlClient

╄→гoц情女王★ 提交于 2020-05-07 08:18:59
问题 I am calling a .net standard 2.0 library from a framework 4.7.2 test project sucessfully. If I take my .net standard 2.0 dll (SBD.Standard) and create a new winforms project that references it then I get asked to add Microsoft.EntityFrameworkCore, then Microsoft.EntityFrameworkCore.SqlServer, then Microsoft.Data.SqlClient and then my project runs successfully. (Although it would be ideal if the extra packages were added automatically) However trouble occurs if I try to distribute my library

Could not load file or assembly 'Microsoft.Data.SqlClient

孤街醉人 提交于 2020-05-07 08:17:53
问题 I am calling a .net standard 2.0 library from a framework 4.7.2 test project sucessfully. If I take my .net standard 2.0 dll (SBD.Standard) and create a new winforms project that references it then I get asked to add Microsoft.EntityFrameworkCore, then Microsoft.EntityFrameworkCore.SqlServer, then Microsoft.Data.SqlClient and then my project runs successfully. (Although it would be ideal if the extra packages were added automatically) However trouble occurs if I try to distribute my library

Could not load file or assembly 'Microsoft.Data.SqlClient

Deadly 提交于 2020-05-07 08:17:23
问题 I am calling a .net standard 2.0 library from a framework 4.7.2 test project sucessfully. If I take my .net standard 2.0 dll (SBD.Standard) and create a new winforms project that references it then I get asked to add Microsoft.EntityFrameworkCore, then Microsoft.EntityFrameworkCore.SqlServer, then Microsoft.Data.SqlClient and then my project runs successfully. (Although it would be ideal if the extra packages were added automatically) However trouble occurs if I try to distribute my library

How to Refer to EntityFrameworkCore from Nuget Package source for a UWP Project

半腔热情 提交于 2020-04-17 20:28:11
问题 I downloaded .nupkg file from https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/2.2.6 and added in the folder which I referred from the Nuget Package Sources. But it says that Microsoft.DependencyInjections 2.2.0 not Found. Then, I added the nupkg for MicrosoftDependencyInjections 2.2.0 from https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection/2.2.0 In runtime execution, it shows Microsoft.DependencyInjections 2.2.0 not found!. How to get rid of this issue, 来源:

How to Refer to EntityFrameworkCore from Nuget Package source for a UWP Project

北慕城南 提交于 2020-04-17 20:27:13
问题 I downloaded .nupkg file from https://www.nuget.org/packages/Microsoft.EntityFrameworkCore/2.2.6 and added in the folder which I referred from the Nuget Package Sources. But it says that Microsoft.DependencyInjections 2.2.0 not Found. Then, I added the nupkg for MicrosoftDependencyInjections 2.2.0 from https://www.nuget.org/packages/Microsoft.Extensions.DependencyInjection/2.2.0 In runtime execution, it shows Microsoft.DependencyInjections 2.2.0 not found!. How to get rid of this issue, 来源:

Error: Cannot load file or assembly netstandard, Version=2.1.0.0

霸气de小男生 提交于 2020-03-22 04:54:47
问题 I have a AzureFunctions project that I needed to upgrade to .NET standard 2.1 (from 2.0) All of my other projects in the solution load and compile correctly but this AzureFunctions project is throwing this error: Error System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. File name: 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken

Can't get .NET Standard 2.0 installed

。_饼干妹妹 提交于 2020-03-18 03:51:46
问题 I'm trying to create a .NET Standard 2.0 project, however on the project properties page it only has options up to .NET Standard 1.6. I went to Visual Studio > Tools > Extensions and Updates > Updates > Product Updates and upgraded Visual Studio 2017 to the latest version (15.5.4.) I also downloaded / installed the .Net Core 2.0 SDKs from both of these urls: https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.0-download.md https://www.microsoft.com/net/learn/get