Questions tagged [.net-standard-2.0]

766 questions
5
votes
1 answer

.NET Core, .NET Standard and Transitive Dependencies across Solutions

My question is similar to this one, although it doesn't really address my issue. I am working on some new AWS Lambda functions, and I would like to keep their implementation in separate class libraries for reuse. I'm testing this concept using two…
LandonC
  • 889
  • 1
  • 16
  • 28
5
votes
1 answer

Null reference exception on a ListDictionaryInternal when setting bindable property on custom view

I have just migrated my Xamarin Forms project to .NET Standard 2.0 and am fighting with some odd behavior. In the following situation, I am getting a Null Reference Exception on a ListDictionaryInternal with no exception breakpoint, no stack trace…
Sev
  • 883
  • 1
  • 14
  • 34
5
votes
2 answers

How to override appsettings.json for different OS?

My project is simple WebApi server, based on netcoreapp2.0. I have simple appsettings.json { "logPath":"C:\logs\myLog.log" } And it's logPath ok, if app will work on Windows platform, but i want also run it on linux. I know, that i can use…
Frank59
  • 3,141
  • 4
  • 31
  • 53
5
votes
2 answers

Ignore SSL certificate in .Net Standard 2.0

I am creating a Xamarin Cross Platform Application in it, I have replaced the Portable Class Library with .Net Standard 2.0. From this project we are making a call to web service hosted on azure service fabric cluster (this service is hosted using…
Shubham Awasthi
  • 159
  • 1
  • 13
5
votes
0 answers

How do I find the assembly files for the NuGet packages used to build a project that I have a project reference to?

My scenario is that I have a Code Generation tool that uses certain class library assemblies as input. In the past, I had a local "packages" directory that NuGet would copy referenced packages to, and I could use those to find the assemblies and run…
Jeremy Morton
  • 375
  • 2
  • 13
5
votes
2 answers

Using MSBuild, '$(SolutionDir)' resolves incorrectly to C:\ when running 'msbuild /t:restore'

I have foo.csproj, $(SolutionDir)\WpfNetStandardSample\CustomProjectSystem\
5
votes
2 answers

ReSharper intellisense for netcoreapp2.0 console app referencing netstandard2.0 lib

I installed visual studio 15.3 and the .net core 2.0 sdk today. I created a console application(netcoreapp2.0) with a project reference to a library(netstandard2.0). With ReSharper enabled I'm not getting any intellisense for types in the library.…
MeyC
  • 840
  • 1
  • 6
  • 11
4
votes
1 answer

EntityFrameworkCore and net48

I have a class library that offers some reusable sugar for EntityFrameworkCore, and it currently targets netstandard2.0;netstandard2.1. I have projects that reference this class library, most of which target netcore, but a few of which target…
Eric Patrick
  • 2,097
  • 2
  • 20
  • 31
4
votes
1 answer

NuGet packages in a .Net Standard 2.0 dll used by both .Net Framework and .Net Core

Setup Say I have a .Net Standard 2.0 class library project and I add a Nu NuGet package that is compatible with .Net Standard 2.0 to it. I then reference that class library project from both a .Net Framework console project and a .Net Core console…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
4
votes
1 answer

How to create X509Certificate2 with PrivateKey in .NET Standard 2.0/Core 2.1?

We are generating some self-signed certificates for testing using BouncyCastle, but the code throws an exception when we try to add a private key to the certificate. Here's the code in question: private static X509Certificate2…
wlyles
  • 2,236
  • 1
  • 20
  • 38
4
votes
1 answer

.Net assembly binding referencing issue

I have a .NetStandard 2.0 project called AB which is referencing projects A and B. Project A is a .Net Standard2.0 which requires System.ComponentModel.DataAnnotation which is coming from System.ComponentModel.Annotations, Version=4.2.0.0,…
daregazi
  • 65
  • 9
4
votes
0 answers

How to implement IServiceCollection DI to ASP.NET Framework 4.7.2

I have an old MVC Application which is written in Framework 4.7.2 and I have to use a Service which is already on .NET Standard 2.0. I try to use dependency injection and from a .NET Core project I can register this ServiceCollection in the startup…
4
votes
1 answer

Why does my C# project file have no Compile Inlcude elements for source files

I ported a library targeting the .NET Framework to a .NET Standard 2.0 library. The two project files (.NET Framework library and the .NET Standard library) are in the same folder and share most of the source code. Everything is working…
4
votes
1 answer

Nuget Hell: Cannot reference NuGet package in UWP application due to public key difference

I have a UWP app and a bunch of NETStandard 2.0 libraries. The libraries contains a lot of logic and communication interfaces that I am using in ASP.NetCore and Desktop WPF applications, so I am not going to change them. I use NuGet packages in the…
Daniel Leiszen
  • 1,827
  • 20
  • 39
4
votes
1 answer

Can I use PowerShell class in .Net Standard library to use in .Net Framework project (exe)

I am trying to create a .net standard 2.0 library that calls PowerShell commands and scripts using PowerShell classes (System.Management.Automation). I want to use this .Net Standard library in .Net Framework (4.7.2) project. I have already tried…
Mark
  • 75
  • 1
  • 8