Questions tagged [.net-standard-2.0]

The tag has no usage guidance.

.net-standard-2.0
Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

Migrate Old ASP.NET Application using EF6 and OWIN to .NET Standard 2.0

We have an old ASP.NET application that uses EF6 and OWIN for authentication. We are currently looking to migrate it to .NET Standard 2.0 => that means we will need to replace EF6 with EF Core so ...
minhtuanta's user avatar
0 votes
1 answer
29 views

Migrate project from .NET Framework 4.5 to .NET Standard 2.0

I've got a .NET Framework 4.5 project and I want to migrate it to .NET Standard 2.0. When I try to open this project a windows pops up telling me project is targeting .NET Framework 4.5 and it's no ...
Julio Escudero Cuesta's user avatar
1 vote
2 answers
43 views

can't reference netstandard2.0 library if a reference to CodeAnalysis.CSharp is present

Background Originally I wrote multiple code generators (need netstandard2.0), and wanted to extract common functionalities into a library (also netstandard2.0). However, when trying to reference the ...
infinitezero's user avatar
  • 1,901
0 votes
0 answers
16 views

How do I suppress warnings for dependencies in sourcecode generators?

TL:DR; How do I disable warnings that come through a IncludeAssets="Build" dependency? I've written a sourcecode generator that includes an external dependency (Scriban). Including ...
boop's user avatar
  • 7,625
0 votes
1 answer
46 views

Wrong version loaded of "System.Servicemodel" when using a service reference

I have a project in Visual Studio that targets "netstandard2.0". I add a service reference (WCF Web Service) and as a result Visual Studio (NuGet) installs for me a package reference, "...
mica's user avatar
  • 3
0 votes
0 answers
33 views

Using PdfiumViewer in a .NET standard Assembly

I am trying to split a pdf into seperate images using PdfiumViewer and keep errors saying: Severity Code Description Project File Line Suppression State Error CS7069 Reference to type '...
vkandvia's user avatar
  • 105
0 votes
1 answer
84 views

The SqlParameterCollection only accepts non-null SqlParameter type objects, not SqlParameter objects

After upgrading some of our class libraries to .NET Standard 2.0, System.Data.SqlClient went away and we now need to use Microsoft.Data.SqlClient in those projects. However, we are now seeing this ...
Kyle Fuller's user avatar
0 votes
0 answers
54 views

How to ensure that implementations have a static factory method in older versions of .NET?

Overall, I'm looking for a clean and safe solution to write an interface/abstract class that ensures a private constructor and public static factory method on its implementation(s), in a context where ...
Josh Brunton's user avatar
0 votes
0 answers
30 views

How to specify DevTools protocol version in Selenium?

I'm using this Chrome option in my project: var options = new ChromeOptions(); // Runs Chrome in headless mode, which is very useful for running automated tests. ...
MRP's user avatar
  • 519
0 votes
0 answers
40 views

How to consume a SOAP api with WCF Service on Xamarin.iOS

I am facing a problem from the past few days : I struggle to understand what I need to implement in my Xamarin client to avoid WCF service proxy code generation on iOS. From what I've found on https://...
buloz's user avatar
  • 1
0 votes
1 answer
112 views

Why are unsupported System.Web classes still accessible in .Net Standard?

I am nearing the end of the task of porting a large library project from .Net Framework 4.7.2 to .Net Standard 2.0. This library previously used the System.Web namespace, but since most of that ...
user15890395's user avatar
0 votes
1 answer
464 views

System.ServiceModel.Primitives is simply not being referenced at build time (though corresponding DLL seems to be properly installed)

In a .Net Standard 2.0 project, I am unable to load a reference to System.ServiceModel.Primitives... It says that Primitives doesn't exist on the System.ServiceModel namespace, even though I installed ...
user3773048's user avatar
  • 6,029
0 votes
1 answer
50 views

unable to create a target path for the nuget package in linux , but its working in Windows

currently I am trying to create a nuget package in linux with the help of nuspec file . below is the content of my nuspec file . <?xml version="1.0"?> <package > <metadata&...
Aditya Dalai's user avatar
1 vote
1 answer
142 views

How does Visual Studio picks up the current framework?

I started with a net6.0 project. And decided to provide netstandard2.0 as internal nuget output for the older supported builds. Replaced <TargetFramework>net6.0</TargetFramework> with <...
T.S.'s user avatar
  • 18.7k
0 votes
0 answers
71 views

Build error: "Cannot find project info. This can indicate a missing project reference" after migrating from NET Framework 4.0 to NET Standard 2.0

In order to migrate the C# project to NET Standard 2.0, I followed the advices here. I used the NET upgrade-assistant CLI tool to convert the legacy C# csproj file to NET Standard 2.0. This process ...
user3160108's user avatar
1 vote
1 answer
289 views

string.AsSpan() vs implicit cast operator peformance in .NET for ReadOnlySpan<char>

Since .NET version something we now have an implicit cast from string -> ReadOnlySpan<char>. This means that if a function accepts a ReadOnlySpan<char>, we can just pass it a string and ...
Matheos's user avatar
  • 359
0 votes
0 answers
35 views

Referenced Assemblies not included in NuGet package

I'm using nuget.exe to package my standard 2.0 library project which has a NuGet reference to protobuf-net v2.4.6. It used to include the protobuf dll inside the /lib/netstandard2.0 folder of the ...
Neil Humby's user avatar
0 votes
0 answers
360 views

nuget package .dll not copying to bin with msbuild despite dll.refresh file

i'm sure it's me doing something wrong and could do with someone smarter than myself having a look at this. the problem im having is that MSBuild targeting .NET 4.7.2 fails to copy dll referenced in ...
goodsoup's user avatar
0 votes
2 answers
121 views

Could not load file or assembly 'netstandard' from FW 4.8 console app

I have an older console app that targets .NET Framework 4.8. It loads a few Nugets that all support .NET Standard 2.0 as well as 2.1. The console app builds just fine but I get this runtime error as ...
Jonas Rembratt's user avatar
0 votes
1 answer
19 views

Migration to netstandard2.0 - CS0246: 'ExportAttribute' could not be found

When I try to migrate to the <TargetFramework>netstandard2.0</TargetFramework> I have error error CS0246: The type or namespace name 'ExportAttribute' could not be found (are you missing a ...
Aleksandr Zolotov's user avatar
0 votes
1 answer
104 views

Legacy VB .NET Code migration issues to .Net Standard 2.0 with specific VB functions

We have some legacy code in a .NET 4.8.1 Library (assumed migrated from VB.6 written decades ago) that is used by our main Application running on 4.8.1 We plan to move this library to .Net Standard 2....
christosst's user avatar
-2 votes
1 answer
82 views

how to create a firewall rule in .net standard 2.0 which can Support in linux?

Currently we are using NetFwTypeLib COMReference for adding a firewall rule to out application ,but it working only on Windows public static bool AddRule(Firewall Rule){ INetFwRule ...
Aditya Dalai's user avatar
0 votes
1 answer
70 views

C# - Options to return multiple error types from method

I currently have to following method written in .NET Standard 2.0 /// <summary> /// Get all items /// </summary> /// <returns>All Items</returns> /// <exception cref="...
0lli.rocks's user avatar
  • 1,062
2 votes
1 answer
112 views

Stuck with SHA1 on .NET Standard 2.0

I am making an upgrade from .NET Framework to hopefully .NET. The thing is that we have a big solution with more than a 100 projects. The idea is that this can go into stages. We could upgrade to .NET ...
Bojan's user avatar
  • 897
0 votes
1 answer
108 views

System.Web.Http fails with not found error when upgrading Microsoft.Azure.Devices sdk version

I'm essentially facing the same issue as here: Can not find system.web.http but this ONLY occurs when I bump up my Microsoft.Azure.Devices version from 1.5.2 to 1.33.0. I have tested this repeatedly ...
m341's user avatar
  • 19
0 votes
0 answers
141 views

Challenges Running a .NET Standard 2.0 Test App on Linux and macOS

I'm currently working on creating a test application using .NET Standard 2.0 as the target framework. In my current project, my .csproj file looks like this: <Project Sdk="Microsoft.NET.Sdk&...
MS_Dev's user avatar
  • 177
0 votes
0 answers
49 views

ASP.NET MVC - .NET Standard 2.0 libraries and probing privatePath

Project summary I am in charge of an older ASP.NET MVC project that's running on .NET 4.8. Due to its complexity and size there's no easy way to just "rewrite" it to .NET Core. It utilizes ...
Thyrador's user avatar
  • 121
0 votes
1 answer
109 views

How can I use system.web as a configuration section in a asp.net net472 app that uses System.Configuration.ConfigurationManager

I am migrating a large .net framework application to net6. The strategy I am using is to migrate libraries to netstandard2.0 while keeping the net472 runtime until the application is ready to migrate ...
David Schwartz's user avatar
1 vote
1 answer
167 views

Unable to deploy/push to a GitHub the .Net 4.72 ASMX Webservice because of error MSB4019 (Microsoft.WebApplication.targets" was not found)

I have .NET 4.72 ASMX Web Service that references a .Net Standard 2.0 class library with the Entity Framework I am using Visual Studio 2022 Everything works fine when I work with the code locally. ...
James's user avatar
  • 1,141
0 votes
0 answers
193 views

Compatibility issues with .NET 4.8, .netstandard2.0 and .NET 6

I created a new application in .NET 6. The real engine is written in .NET 4.8 and I can't change it now, so the layer on .NET 6 that is really call the engine in .NET 4.8 is written in .netstandard2.0....
lunatic84's user avatar
  • 330
1 vote
1 answer
696 views

Binding Redirect from System.Buffers 4.0.2.0 to 4.0.3.0 not working on some machines

Bug description We are using MessagePack in our .NET Framework 4.8 solution. On some of our customers machines, there is a problem with the serialization, especially the usage of System.Buffers. The ...
Alexander's user avatar
0 votes
2 answers
136 views

Runtime libraries are not installed or copied

I have a netstandard 2.0 project that I am trying to add into it a reference to nuget ChilkatDnStandard. The ChilkatDnStandard library depends on ChilkatNativeLib which contains all the native ...
Dani Avni's user avatar
  • 423
1 vote
0 answers
455 views

What package can be used to get Microsoft.AspNetCore.Authentication.AuthenticationHandler<T> in a class library?

I have a class library targeting .NET Standard 2.0 which contains custom authentication logic for ASP.NET (Core+) web applications. For example, it has an implementation of AuthenticationHandler along ...
Mark Embling's user avatar
  • 12.7k
3 votes
1 answer
570 views

Google Analytics GA4 tracking package for .NET

It seems that I am unable to find any nuget package that supports Google Analytics - GA4 page and event tracking. Any one of you are aware of it? They are stop supporting using universal properties in ...
Albert Takács's user avatar
0 votes
0 answers
634 views

What is the update/patch policy on vulnerable Microsoft.AspNetCore package versions?

I have some quite old library code using Microsoft.AspNetCore 2.2.0, which has vulnerability CVE-2019-0548. The library is compiled for targets Netstandard 2.0 and NET 6.0, consumed by NET Framework 4....
Erik Hart's user avatar
  • 1,154
1 vote
0 answers
41 views

Why does this compiler message IDE0059 get generated for my ref param? It seems to me the message is unfounded, because it's a ref variable

I've attempted to boil down my issue to the code below. I'm using Visual Studio 2022 Community x64 v17.5.4. My .NET Framework is 4.8.04084. This code is being compiled to target **net standard ** ...
Barry Smith's user avatar
0 votes
2 answers
630 views

.Net 6 unit test project not able to load project references

I am using Visual Studio 2022 Enterprise on Windows 10. I have a C# class library project targeting .Net standard 2.0 (let's call this Project1). This project has project reference to other C# class ...
ahlun's user avatar
  • 3
1 vote
0 answers
85 views

can 'net6.0' project be referenced by a project that targets '.NETStandard 2.0'?

Error: Project 'XXX.csproj' targets 'net6.0-windows'. It cannot be referenced by a project that targets '.NETStandard,Version=v2.0' Any solution? I have .NET 6 project with some Windows Forms, and ...
Vaibhav's user avatar
  • 21
0 votes
0 answers
96 views

Is global.json supported in .netstandard2.0 projects?

There is a global.json file added in my .netstandard2.0 library. Do .netstandard2.0 libraries support global.json file?
devatwork's user avatar
2 votes
1 answer
542 views

Is it possible to display a simple notification MessageBox-like window in .NET standard 2.0 (windows only)

I am converting a .NET4 class library to .NET Standard 2.0 so that it can be called from a .NET4 application and a .NET6 application. These applications are for windows only. The one conversion ...
qwanta's user avatar
  • 53
0 votes
1 answer
68 views

Debugging and editing in project .NETStandard not working

I use Visual Studio 2022. In a .NET Standard project, during debugging, I'm trying to edit a simple code (eg. set int a = 1), but it doesn't work and I get an error Unable to set next statement. The ...
Thofro's user avatar
  • 1
1 vote
0 answers
271 views

Couldn't load File or assembly 'System.Runtime.dll, Version=6.0.0.0'

Actually in my Application .net Framework and .net standard was there which is working Fine And the bootstrapper packages are installing fine. due to some reason we have migrated one of the project to ...
Aditya Dalai's user avatar
0 votes
0 answers
210 views

Inject service to ReadJson method in JsonConverter - Json.NET

I'm serializing/deserializing complex object and I have to use several custom Json Converters. Each custom converter is assigned to related interface by attribute - [JsonConverter(typeof(...
Jakub Vojtašák's user avatar
1 vote
1 answer
675 views

How to make use of .net Standard 2 IFormFile reference in .net Framework 4.7.2 MVC web app

We're working to convert a couple of legacy .net framework 4.7.2 web apps to .net core. We're using the .net standard libraries to allow our infrastructure to be updated before we get the web sites ...
geoff swartz's user avatar
  • 5,773
0 votes
0 answers
219 views

Error "Package 'WindowsAPICodePack 7.0.4' was restored using '.NETFramework..." for a NET6 package

I have a .NET Standard 2.0 project which depends on another project targeting "net6.0-windows;net48". The other project uses a NET6 WindowsAPICodePack Nuget package. When I build the ...
Val's user avatar
  • 1,647
0 votes
2 answers
2k views

Microsoft.Data.SqlClient.SNI.dll not output by VS build

I'm having trouble bringing in class libraries which have recently been migrated to NetStandard2.0 into an old-style AspNet web application project (framework 4.7.2). The updated assemblies reference ...
Neil Moss's user avatar
  • 6,688
1 vote
1 answer
155 views

How to handle target-specific methods, e.g. WinForms or Blazor, in .NET Standard library project?

I would like to share code between a .NET Framework 4.7.2 WinForms and a .NET 6.0 Blazor application using a .NET Standard 2.0 library project. Should I use Dependency Injection in order to implement ...
Thomas853's user avatar
  • 547
1 vote
1 answer
411 views

Why explicitly target net6.0 with netstandard2.0

I'm new to .NET world and would like to know what is the difference between the two statements: <TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks> <TargetFramework>...
Jay's user avatar
  • 19
0 votes
1 answer
332 views

User event script to avoid duplicate record creation

I want to create user event script to avoid duplicate record creation. I have created script but its not working. Still permitting to create duplicate record means same field values. /** * @...
user avatar
0 votes
1 answer
393 views

How to display fields one below one in suitelet?

I want to display fields one below one in a suitelet. How it can be achieved? Please help!! Expected output: field1 field2 field3 field4 field5 field6 field7 Total I am not able to display fields like ...
user avatar

1
2 3 4 5
16