Questions tagged [.net-standard-2.0]

628 questions
122
votes
14 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,589
  • 3
  • 12
  • 14
46
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,616
  • 2
  • 11
  • 12
45
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…
44
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
  • 853
  • 1
  • 8
  • 18
26
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,…
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
  • 19,054
  • 16
  • 100
  • 195
20
votes
2 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,451
  • 2
  • 12
  • 25
17
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
  • 235
  • 2
  • 8
17
votes
3 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…
16
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
  • 831
  • 6
  • 19
16
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,293
  • 3
  • 27
  • 41
16
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,589
  • 3
  • 12
  • 14
15
votes
1 answer

Reading appsettings.json from .net standard library

i have started a new RESTful project using .NET Core Framework. I divided my solution in two parts: Framework (set of .NET standard libraries) and Web (RESTful project). With Framework folder i provide some of library for furthers web project and…
15
votes
3 answers

Can't get .NET Standard 2.0 installed

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…
Justin
  • 15,926
  • 28
  • 119
  • 175
15
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…
1
2 3
41 42