Questions tagged [.net-standard-2.0]

766 questions
9
votes
1 answer

Missing Method Exception When Referencing .Net Standard Project From .Net 4.6.1 Unit Test

I am getting the following exception when running a .Net 4.6.1 unit test that uses System.IO.Compression.ZipFile.Open, if the unit test project references a .Net Standard 2.0 assembly: System.MissingMethodException: Method not found:…
John Koerner
  • 37,428
  • 8
  • 84
  • 134
9
votes
2 answers

How to update to .NETStandard 2.0 NuGet Package

I've a good old .NET Framework 4.7 Class Library in Visual Studio 2015 currently using Microsoft.Extensions.Configuration NuGet package version 1.1.2. I'm trying to update this to version 2.0, but I'm getting this error: …
dhrm
  • 14,335
  • 34
  • 117
  • 183
9
votes
3 answers

How do I prevent installing nuget packages that aren't 100% .Net Core 2.0 compatible?

I understand that .Net Core 2 has a compatibility shim that allows it use Nuget packages that don't specifically target .Net Core/Standard 2. This gives it access to 70% of Nuget. Great - nice feature. How do I prevent installing nuget packages that…
GraemeMiller
  • 11,973
  • 8
  • 57
  • 111
9
votes
2 answers

How to resolve HttpClient exists in multiple libs

I'm trying to use the IdentityModel package in a .NET Core class library but I get a conflict between netstandard and System.Net.Http: error CS0433: The type 'HttpClient' exists in both 'System.Net.Http, Version=4.1.1.1, Culture=neutral,…
David Clarke
  • 12,888
  • 9
  • 86
  • 116
8
votes
1 answer

Are there benefits in producing a .NET 6.0 version of a .NET Standard 2.0 library?

If I have a .NET Standard 2.0 library project that is being consumed by a .NET 6.0 console project, are there any performance benefits if I also instruct the compiler to produce a .NET 6.0 version of the library? I don't plan to use any…
BlueStrat
  • 2,202
  • 17
  • 27
8
votes
2 answers

Can you share version information between .NET Standard libraries?

In a typical .NET app, product and version information are stored in the AssemblyInfo.cs file under the 'Properties' folder, like so... DLL Project - Properties Folder - AssemblyInfo.cs In our case, we have a solution where we need to keep…
Mark A. Donohoe
  • 28,442
  • 25
  • 137
  • 286
8
votes
2 answers

Reference to type 'IDataSource' claims it is defined in 'System.Web', but it could not be found

I was trying to render rdlc reports in .net core 2.0 and found System.Web is not yet available in .net core. So I started a separate .net standard 2.0 project with in the same solution for the task. Then I was again facing issue with…
8
votes
2 answers

Use Newtonsoft library in NetStandard 2.0 class library

I am developing a class library based on the NetStandard 2.0 framework for multiple platform compatibility sakes, and I need to serialize and deserialize objects. So I added a reference to the Newtonsoft library. The problem is that I have the…
Toto
  • 736
  • 9
  • 33
8
votes
1 answer

Xamarin.Forms UWP with .NetStandard 2.0 and null resources

We are currently moving our Xamarin projects from PCL to .Net Standard 2.0, also core library project format. Most things works well. We use resx-files in the core project for localization. This works fine on iOS and Android. On UWP I get null as…
WebDucer
  • 1,114
  • 2
  • 16
  • 39
8
votes
1 answer

How to write a roslyn analyzer that references a dotnet standard 2.0 project

I have the following error from my Roslyn analyzer test case from the following project https://github.com/Weingartner/Migrations.Json.Net Expected collection to be empty, but found {Test0.cs(5,2): error CS0012: The type 'Attribute' is defined in…
bradgonesurfing
  • 30,949
  • 17
  • 114
  • 217
8
votes
1 answer

MSBuild of VS2017 cannot compile .NET Standard 2.0 project

I have a csproj which targets .NET framework 4.6.1 and .NET Standard 2.0. It can be compiled in my local machine with Visual Studio 2017 (v15.3.2) Now I am setting up our building server(Jenkins) to include this project. Our building server works…
Mr.Wang from Next Door
  • 13,670
  • 12
  • 64
  • 97
7
votes
0 answers

How do I know which Platform Extensions do I need for .NET Standard?

I ran the .NET Portability Analyzer against a class library that I want to use from my own .NET Standard class library. The class I want to use has a dependency on .NET framework. The compatibility results were 91% for .NET Standard and 100% for…
BornToCode
  • 9,495
  • 9
  • 66
  • 83
7
votes
3 answers

Visual studio 2017 go to implementation not work for .net standard library

In Visual studio 2017, Go to Implementation for .net standard library not work? Go to Implementation for .net core library work fine. but for .net standard throw The symbol has no implementations How can I solve this problem?
Mohammad Akbari
  • 4,486
  • 6
  • 43
  • 74
7
votes
1 answer

Microsoft.AspNet.Identity and Microsoft.AspNet.Identity.EntityFramework in .NET Standard 2.0

Background: The project we are wokring on consists of several solutions that share two libraries. Everything is written in .NET Framework 4.6.1 today. A goal for the project has been to adopt .NET Core for new projects and being able to run web…
Ogglas
  • 62,132
  • 37
  • 328
  • 418
7
votes
7 answers

Adding UWP Background task causes AppManifest errors

I've been trying to add an out of process background task to my project to update my App's live tile. The task needs to make a database call to get some data, then process that data to send out a few tile notifications. I've managed to get it to…
Flippey
  • 91
  • 1
  • 8