Questions tagged [.net-standard-2.0]

766 questions
0
votes
1 answer

dotnet pack build folders output instead of lib folder when specifying nuspec file

I am attempting to add a step to our CI process that is a powershell script that will automatically pack and push a nuget package for a .NET standard 2.0 project after a previous step builds it. The original command I used was: dotnet pack…
Joe M
  • 1
  • 2
0
votes
1 answer

C# Templates with DLL Upon calling the method Assembly error

I am trying to use a template .tt file to create the table names for an api driven application. I can do this now with a static method as such. But obviously this is not very reusable. public string[] GetEntities() { return new string[] {…
Reaper
  • 13
  • 5
0
votes
1 answer

.NET Standard 2 Base NuGet Package shows error for no apparent reason

Visual Studio 2017 (15.9.2) on Windows using .NET Standard 2.0.3 project. The Dependencies node shows an exclamation because the NuGet base node is showing Exclamation in VS but none of the NuGet packages are showing an exclamation! Do you know how…
Adam
  • 3,872
  • 6
  • 36
  • 66
0
votes
2 answers

Missing NETStandard.Library when create Xamarin.Forms project

When I create a new Xamarin.Forms project I got the yellow triangle telling me that I am missing some packages. Here is what I did: I reinstalled Visual studio 2017 (I am using version 15.8.9). If I re-open the project, it's just gone. There is no…
NBDKhoa
  • 131
  • 3
  • 12
0
votes
0 answers

Socket can connect to server on WIFI, but not with cellular data

I have a 100 clients that connect to my server using websockets (now tcp). My code is very simple (see below). I have a client on T-Mobile 4G Data using a OnePlus 5t that is not able to connect to the server on mobile data, yet he can on wifi data.…
tval
  • 412
  • 3
  • 17
0
votes
0 answers

.Net Standard 2.0 RSA.ExportParameters(bool) not working on Linux

Have implemented some https support infrastructure. In one place need to Convert RSA to pem format. Here found the solution, that works fine on Windows, but as soon as run it in docker with linux, after the construction var parameters =…
Vitalii
  • 127
  • 1
  • 12
0
votes
1 answer

If installing a nuget in a class library do I also have to add it to the client app?

I have a class library such as .NET Standard 2.0 that uses a nuget. I have multiple clients that use this class library. Will the client automatically get the required files from the class library references or do I need to install the same nugets…
Neal
  • 9,487
  • 15
  • 58
  • 101
0
votes
0 answers

Is there a way where I can access configuration files from a .net standard 2.0

Im creating a .net standard 2.0 library and I need to read web.config(.net framework) when a .net application is using my library and appsettings.json(.net core 2.1) when a .net core 2.1 application is using my library. Some people suggested to use…
Sushruth
  • 155
  • 2
  • 11
0
votes
2 answers

Convert a User defined type to another user defined type using Generics in C#

I am trying to convert a class to another class using the Mapper class, It works for the non-user-defined types when it comes to user-defined types, It's showing an Exception. Unhandled Exception: System.ArgumentException: Object of type…
chintuyadavsara
  • 1,509
  • 1
  • 12
  • 23
0
votes
1 answer

PlatformEffect in .NET Standard lib doesn't get resolved

I have implemented a Xamarin.Forms effect and spiked i successfully but I now need to create a proper NugGet package to use it as a component in my projects. I added a .NET Standard lib for the RoutedEffect implementation. Then created three…
Jonas Rembratt
  • 1,550
  • 3
  • 17
  • 39
0
votes
0 answers

How can I replace use of SqlMembershipProvider to work with .NET Standard 2.0

I have a .NET Framework class library that I am trying to upgrade to .NET Standard 2.0. There is a simple encryption helper that uses SqlMembershipProvider. This is being used to Encrypt and Decrypt Byte arrays. As I understand it, this provider…
ProfNimrod
  • 4,142
  • 2
  • 35
  • 54
0
votes
1 answer

UWP release build fails

I have just upgraded my Windows app to UWP with a .net standard 2.0 library. The app is finished and now I am trying to create a release build but the build takes forever and eventually crashes with 138 errors conaining the error below and many more…
Niels
  • 1,366
  • 15
  • 21
0
votes
1 answer

Can't run/publish azure functions on VS 2017 15.8.5 for .net standard 2.0

I cannot run Azure Functions anymore. When I try to debug it, an error message appears: "A project with an Output Type of Class Library cannot be started directly". But I just created a brand new Azure Function project and tried to run (I didn't…
0
votes
1 answer

System.Runtime, Version=4.1.0.0 exeption

In my console C# app I have this lines: ServerManager sm = new ServerManager(); SiteCollection sc = sm.Sites; I added reference to Microsoft.Web.Administration as needed. but I get the exeption: Could not load file or assembly 'System.Runtime,…
CPU
  • 91
  • 1
  • 7
0
votes
3 answers

Azure Function 1.x to 2.x upgrade - Issue with GetQueryNameValuePairs

I have an HTTP Trigger Azure Function which is currently in 1.x. The code is as below: using System.Net; using System.Threading.Tasks; public static async Task Run(HttpRequestMessage req, TraceWriter log) { log.Info($"C#…
Silly John
  • 1,584
  • 2
  • 16
  • 34