Questions tagged [.net-standard-2.0]

766 questions
136
votes
16 answers

The current .NET SDK does not support targeting .NET Standard 2.0 error in Visual Studio 2017 update 15.3

I want to create a class library project with Target Framework .NET Standard 2.0. I've updated my Visual Studio 2017 to Version 15.3 and also in Visual Studio installer checked .NET Framework 4.7 SDK and .NET Framework 4.7 targeting pack manually…
sahar
  • 1,769
  • 3
  • 13
  • 14
60
votes
4 answers

Can't use System.Configuration.Configuration manager in a .NET Standard2.0 library on .NET FX4.6

I have an assembly created in NetStandard2.0. It reads AppSettings using System.Configuration.ConfigurationManager. I have installed nuget package of System.Configuration.ConfigurationManager with version 4.4.X which is suitable for…
kiran
  • 1,242
  • 1
  • 10
  • 25
51
votes
8 answers

Trying to set-up Entity Framework core in .Net Standard project

I was wondering if I could set-up my EntityFrameworkCore in a .NET Standard 2.0 project easily. I was following this Tutorial but it requires either .NET Core or Framework. When I got to this step: Scaffold-DbContext…
47
votes
2 answers

Method not found System.Net.Http.Formatting.MediaTypeFormatter.get_SupportedMediaTypes() after adding .NET Standard 2.0 dependency

I have a .NET Framework 4.6.1 WebApi project that is referencing a small NuGet package we use internally to share common utility methods. We want to start moving some of our stuff to .NET Core, so I changed the utility package to target .NET…
Bruce Nielsen
  • 1,666
  • 2
  • 11
  • 12
33
votes
6 answers

Could not load file or assembly System.Data.SqlClient, Version=4.2.0.2 when I use System.Data.SqlClient Version 4.4.3

I use System.Data.SqlClient Version 4.4.3 for all .NET Standard 2.0 class libraries in my ASP.NET Core 2.0 project. Why do I get Could not load file or assembly 'System.Data.SqlClient, Version=4.2.0.2, Culture=neutral,…
33
votes
3 answers

Disable transitive project reference in .NET Standard 2

I'm writing an MVC website using ASP.NET Core 2.0. In the ASP.NET Core project (let's call it Web), I reference a .NET Standard 2 project in the same solution (let's call it Service). The Service project also references a third .NET Standard 2…
Emad
  • 3,809
  • 3
  • 32
  • 44
27
votes
3 answers

Copy all dependencies from .Net Standard libraries to .Net Framework Console application

After consuming .net standard projects in a .net framework(4.6) console application, the dependencies of the .net standard projects are not copied into the output directory. This results in run time error of missing dlls. The "copy local" property…
tech-y
  • 1,829
  • 2
  • 16
  • 26
23
votes
2 answers

span and streams

I have been reading about span for a while now, and just tried to implement it. However, while I can get span to work I cannot figure out how to get a stream to accept it like they do in the examples. Other examples show int.parse supporting spans…
22
votes
2 answers

Package X is not compatible with netstandard2.0

I created a .NET Standard v2.0 project in Visual Studio 2017 v15.3.1 and I'm unable to install "Microsoft.EntityFrameworkCore 2.0.0" package in it (by Nuget 4.3). Previously the .NET SDK and Runtime, both 2.0.0, were installed. The errors I get…
21
votes
4 answers

How to create Autoincrement column in SQLite using EF core?

I am using Entity Framework Core 2.0 for Sqlite code first in my UWP and .NET Standard app. My model has an entity of type Primary Key integer which should be served as auto increment according to SQLite documentation. But in real for every row that…
21
votes
5 answers

VSTS build: Packages failed to restore - Unable to resolve 'NETStandard.Library (>= 1.6.1)' for '.NETStandard,Version=v2.0'

I'm getting Unable to resolve 'NETStandard.Library (>= 1.6.1)' for '.NETStandard,Version=v2.0'. in VSTS build using Hosted2017 build agent after I upgraded my aspnetcore app to netcoreapp2.0 and my libraries to use netstandard2.0. Works fine…
Liero
  • 25,216
  • 29
  • 151
  • 297
20
votes
3 answers

Where does .net core search for certificates on linux platform

On Windows, for .NET Framework classes we can specify sslkeyrepository as *SYSTEM/*USER.On linux where does the .NET Core classes search for the certificates by default and what could be the values for sslkeyrepository.
subbaraoc
  • 1,123
  • 1
  • 8
  • 27
20
votes
2 answers

System.Data.Linq in netstandard20

I have a netstandard20 project that references a .Net 4.6 Project, all compiles and runs except where I call any functionality in the .Net 4.6 project, I get the following error. FileNotFoundException: Could not load file or assembly…
Mike U
  • 2,901
  • 10
  • 32
  • 44
19
votes
4 answers

Could not load file or assembly error in .Net Standard 2.0 class library

I have a .NET Standard 2.0 class library project with installed Nuget package System.Data.SqlClient version 4.4.0 and a Windows Form .NET Framework 4.7 project that has a reference to that class library. Installing the Nuget Package and building the…
sahar
  • 1,769
  • 3
  • 13
  • 14
18
votes
2 answers

Debugging symbols not loading in .NET standard project targeting .NET Framework

I am using Visual Studio 2017. I created a .NET Standard library (let this library be Lib1) project with two Target frameworks, netstandard2.0 and net46. Then I have another two projects... one is a "pure" .NET Framework 4.6 console project (lets…
jjamardo
  • 267
  • 3
  • 9
1
2 3
51 52