Questions tagged [.net-standard-2.0]
766 questions
7
votes
4 answers
Adding .NET Standard libraries to 4.7.1 lib adds loads of references, some broken
As I need to import a library targeting .NET Standard 2, I had upgraded my library to .NET 4.7.1, as I understood from this MS video that should avoid this issue: https://www.youtube.com/watch?v=u67Eu_IgEMs
However, adding .NET standard now results…

Quango
- 12,338
- 6
- 48
- 83
7
votes
2 answers
Visual Studio projects copy dependencies from referenced project into output
Is it possible to make Visual Studio to copy all dependencies of referenced projects into the output path?
Example
In the Solution, Project A (Library, .NET Standard) defines some functions and is dependent on Library L1 (via NuGet) and Library L2…

auX
- 860
- 9
- 19
7
votes
1 answer
Using .NET Standard 2.0 with Mono
Does anyone know if .NET Standard 2.0.0 is supported on Mono? I currently have a build that is working fine on windows 10. When I attempt to use in Mono in a Ubuntu Linux environment I get the following error:
Could not locate the assembly…

Nore Gabbidon
- 351
- 1
- 4
- 10
7
votes
1 answer
Reading app.config from .NET Standard 2.0 library
I'm creating a .NET Standard 2.0 library to be consumed from a .NET Framework 4.6.1 application.
This library needs EF Core, but I can't figure out how to read the app.config.
In a .NET Framework library I would initialize my DBContext like…

BgrWorker
- 619
- 5
- 20
7
votes
3 answers
AutoMapper in ASP.Net Core 2.0
Does someone know if there's any way to use AutoMapper with ASP.Net Core 2.0?
There's no extension for IServiceCollection.
And optional question, does anyone tryed to work with AutoMapper with .Net Framework 4.7 or .Net Standard 2.0?
user7100073
6
votes
2 answers
VS dll reference error - Instance object was created as immutable
If you try to add a NetStandard library dll to a .net core application Visual Studio throws the error:
instance object was created as immutable
And refuses to add the reference.

Tod
- 2,070
- 21
- 27
6
votes
0 answers
UDP Client not receiving messages on linux machines
I have a program to discover clients on network, The class libraries which responsible for the discovery are .net standard 2. It works perfect on windows machines but now i need to run it on linux and my UdpClient not receiving the messages, Even…

ATT
- 921
- 3
- 13
- 30
6
votes
3 answers
How do I expose a .netstandard2.0 library with COM for use in VB6?
I have a dotnet core library, a framework 4.7.2 library and a vb6 application.
I want to write a common library for them all to access and so choose .netstandard2.0
I tried a the 4.7.2 framework wrapper library between .netstandard2.0 library and…

Kirsten
- 15,730
- 41
- 179
- 318
6
votes
3 answers
Multiple DLLs from referenced .NET Standard projects
I've created three .NET Standard class librariy C# projects with Visual Studio 2017 and default settings.
Projects:
MainProject
TimeProject
Dependencies -> MainProject
ClockProject
Dependencies -> TimeProject
Each of them must have its own…

Stampy
- 456
- 7
- 27
6
votes
0 answers
MsBuild failing for .Net Standard project with error "Package System.Security.Cryptography.ProtectedData, version x.x.x was not found"
Project Setup : Mixed framework solution
.Net Framework 4.6.2 projects in solution : 15
.Net Standard 2.0 projects in solution - 1
Development Machine
Visual Studio 2017(15.7.4) : Builds without any errors
Build Server
TeamCity Version…

One And a Zero
- 101
- 4
6
votes
3 answers
Publish .net standard library with all it's dependencies?
I have created a system which loads dynamically a library and executes it's main class.
Everything works perfect, the problem I have is how to publish this DLL with all it's dependencies. As no executable project is referencing it I have to manually…

Gusman
- 14,905
- 2
- 34
- 50
6
votes
2 answers
Xamarin Forms Project with netstandard: can't build UWP
currently I'm working on a Xamarin app, which uses the .Net-Standard code sharing strategy.
While I ca build and run the succesfully on android, i have some problems with the UWP project.
When I try to build the project I'm receiving this error…

Ced
- 1,301
- 11
- 30
6
votes
1 answer
ASP.Net Core 2 Unable to resolve service for type
I'm attempting to register my own custom options. I have, in my ASP.Net project (Kimble.API), an appsettings.json file. It looks like this:
{
"NotificationHub": {
"AccountName": "my-notification-hub-name",
"ConnectionString":…

shawnseanshaun
- 1,071
- 1
- 13
- 25
6
votes
1 answer
How to Replace DTE2 in .NET Standard
It's been a while since .NET Standard is introduced by Microsoft. Earlier, if I wanted to obtain information about Project, Solution and other related objects (e.g solution path, projects in a solution, etc), I used DTE2 type which is an interface…

Mo Sadeghipour
- 489
- 8
- 25
6
votes
2 answers
Nuget Packager the default XML namespace of the project must be the MSBuild XML namespace in TFS 2017
I changed the project type I am packaging from .net framework v4.6 to .net standard 2.0, now the build definition is failing in Nuget packager step and I am getting this error message.
[error]The default XML namespace of the project must be the…

Yahya Hussein
- 8,767
- 15
- 58
- 114