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
15
votes
4 answers

Could not load file or assembly 'System.Security.Cryptography.Algorithms, Version = 4.1.0.0

I'm trying to use System.Security.Cryptography.RNGCryptoServiceProvider class in my .NET Standard 1.4 library and according to this topic my code looks like this: private byte[] GenerateRandomNumber(int length) { using (var…
Carlos28
  • 2,381
  • 3
  • 21
  • 36
15
votes
2 answers

MSB3644 The reference assemblies for framework were not found

I am getting the following MSB3644 complication error: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your …
Dave New
  • 38,496
  • 59
  • 215
  • 394
15
votes
1 answer

Environment.MachineName equivalent for .NET Standard 1.4

I am creating a class library that will be used in a WPF project and a .NET Core project. I am trying to get the name of the machine using my application. In both .NET Core and the WPF application I can use Environment.MachineName value. However in…
yitzih
  • 3,018
  • 3
  • 27
  • 44
15
votes
2 answers

VS 2017 RC : I Can not update NETStandard.Library in Nuget

From the last (or maybe the two last) update, I can't update the package NETStandartLibrary in Nuget. I just create a new standard library project. See this message : In project's properties, the version is different : And in the .csproj …
vernou
  • 6,818
  • 5
  • 30
  • 58
15
votes
2 answers

What is the equivalent of Type.GetGenericArguments() in .NETStandard 1.0 / .NET Core?

The method System.Type.GetGenericArguments() is 'missing' from .NETStandard 1.0, and I thought that the TypeInfo.GenericTypeArguments was the replacement for GetGenericArguments(), but unfortuntely they behave differently when supplied with an open…
Steven
  • 166,672
  • 24
  • 332
  • 435
14
votes
2 answers

How to set dependencies when I use .NET Standard 2.0 DLL libraries with a .NET Framework console application?

I can't figure out how should I set up dependencies (where to add EntityFramework nuget packages) in this scenario: Core.Persistence project which compiles to .NET Standard 2.0 DLL library. I have Entity Framework 6, database entity classes for EF,…
Kamil
  • 13,363
  • 24
  • 88
  • 183
14
votes
1 answer

How to Reference Microsoft.VisualBasic in a .Net Standard Class Library?

I am attempting to utilize some of the static classes in the Microsoft.VisualBasic name space in a .Net Standard 2.0 Class library (the Financial.Rate function specifically.) This is a C# project and the library contains various financial functions…
Luke Bethay
  • 143
  • 2
  • 8
14
votes
1 answer

Binding Redirect Hell

I have a .Net Framework 4.6.1 WPF project which references several .Net Standard 2.0 assemblies. Each of these assemblies has one or two dependencies of its own, pulled in from NuGet. When inside of Visual Studio, everything works and runs fine.…
Katie
  • 1,498
  • 1
  • 15
  • 33
14
votes
3 answers

Error while reading json file in dotnet core "the configured user limit (128) on the number of inotify instances has been reached"

I have an console application (in dot net core 1.1) which is scheduled in cron scheduler for every 1 min. Inside the application there is call to configuration file. I'm attaching the code below. public static T GetAppConfig(string key, T…
Vipin
  • 938
  • 5
  • 18
  • 36
14
votes
2 answers

Referencing between NetStandard and .Net Framework

I'm trying to get .Net Framework and NetStandard assemblies to communicate with each other (to learn what is possible). I currently have four projects, two Framework 4.5.2 projects and two NetStandard1.2…
Ayb4btu
  • 3,208
  • 5
  • 30
  • 42
14
votes
1 answer

How to get memory available or used in C# .net core / .net standard

Is there a way to know the current used memory in the current process? I checked many questions: How to get the amount of memory used by an application How to get memory available or used in C# They are not available in .Net Standard 1.6.
Saw
  • 6,199
  • 11
  • 53
  • 104
14
votes
4 answers

Create a table if it does not exist?

Using Entity Framework Core, is there a way to create the table if it does not yet exist? Exception will throw even if EnsureCreated is called in the context: DbSet Ticker { get; set…
fluter
  • 13,238
  • 8
  • 62
  • 100
14
votes
3 answers

Missing include for .NetStandard project when building on build server

I'm currently trying out VS2017 at work, due to an interest in migrating our server systems to .Net core. I have switched a couple of minor tools projects to target .NetStandard 1.2 (recreate and move files), and everything builds locally. However,…
Anders
  • 1,590
  • 1
  • 20
  • 37
13
votes
1 answer

Reference a .NET 5.0 assembly from a full framework project?

We're a bit behind the times with all our products (WPF applications) still using v4.6.1. I'm currently having a "play" with .NET 5, and have converted one of our class libraries (used by many of these products) to v5. I'm now attempting to…
Andrew Stephens
  • 9,413
  • 6
  • 76
  • 152
13
votes
2 answers

How do I do a deterministic build locally (ContinuousIntegrationBuild flag)?

When I attempt to publish my package using NuGet Package Explorer, I see the following warning: Deterministic (dll/exe): Non deterministic Ensure that the following property is enabled for CI builds and you're using at least the 2.1.300…