Questions tagged [.net-standard-2.0]

766 questions
4
votes
2 answers

MvvmCross.Core/Platform 5.7.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'

I'm creating an Android and iOS app using MvvmCross, the latest version. Now as the portable class library is deprecated I am using .NET Standard library version 2.0. I have this warning in the NuGet package of MvvmCross .....though the project…
Santosh
  • 65
  • 7
4
votes
1 answer

Is it possible to use .Net Standard System.Configuration.ConfigurationManager.AppSettings with an appSettings.json file

I would like to be able to build .Net Standard libraries that can retrieve their own configuration information whether they are called from a Net Framework or a Net Core application. System.Configuration.ConfigurationManager has been added to Net…
4
votes
1 answer

Multitargeting .NET Standard 2.0 missing some framework libraries

Had a working ASP.NET Core using a .NET Standard DLL I wrote. I'd like to use TransactionScope in my DLL now, but getting this issue: .NET Standard and .NET Core 2.0 both recognize System.Transactions, but .NET Framework 4.6.1 is giving an error and…
sq33G
  • 3,320
  • 1
  • 23
  • 38
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
2 answers

Visual Studio, Sync namespaces except particular files

I really like new productivity tool Sync namespaces in Visual Studio 2022 but sometimes there are rare cases when I need to exclude some file or folder when I synchronize namespaces. Example 1 By convention, DI extensions should be created in the…
3
votes
1 answer

OpenAPI CodeGen adds "operationIndex" parameter to all calls

We're migrating a .NET C# class library from .NET Framework 4.6.2 to .NET Standard 2.0. We use the OpenAPI client code generator to generate code from a bunch of API definition files. Using CodeGen 6.0.1 against OpenAPI 2.0 documents. The code…
SteveCinq
  • 1,920
  • 1
  • 17
  • 22
3
votes
2 answers

IResult (from Asp) not found in standard 2.0 project

I created a DLL project targeting .net standard 2.0. With NuGet I added a reference to Microfosft.AspNetCore.Http. (2.2.2) I created this class: using System; using Microsoft.AspNetCore.Http; namespace netstdlib { public class Class1 { …
Alan Baljeu
  • 2,383
  • 4
  • 25
  • 40
3
votes
1 answer

Will .Net MAUI be comptabile with .NET Standard 2.0?

We currently just started to write class libraries in .NET Standard so we can use this for WPF, Winforms and .Net Core with Ubuntu Server (but then without GUI). .Net 5 does not support Winforms or WPF for our .NET 4.6.x applications. My question…
Michiel
  • 67
  • 1
  • 6
3
votes
1 answer

System.Configuration.ConfigurationManager vs Microsoft.Extensions.Configuration

I am working on a class library(.NET Standard 2.0) CL, which will be used by some of our legacy projects(.NET Framework 4.6.1) LP and many of our new implementations(.NET Core 3.1) NI. My class library CL needs some of the configuration settings but…
3
votes
2 answers

Error Metadata file dll could not be found CSC when publishing

I have a Visual studio solution with several projects in it, specifically a DotNet5 asp.net app, that has several netstandard 2.0 references on it. it builds and runs fine in the debugger but continuously throws the metadata errors. It keeps…
Jrdiver
  • 51
  • 1
  • 7
3
votes
1 answer

How to force CipherSpec to specific value connecting to IBM MQ from RHEL using .net core. Get rid of CompCode: 2 Reason: 2059

We are trying to connect to IBM MQ Server v 9.1.0.x. from RHEL 8.3 using .net core 3.1 and IBMMQDotnetClient 9.2.0.1 standard library from nuget. We are stuck on getting CompCode: 2 Reason: 2059 error. We know what is the reason: during ssl…
Tom Ash
  • 158
  • 11
3
votes
0 answers

CDbl() behavior in netstandard2.0 seems wrong

We make use of a custom value type that implements IConvertible to be able to cast it as Double dynamically. We have prototypes that return Object and are susceptible to returning an instance of this type, on which we call CDbl. In .net Framework,…
Denis Troller
  • 7,411
  • 1
  • 23
  • 36
3
votes
1 answer

Azure Function Updating user profile using SharePoint Online and CSOM .NET Standard gives access denied

I have Azure Function v3 and I want to update Sharepoint user profile properties with CSOM and .NET standard 2.0 by using global admin account credentials. Reading is working. var site = new Uri("https://domain-admin.sharepoint.com"); …
3
votes
0 answers

How do you add a reference to a .NET Standard 2.0 dll from a .NET Standard 2.0 library?

I want to compile a .NET Standard dll and provide it to customers. However, i do not see how they can add a reference to the dll. Visual studio only allows me to add solution references, as opposed to the typical solution references and system…
3
votes
0 answers

Instantiating .NET Framework classes that use Framework API's (e.g. System.Web) in .NET Standard Libraries (potentially called from .Net Core)

I have a large number of .NET Framework 4.8 applications. They extensively use System.Web, which is a framework only API. To ease the transition to .NET Core/.NET 5+, I would like to extract some of the functionalities of the framework code into…
Austin
  • 105
  • 1
  • 12