Questions tagged [.net-standard]

The .NET Standard is a formal specification of .NET APIs that are intended to be available on all .NET runtimes. The motivation behind the .NET Standard is establishing greater uniformity in the .NET ecosystem. Consider tagging a more specific version of .NET Standard in your question.

The enables the following key scenarios:

  • Defines uniform set of APIs for all .NET platforms (, , ) to implement
  • Enables developers to produce portable libraries that are usable across .NET runtimes
  • Reduces and hopefully eliminates conditional compilation of shared source due to .NET APIs

Ref:

Related tags

1607 questions
27
votes
5 answers

Is EF Core Add Migration Supported from .NET Standard Library?

We have been trying to run EF Core Migration in .Net Standard 1.6 class library, but it has been failing. But same passes very well in .Net Core 1.1 class library. Is EF Migration supported in .NET STANDARD?
Abhijeet
  • 13,562
  • 26
  • 94
  • 175
25
votes
1 answer

Nuget Pkg Dlls Missing from Build Folder in .Net Standard DLL Project. dlls are Not Copy Local? Fix in Visual Studio 2019?

I have Visual Studio 2019 Community Edition Steps to reproduce: I load up VS and start a brand new C# .Net Standard Library project. I go to Nuget Pkg Manager and install ANY nuget package. I add a single line to Class1.cs to use a Type from the…
JamesHoux
  • 2,999
  • 3
  • 32
  • 50
25
votes
1 answer

Microsoft.ServiceBus.Messaging vs Microsoft.Azure.ServiceBus

MS has recently introduced the Microsoft.Azure.ServiceBus namespace. https://github.com/Azure/azure-service-bus/blob/master/samples/readme.md It is geared for the new .net standard framework (as if MS doesn't have enough semi-redundant code bases)…
I Stand With Russia
  • 6,254
  • 8
  • 39
  • 67
24
votes
3 answers

Programmatically create service bus subscription using .net standard

My scenario: Website hosted on the cloud, where each instance creates a subscription to a Service Bus Topic for itself to listen for messages. My question: How do I programmatically create subscriptions?
Josh
  • 2,958
  • 3
  • 16
  • 27
24
votes
0 answers

How to include native assets in Nuget on multiple platforms, only 64-bit

I'm creating a NuGet package with the following idea: Has a platform dependent executable and a dll (Windows, Linux and MacOS). The native binaries are 64-bit ones. A .NET Standard 2.0 library to use these native resources. During .NET library…
Veksi
  • 3,556
  • 3
  • 30
  • 69
24
votes
2 answers

New .csproj format - How to specify entire directory as "linked file" to a subdirectory?

With the new .csproj format (as well as the old), it is possible to add files as linked outside of the project folder: It is also possible to use a glob pattern to…
NightOwl888
  • 55,572
  • 24
  • 139
  • 212
23
votes
3 answers

How to migrate a .Net standard project to .Net 5 in VS.net solution?

I have a VS solution that contains both .Net CORE and .Net standard projects. I have just changed all the .Net CORE projects to use .Net 5 by switching the Target Framework property as below But I can't do the same with the .Net standard projects…
Alexu
  • 1,015
  • 2
  • 12
  • 32
22
votes
3 answers

In EF Core, how to check whether a migration is needed or not?

I am using Entity Framework Core in an Xamarin.iOS application. In my core project that contains code (.netstandard 2.0) that is shared between the iOS application and other applications, I would like to know if a migration is needed so that I can…
Kzryzstof
  • 7,688
  • 10
  • 61
  • 108
22
votes
1 answer

System.Web.Services namespace in .net core

I am creating proxy class for SOAP services dynamically where I need System.Web.Services namespace and I am using .NET 5(Core). I am not able to find System.Web.Services namespace in .NET 5, so is it deprecated or moved to another namespace? How can…
21
votes
3 answers

HttpServerUtility.UrlTokenEncode replacement for netstandard

I'm porting a project targeting net472 to netstandard. The last System.Web dependency I'm stuck with is HttpServerUtility.UrlTokenEncode(Byte[]). I found Microsoft.AspNetCore.WebUtilities, which contains Base64UrlTextEncoder and WebEncoders, but…
m0sa
  • 10,712
  • 4
  • 44
  • 91
21
votes
3 answers

How to reference .Net standard in T4 file?

I have a .Net standard 2.0 library. In this library I have a T4 file. The file contains these rows. <# foreach (MessageType enumValue in Enum.GetValues(typeof(MessageType))) { var name =…
Erik Z
  • 4,660
  • 6
  • 47
  • 74
21
votes
2 answers

What are the 43 APIs that are in .Net Standard 2.0 but not in .Net Framework 4.6.1?

The SO question entitled .NET Standard API Reference, quoting the discussion in https://github.com/dotnet/standard/issues/133, mentions 43 APIs that will be included in the .Net Standard 2.0 but are not supported by .Net Framework 4.6.1. However, I…
rmunn
  • 34,942
  • 10
  • 74
  • 105
20
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
  • 1,123
  • 1
  • 8
  • 27
20
votes
1 answer

How to mark .NET Standard code as CLS-compliant?

The title says it all - how do I flag a .NET standard library as CLS-compliant? I wrote a simple library in C# targeting .NET Standard 1.0 framework. It includes two enums: public enum Alignments { Left, Center, Right } public enum Actions { None,…
Quango
  • 12,338
  • 6
  • 48
  • 83
20
votes
2 answers

System.Data.Linq in netstandard20

I have a netstandard20 project that references a .Net 4.6 Project, all compiles and runs except where I call any functionality in the .Net 4.6 project, I get the following error. FileNotFoundException: Could not load file or assembly…
Mike U
  • 2,901
  • 10
  • 32
  • 44