Questions tagged [.net-standard-2.1]

72 questions
49
votes
6 answers

'Could not load type 'Microsoft.AspNetCore.Mvc.MvcJsonOptions' from assembly 'Microsoft.AspNetCore.Mvc.Formatters.Json, Version=3.0.0.0

I'm using netstandard2.1 library in my netcoreapp3.0 web application. When adding my service in Startup, I'm getting the below error: 'Could not load type 'Microsoft.AspNetCore.Mvc.MvcJsonOptions' from assembly…
fingers10
  • 6,675
  • 10
  • 49
  • 87
37
votes
2 answers

Project 'ClassLibrary1.csproj' targets 'netstandard2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.8'

I have some class library projects in targets netstandard2.1. When I referenced that to my WPF project in target .NET Framework v4.8, On building time I get an error: Severity Code Description Project File Line Suppression State Error …
Behzad
  • 3,502
  • 4
  • 36
  • 63
9
votes
1 answer

.NET Standard and .NET Core 3.x or ASP.NET Core 3.x

I have few questions on the .NET Standard and the recently announced .NET Core 3.0 and ASP.NET Core 3.1 The previous versions of .NET Standard had the same major version as that of the .NET core being released, but for .NET Core 3.1 the compatible…
ameya
  • 1,448
  • 1
  • 15
  • 31
6
votes
1 answer

Visual studio 2019 doesn't show me .NET Standard 2.1 and .NET Core 3.1 as part of Target Framework. .NET Core 3.1 is installed on my system

Note: I use VS 2019 Professional Version 16.0.2 Problem: I have a source code base working perfectly fine in VS 2017. But to support .NET core 3.1, I have decided to upgrade my VS 2017 to VS 2019. When I open-source code in VS 2019. It's not showing…
sushil
  • 301
  • 4
  • 16
5
votes
2 answers

NU1202 Package Microsoft.EntityFrameworkCore 6.0.3 is not compatible with netstandard2.1

I am trying to install the latest Microsoft.EntityFrameworkCore 6.0.3 into a class library project targetting netstandard2.1 using Nuget Package Manager and I get this error: Package Microsoft.EntityFrameworkCore 6.0.3 is not compatible with…
santosh kumar patro
  • 7,231
  • 22
  • 71
  • 143
4
votes
2 answers

Class Library (Standard 2.1 or Core 3.1) : namespace name 'IWebHostEnvironment' could not be found

New Project , Class Library (.NET Standard) On project, properties, changed from 2.0 to 2.1 Modified Class1 : public class Class1 { public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { } } This fixed…
Naked Coder
  • 121
  • 1
  • 5
3
votes
1 answer

Error MSB3644 The reference assemblies for framework ".NETFramework,Version=v6.0" were not found on visual studio 2017 v15.9.51

When i tried to build a project that targeted to many frameworks include ".net 6.0" and / or netstandardX.X the visual studio 2017. The error on the subject occure even after installed .NET 6.0 that include: .NET Runtime 6.x.x ASP.NET Core Runtime…
3
votes
1 answer

How-to fix .NET 5.0 to 6.0 migration error

I have a NetStandard2.1 library that is used for data access in a WebApi I was going to upgrade the WebApi and the data access to .NET 6.0. dotnet --info shows the following .NET SDKs installed NET SDKs installed: 3.1.415 C:\Program…
Orgbrat
  • 331
  • 6
  • 20
3
votes
0 answers

VS2019 and multitargeting: netstandard2.1 and netstandard2.0 strange message

Empty standard lib (but with enabled multitargeting): netstandard2.1; netstandard2.0 compiles but create the message. "The…
Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
2
votes
1 answer

Is it worth migrating Dotnet Standard 2.1 to .Net 6 in specified scenario

Scenario: I am planning to upgrade a WebApi-based web project from .Net 5 to 6. I have many dotnet standard 2.1 class library projects in my solution. When trying to upgrade from EF Core 5 to 6 it did not allow me to do so. Error says Package…
2
votes
0 answers

Can you mix .NET Standard 2.0 & 2.1 in a project?

Is it possible for Project to reference other projects that are a mixture of .NET Standard 2.0 and .NET Standard 2.1? I have a utility class library based on Standard 2.0 that is used by both a.NET5 and .NET4.8 websites/applications. In one of my…
Liam
  • 1,161
  • 12
  • 24
2
votes
1 answer

What am I missing about my color configurations in my Xamarin Forms App.Shell?

Early today I've asked for help here because my Xamarin App wasn't working like I expected. After the help about how to change my Action Bar color, I start wondering "why the way it says on tutorials I've found does not work" EDIT
2
votes
1 answer

Run IronPython script with .netStandard 2.1 without any manual dependencies

I have created one py script which imports my .netStandard classLibrary and runs its execution The issue is, when my class library .netStandard version is 2.0 or less it runs properly, But if the version is .netStandard 2.1 it asks for…
Jignesh
  • 125
  • 8
2
votes
1 answer

'SubscriptionClient' does not contain a definition for 'PeekBatch' and ReceiveBatch

I have a netstandard2.1 application and I am using nuget package "Microsoft.Azure.ServiceBus" Version="4.1.1". I am creating a azure service bus SubscriptionClient and trying to use PeekBatch and ReceiveBatch, but I am getting below erros, What is…
user584018
  • 10,186
  • 15
  • 74
  • 160
2
votes
1 answer

Blazor WebAssembly Monitor Threading exception

I'm currently working on a .NET Standard 2.1 Blazor WebAssembly hosted application. My application structure looks like this: BlazorApp.Client (error occures here) BlazorApp.Server I use Serilog with the Elasticsearch sink in my BlazorApp.Client…
azzurro123
  • 521
  • 2
  • 10
  • 19
1
2 3 4 5