.net-standard

Why does my .NET Standard NuGet package trigger so many dependencies?

微笑、不失礼 提交于 2019-11-26 21:59:08
I've been mucking about with a .NET Standard project and NuGet. I've got a working project and have uploaded it to NuGet.org . My project targets .NET Standard 1.3, which should support .NET Framework 4.6 and .NET Core 1.0. But when I tried to add my project (via NuGet) to a fresh .NET Framework 4.6 project, the dependencies resolved to 47 packages! They're all system libraries and appear to be dependencies of either Microsoft.NETCore.Platforms or NETStandard.Library 1.6.1. ( Gist of full PM output. ) My project only imports ( using ) a handful of libraries, none of which I added manually; i.e

Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.1.0.0

白昼怎懂夜的黑 提交于 2019-11-26 20:19:18
问题 I have a .NET Standard 1.4 class library that references the System.ComponentModel.Annotations (4.3.0) NuGet package. I'm then referencing this class library from a .NET Framework 4.6.2 test project. It builds fine, but at runtime I get the following error: System.IO.FileLoadException occurred HResult=0x80131040 Message= Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located

Convert .NET Standard class library to native aar/jar

自作多情 提交于 2019-11-26 15:30:39
Currently, we are developing a .NET Standard class library that will be used by different Xamarin.* platforms. I was wondering if there is a way to use the shared code in a native Android project (maybe produce an AAR/JAR file). The reason I need this functionality is because our company provides an AAR to one of our customers (that is used by a native Android project), and we would like to keep a single source base instead of two. Thanks in advance! Update: The name changed to ".NET Embedding" and it is at v0.4 at the time of this update. https://developer.xamarin.com/releases/dotnetembedding

.NET Standard vs .NET Core

孤街浪徒 提交于 2019-11-26 14:59:39
问题 I have read about the difference between .NET Standard and .NET Core, but I really don't know what the difference is, or when to choose a .NET Standard library project and when to choose a .NET Core library project. I have read that .NET Standard is to ensure that a set of APIs are always available, no matter the platform used (as long as that platform is compatible with the .NET Standard version that I have chosen). If I'm not mistaken, this means that I can create a class library of .NET

Auto Versioning in Visual Studio 2017 (.NET Core)

南笙酒味 提交于 2019-11-26 11:48:57
问题 I have spent the better part of a few hours trying to find a way to auto-increment versions in a .NETCoreApp 1.1 (Visual Studio 2017). I know the the AssemblyInfo.cs is being created dynamically in the folder: obj/Debug/netcoreapp1.1/ It does not accept the old method of: [assembly: System.Reflection.AssemblyFileVersionAttribute(\"1.0.0.*\")] If I set the project to package I can set versions there but this seems to be used to build the AssemblyInfo.cs file. My question is, has anyone figured

Convert .NET Standard class library to native aar/jar

此生再无相见时 提交于 2019-11-26 04:28:12
问题 Currently, we are developing a .NET Standard class library that will be used by different Xamarin.* platforms. I was wondering if there is a way to use the shared code in a native Android project (maybe produce an AAR/JAR file). The reason I need this functionality is because our company provides an AAR to one of our customers (that is used by a native Android project), and we would like to keep a single source base instead of two. Thanks in advance! 回答1: Update: The name changed to ".NET