Questions tagged [.net-standard-2.0]
766 questions
10
votes
0 answers
Found conflicts between different versions of "Microsoft.Bcl.AsyncInterfaces"
I have a netstandard2.0 library that is used by net5.0 applications
One of packages used by the library references Microsoft.Bcl.AsyncInterfaces 5.0.0
But I get this warning for every application:
47>C:\Program Files (x86)\Microsoft Visual…

Igor Be
- 898
- 7
- 17
10
votes
2 answers
What information is logged by IdentityModel when ShowPii is set to true?
IdentityModelEventSource has a property called ShowPII that means that Personally Identifiable Information will be added to the logs (in relation to security). This value is used to decide when to log some OAuth2 sensitive data.
I am trying to…

Vaccano
- 78,325
- 149
- 468
- 850
10
votes
3 answers
How to correctly implement unit tests for .net Standard Library
So as far as I have been understanding from my research. A .net Standard Library can not be used on its own, so it needs to be tested through a different framework, either with .net Framework or .net Core reference. That's just how I interpreted it.…

J.Paravicini
- 882
- 12
- 39
10
votes
3 answers
Entity Framework Database First .Net Core
I have a .Net Standard 2.0 class library project and I want to add Entity Framework to it. I have added the Entity Framework Core package to the project but no Entity Framework Templates appear when I try to add a new item to the project. I have…

coolblue2000
- 3,796
- 10
- 41
- 62
10
votes
6 answers
Visual Studio 2017 won't load .NET Framework references in .NET Standard library
I've installed Visual Studio 2017. I have a class library in the new .NET Standard format, which is able to be used by both .NET Framework and .NET Core. But when I go to Add… Reference… Assemblies Framework, Visual Studio spins for a long time and…

Iucounu
- 1,630
- 1
- 20
- 31
10
votes
1 answer
.NET Framework 4.6.2 and .NET Standard 2.0 incompatibility
A project targets .NET Framework 4.6.2.
A project uses NuGet package Entity Framework Core that references .NET Standard 2.0 (it appeared in packages folder)
As far as I know, .NET 4.6.2 and .NET Standard 2.0 are incompatible.
Could it cause any…

AsValeO
- 2,859
- 3
- 27
- 64
10
votes
2 answers
netstandard 2.0 does not have AppDomain.CurrentDomain.SetupInformation.ConfigurationFile
I have just upgraded a net451 classic dotnet project to multi-target project using net461/netstandard2.0 with reasonable success.
Did however come across this compiler error for net461 when it comes to gaining access legacy configuration files…

fir3pho3nixx
- 155
- 2
- 7
10
votes
5 answers
The type [Type] exists in both [Assembly1] and [netstandard 2.0 assembly]
I cannot get Microsoft.EntityFrameworkCore 2.0 to work with NETStandard.Library 2.0
Error CS0433 The type 'AttributeUsageAttribute' exists in both 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and…

maraaaaaaaa
- 7,749
- 2
- 22
- 37
9
votes
2 answers
Upgrading netstandard 2.0 class library to dotnet 6
I am upgrading a dotnet core 3.1 web app to dotnet core 6 which, of course, includes this change:
- netcoreapp3.1
+ net6.0
Now, with the class libraries, should I also replace…

Matt W
- 11,753
- 25
- 118
- 215
9
votes
2 answers
Excluding the library being built from nuget package in .NET Standard
Bear with me - this is an unusual scenario.
I have 4 projects in my solution. The top most project references the 3 other projects. None of the 3 other projects reference each other. So the architecture is like this:
Now, when I build project A I…

David Christopher Reynolds
- 1,361
- 1
- 18
- 37
9
votes
6 answers
HttpClient.GetStringAsync is not executed
The code runs in .NET Standard 2.0. I have a constructor calling a method which will call an Azure function like this:
public ChatViewModel(IChatService chatService)
{
Task.Run(async () =>
{
if (!chatService.IsConnected)
{
…

CyclingFreak
- 1,614
- 2
- 21
- 40
9
votes
1 answer
How to log http level stream from WCF SOAP client on .NET Core?
Background: I'm maintaining an integration platform that pulls data from various unreliable APIs. Some of those actions generate potentially high costs, so for diagnostic purposes, every outgoing and incoming message is logged to disk to a separate…

skolima
- 31,963
- 27
- 115
- 151
9
votes
2 answers
Incompatible .NET Standard assemblies that should have been compatible?
I have a .NET Standard 2.0 DLL project.
It has no other references, apart from NETStandard.Library 2.0.1 and all is fine.
It is referenced by a WPF application and everything seems to work fine.
Once I add a nuget package for…

NoOne
- 3,851
- 1
- 40
- 47
9
votes
2 answers
Visual studio conditional compilation for os
I know that there is a way to conditionally compile for target frameworks eg #if net461 ....#elif ....
But is there a way to conditionally compile for specific os
Like target _os_MAC or target_os_win
If there is can someone guide me to the…

Fishfish
- 123
- 1
- 6
9
votes
2 answers
Azure Cloud Service Classic with .NET Standard target
Is there a way how to run Azure Cloud Service Classic project with worker role that targets .netstandard2.0?
I have such project, but any time I try to build it I receive this error:
Severity Code Description Project File Line Suppression…

Martin Obrátil
- 214
- 3
- 9