Questions tagged [.net-standard-2.0]
766 questions
6
votes
2 answers
Cross-Platform Way to Get Parent Process ID
Using .Net Standard, is there a cross-platform way to get a process's parent process ID?
Several SO questions and answers address how to do this in Windows-specific ways (e.g. How to get parent process in .NET in managed way), typically using either…

Ben Gribaudo
- 5,057
- 1
- 40
- 75
6
votes
1 answer
Upgrading Xamarin Forms to .Net Standard 2
I am attempting to convert my Xamarin project to use .net Standard 2.
I have added the .net standard 2 library
I have installed all the nuget packages that previously existed in my pcl library. (all build fine)
Then I removed the pcl and added the…

Murdock
- 4,352
- 3
- 34
- 63
5
votes
2 answers
Create NuGet Package with GitHub Actions
I have a solution for an ASP.NET Core API project that contains the main API project as well as two other library projects.
I now want to create NuGet packages for the library projects so that I can use them in other applications.
Do I need to…

Sam
- 26,817
- 58
- 206
- 383
5
votes
2 answers
How to make internals visible to multiple other assemblies in .NET Standard
I have multiple assemblies which include unit tests for a single .NET Standard 2.0 project. To thoroughly test my project I want the internal classes to be visible to both assemblies.
Here is the part of my .csproj file which makes the internals…

Timo
- 53
- 1
- 6
5
votes
1 answer
SendGrid API v3: Reply to a thread
I am trying to send an email as a reply to a previous thread using SendGrid v3 APIs. But it always shows as a new email thread in Outlook. I am using "Message-ID", "In-Reply-To" and "References" fields but it always fails to show under single…

Prasad Bhokare
- 349
- 1
- 2
- 12
5
votes
1 answer
How to force nuget package reference dlls to be copied to output directory?
I added the System.Memory Nuget Package to my net48 Azure Function V1 project to provide the missing dlls for a referenced netstandard2.0 package. But as the package is not directly used in my code, the dlls are not copied to the output folder.
How…

MatterOfFact
- 1,253
- 2
- 18
- 49
5
votes
2 answers
How to add the properties tab to a class library project in Visual Studio 2019?
I have a Visual Studio 2019 solution which has several Class Library projects targeting .NET Standard 2. Every one of these projects has a properties tab like the one described in the below image:
Inside the properties tab, there are several files…

Ivo
- 396
- 1
- 9
5
votes
1 answer
How to properly setup Fody.Costura in .NET Core or .NET Standard
I am not able to get Fody.Costura running in a .NET Core 2.1 or .NET Standard 2.0 library. The wiki and open issues seem to not directly answer the question what has to be done differently than in a classic .NET Framework project (.exe or…

stev-e
- 436
- 6
- 15
5
votes
4 answers
Is IAsyncEnumerable supported in C# 8.0?
Its really hard to find any information on IAsyncEnumerable, other than a few mentions in the 'What's New c# 8.0' articles. Trying to use it in Visual Studio 2019 with netstandard 2.0 and C# 8 enabled, it does recognize the class but i get a ton of…

maraaaaaaaa
- 7,749
- 2
- 22
- 37
5
votes
1 answer
Azure Functions DocumentClient could not load type from assembly exception
I have an Azure Function v2 that calls into an utility library, which in turn instantiates a DocumentClient. When running my function locally, it throws an exception on this line:
_client = new DocumentClient(new Uri(cosmosDbEndpoint),…

Scotty H
- 6,432
- 6
- 41
- 94
5
votes
1 answer
.NET standard 2.0 project not able to load Dapper 1.50.5
I am just starting out with .NET standard. In a proof-of-concept project I'm trying to use Dapper as my ORM. In the .NET Standard 2.0 class library project, I added Dapper 1.50.5 Nuget package. However, the assembly isn't getting loaded at…

KSK
- 666
- 4
- 22
5
votes
1 answer
An error from Azure DevOps Build: Could not locate the assembly "System.ComponentModel.Annotations"
I have a netstandard 2.0 project with a reference to System.ComponentModel.Annotations. It builds fine on my local computer, but when I try to build it using Azure DevOps pipeline, I get the following error:
...warning MSB3245: Could not resolve…

Tohid
- 6,175
- 7
- 51
- 80
5
votes
2 answers
String.Join overload not recognized
I have code equivalent to String.Join(',', new List()) in a .NET Standard 2.0 project. I get two error from this line:
Argument 1: cannot convert from 'char' to 'string'
Argument 2: cannot convert from…

Hele
- 1,558
- 4
- 23
- 39
5
votes
4 answers
Which HttpRequest class to use in .netstandard 2?
I'm working in a .netstandard library, because it should work both in .NetFramework 4.7 and .NetCore. In that library, I have a method that receives a HttpRequest object, process the request using querystring, content, contenttype etc and returns a…

Gabriel Calegari
- 331
- 3
- 9
5
votes
2 answers
When using nuget packages is there a way to avoid netstandard assemblies in favor of PCL?
I have a desktop application and a simple class library that targets the .Net framework 4.6.2. Recently I noticed that when I update my nuget packages in VS 2017 (15.6.3), one of them started pulling in the some newer netstandard2.0 assemblies.
I'm…

David Beavon
- 1,141
- 9
- 16