.net-standard

What is the difference between .net Core multi target and .net Standard?

淺唱寂寞╮ 提交于 2019-12-13 23:22:34
问题 .Net Standard is used to can be use the same library in different type of projects, such as WPF, xamarin, UWP... etc. .Net Core can't by default, but there is the possibility to configure the multi target in .net Core editing the csproj file, so I can set multiple targets. In one test that I have done, if I set as target net47, I can use this .net Core library in my WPF project. So if I can do the same with .net Core multi target and with .net standard. What are the differences and when to

from net471 to .NET Standard noob questions [closed]

故事扮演 提交于 2019-12-13 09:32:15
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I have a very old VB project I am looking to modernize to which I created a new solution (will convert code to C# later on), am re-adding the libraries and web projects to the new solution to eliminate the old project having old .publishproj, references to mscorlib 2.0 (despite best

Xamarin.Forms How to switch pages using MVVMLight

白昼怎懂夜的黑 提交于 2019-12-13 08:15:15
问题 I'm currently working on a Xamarin.forms project using .NET Standard as code sharing strategy. I try to use the MVVM pattern by using the MvvmLightLibsStd10 library. I already successfully setup the MVVM structure by using this tutorial: https://www.linkedin.com/pulse/build-xamarinforms-net-standard-mvvm-light-app-rafael-carvalho I can't use Navigation.PushAsync(new Page()); because it only works in code behind and not in the ViewModel. I already tried to Pass Navigation trough the VM

Visual Studio 2017 Won't run Custom Tool in .NET Standard Library

独自空忆成欢 提交于 2019-12-12 20:27:16
问题 I'm porting all my development to Visual Studio 2017. I made heavy use of Portable Libraries in 2015, but it appears that .NET Standard is the way to handle cross-environment issues going forward. I've got a single file code generation extension that I've upgraded. In Visual Studio 2017, it works great against the traditional .NET libraries and portable libraries, but it doesn't work with the new .NET Standard library I'm trying to build. I'm happy to consider that I've done something wrong,

X509Certificate2 fails to parse on Linux but works on Windows

别等时光非礼了梦想. 提交于 2019-12-12 19:36:33
问题 Creating a X509Certificate2 instance from a byte array works on Windows but fails on Linux with a "CryptographicException". static void Main(string[] args) { var cert = new X509Certificate2(Cert.CertBytes); } On Windows: Valid X509Certificate2 instance is created On Linux: An exception is thrown: {System.Security.Cryptography.CryptographicException: Cannot find the original signer. at Internal.Cryptography.Pal.PkcsFormatReader.TryReadPkcs7(SafePkcs7Handle pkcs7, Boolean single,

How to convert BouncyCastle X509Certificate to .NET Standard X509Certificate2 while retaining the private key?

落爺英雄遲暮 提交于 2019-12-12 14:19:12
问题 I need to convert a generated BouncyCastle X509Certificate to X509Certificate2 with the private key getting loaded in the resulting .NET Standard X509Certificate2 object. Is that possible? There is an answer for a similar question https://stackoverflow.com/a/8150799/5048935 , but after generating a BouncyCastle certificate and converting it to .NET X509Certificate2 the resulting object has its HasPrivateKey property set to "false". Context I need to load a certificate and a private key

AWS RedShift - .NET Core (ODBC Support?)

自古美人都是妖i 提交于 2019-12-12 12:13:28
问题 How can I connect and run queries against AWS RedShift using .NET Core? Code sample please. I have gone through the AWS docs and .Net Core docs but no luck. 回答1: This answer is one for a particular point in time and won't age well... The EntityFramework Core project is the one I'd keep the closest eye on. The lack of ODBC is well known, especially for those who want to connect to Oracle. For the time being, you may need to fork an Oracle client for .NET core and make modifications as

Interface in .NETStandard 1.1 library does not have implementation in .NET 4.61

北城以北 提交于 2019-12-12 10:42:57
问题 I'm defining an interface in a .NETStandard library that is a factory for a HttpClient instances: namespace Ofl.Net.Http { public interface IHttpClientFactory { Task<HttpClient> CreateAsync(HttpMessageHandler handler, bool disposeHandler, CancellationToken cancellationToken); } } The <FrameworkTarget> element in the .csproj file is set to netstandard1.1 ( HttpClient requires 1.1). .NETStandard.Library 1.6.1 is referenced by default (although not explicitly specified in the .csproj file). In

A solution needed for referencing Nuget packages from projects in the same solution

眉间皱痕 提交于 2019-12-12 09:55:38
问题 I have a single solution full of projects that are to be shared amongst my organization as general nuget packages. The solution is encompassed by one git repository and we have TeamCity running our builds for us, although we are not overly advanced in that we manually kick off the Teamcity builds when we are ready to generate/publish a new Nuget package for a given project in the solution, every project has its own TeamCity build configuration. When built, the projects generate nuget packages

NET Standard library refer .NETCore

随声附和 提交于 2019-12-12 06:05:36
问题 I am new to the Microsoft Core world and wanted create a class library that targets the .NET standard. I was using the Visual Studio IDE 2017 and picked a class library project template listed under .NET Standard . When I expand the SDK on the .NET standard project structure, I could see Microsoft.NETCore.Platform 1.1.0 as reference. As per my understanding, .NET Core, .NET Framework, Mono, Universal Windows Platform, etc. uses .NET Standard and not other-way around. Please correct me.