.net-standard

VS 2017 RC : I Can not update NETStandard.Library in Nuget

眉间皱痕 提交于 2019-12-22 01:43:10
问题 From the last (or maybe the two last) update, I can't update the package NETStandartLibrary in Nuget. I just create a new standard library project. See this message : In project's properties, the version is different : And in the .csproj : <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard1.4</TargetFramework> </PropertyGroup> </Project> In Nuget, I add the dependency 'Microsoft.EntityFrameworkCore', then I got the warning : Warning Detected package downgrade:

How to tell if a class is supported by .Net Standard Library?

泄露秘密 提交于 2019-12-21 21:06:25
问题 My current specific situation is that I want to use DataContractSerializer Class in a library supporting .NETStandard1.3. I am unable to reference it in the library. The document gives me an impression that it is a part of .Net Standard Library. Could you anyone offer a tip on how to determine if a class is supported by .Net Standard Library? 回答1: Your one-stop shop for all .NET-based APIs .NET API Browser select .Net Standard select version Enter your search: DataContractSerializer You find

How Do You Reference a .NET Standard Library from a .NET Framework 4.5 Console Application in Visual Studio 2017?

血红的双手。 提交于 2019-12-21 06:47:28
问题 I have finally installed Visual Studio 2017.2 and am trying to get my first project working, but am running into some trouble that I hope to address here. I have a very simple .NET Standard Library described as the following project file: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard1.6</TargetFramework> </PropertyGroup> </Project> And a very simple .NET Framework console application that references the above .NET Standard library, and is described as the

Xamarin.iOS project: CS1703: Multiple assemblies with equivalent identity have been imported

≡放荡痞女 提交于 2019-12-21 04:28:19
问题 I've got a cross platform (iOS and Android) Xamarin solution using .NET Standard 2.0. The solution is being built by Visual Studio 2017 (I've tried both the current and preview versions). The Forms and Android projects build fine. However, the iOS fails to build, with the following error: 1>CSC : error CS1703: Multiple assemblies with equivalent identity have been imported: 'C:\Users\newuser.nuget\packages\system.reflection.emit\4.3.0\ref\netstandard1.1\System.Reflection.Emit.dll' and 'C:

What are .NET Platform Extensions on docs.microsoft.com?

我怕爱的太早我们不能终老 提交于 2019-12-21 03:09:46
问题 There is a framework-level navigation element at Microsoft Docs called ".NET Platform Extensions". It contains docs on recently added APIs like System.IO.Pipelines and System.Threading.Channels for example, as well as a whole bunch of other APIs, including the not-so-recent ones. Some APIs from this collection are available as nuget packages (for both .Net Core and .Net Framework), but others are not seemingly available. Also, as of now, there is no nuget package called ".NET Platform

Migrating .NET Framework 4.6.2 to .NET Standard 2.0

放肆的年华 提交于 2019-12-19 19:45:07
问题 We have a set of class libraries which are created under.NET Framework 4.6.2, we want to move these libraries into .NET Core 2.0 or .NET Standard 2.0 We have the following ways, Create a new project and copy over the code. Convert your existing project by editing the CSPROJ file. Which one is better to migrate the libraries and will .NET Standard impact on performance over the the .NET core. Is there any alternatives to migrate these collections. 回答1: I think there might be a misunderstanding

Using Microsoft.AspNetCore.All package in netstandard

℡╲_俬逩灬. 提交于 2019-12-19 05:23:23
问题 At the moment I'm porting an asp web api to .Net Core. The api uses a Class library which provides some implementations of the ActionFilterAttribute class. So I have to port this class library as well. When I tried to add the nuget package Microsoft.AspNetCore.All to the class library I recived this error: Package Microsoft.AspNetCore.All 2.0.0 is not compatible with netstandard2.0 When I change the target framework to netcoreapp2.0, I'm able to install the package, but of course I need an

WSHttpBinding in .NetStandard or .NET core

南笙酒味 提交于 2019-12-19 03:15:35
问题 I want to integrate NMVS protocol in my application which is providing wsdl files for testing which is written sample code in .net framework library. I want to test it in .netstandard, .netcore or UWP app but wsdl files only support to "WSHttpBinding" which is not supported in .netstandard, .net core and UWP. <wsdl:binding name="WSHttpBinding_ISinglePackServices" type="ns:ISinglePackServices"> WSHttpBinding binding = new WSHttpBinding(); binding.Security.Mode = SecurityMode.Transport; binding

Error while reading json file in dotnet core “the configured user limit (128) on the number of inotify instances has been reached”

泄露秘密 提交于 2019-12-19 00:07:33
问题 I have an console application (in dot net core 1.1) which is scheduled in cron scheduler for every 1 min. Inside the application there is call to configuration file. I'm attaching the code below. public static T GetAppConfig<T>(string key, T defaultValue = default(T)) { T value = default(T); logger.Debug($"Reading App Config {key}"); try { var environmentName = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); var builder = new ConfigurationBuilder() .AddJsonFile($"appsettings

Is There a Way to Force a Project Reference to .NET Standard Project to a Specific TargetFramework

╄→尐↘猪︶ㄣ 提交于 2019-12-18 15:03:56
问题 I am a contributor to a GitHub project, and recently we had some trouble with our .NET Standard 2.0 project installing correctly into a .NET Framework 4.5 project. The cause of this is that (if I am understanding correctly) .NET Standard 2.0 supports a minimum .NET Framework of 4.6.1. OK, fair enough. So we updated the .csproj to create another framework output: <TargetFrameworks>netstandard2.0;net45</TargetFrameworks> In our testing project, the supported frameworks are defined as such: