.net-standard

'Could not load file or assembly 'netstandard, Version=2.0.0.0, …'. Reference assemblies should not be loaded for execution

强颜欢笑 提交于 2019-12-04 16:58:20
问题 Goal: From a .NET 4.7 console app, using reflection with Assembly.GetType(), I am trying extract the Type of a netstandard 2.0 class from Assembly X. Then I want to create an instance of this Type with Activator.CreateInstance(). What I am trying to do: However, this assembly X has a dependency to netstandard 2.0. To be able to get the Type, netstandard dependency has to be loaded into the AppDomain. That's why when the AppDomain is requesting the netstandard assembly through the

Referencing between NetStandard and .Net Framework

风格不统一 提交于 2019-12-04 09:19:34
I'm trying to get .Net Framework and NetStandard assemblies to communicate with each other (to learn what is possible). I currently have four projects, two Framework 4.5.2 projects and two NetStandard1.2 projects: Framework452.Library NetStandard12.CentralLibrary NetStandard12.BaseLibrary Framework452.Tests The referencing structure is: Framework452.Tests references NetStandard12.CentralLibrary : working by adding the NetStandard.Library nuget package to Framework452.Tests . NetStandard12.CentralLibrary references NetStandard12.BaseLibrary : working without modification. NetStandard12

When using .Net Standard 1.4 in a library and .Net framework 4.6.1 in and application, unable to load file System.IO.FileSystem, Version=4.0.1.0

为君一笑 提交于 2019-12-04 08:47:59
I have a solution that contains a library and 2 applications. The applications represent the same program, with one built to target the Windows App Store through UAP10 and the other built to target a Microsoft Windows PC using .Net Framework 4.6.1. I'm using Visual Studio 2017. I set the library project target .Net standard 1.4. I set the UWP application to target Windows 10 Aniversary Edition (10.0; Build 14393), Min version Windows 10 (10.0; Build 10586). I set the generic Windows application to target .Net Framework 4.6.1. The UWP version compiles and runs fine. Initially, the .Net

As of Visual Studio 2017 15.5.1, How Does One Create a Xamarin.Forms Project to Target Minimum Android KitKat (API 19) with PCL now obsolete?

∥☆過路亽.° 提交于 2019-12-04 06:25:28
I want to know how to create a Xamarin.Forms Project that targets minimum version of Android Kitkat (API 19), without using the Shared Project option. .Net Standard Library is not an option since the minimum supported Android version is Nougat . A large percentage of my target users (more than 40%) still uses phones with an Android version lower than Nougat. In Visual Studio 15.5.1 or greater, no PCL option is provided under the Code Sharing Strategy Section in creating a new Xamarin.Forms project when using the Cross-Platform App template. It was noted that PCL is now deprecated on Xamarin's

How should I create a library targetting .NET Framework 4.5.1 and .NET Standard 1.3 in VS 2017 RC?

我只是一个虾纸丫 提交于 2019-12-04 04:10:35
问题 This is my first time trying anything that targets more than just a .NET Framework. I can't seem to do it from the GUI. I've tried project type 'Class Library (Portable)' and project type 'Class Library (.NET Standard)'. I can change a 'Class Library (Portable)' to target .NET Standard but then I can't select anything else. I'm not sure if I should try to change the .csproj of 'Class Library (.NET Standard)' or the project.json of 'Class Library (Portable)', I just want whatever is most

UWP application: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.14.0

让人想犯罪 __ 提交于 2019-12-04 04:02:06
问题 I have a UWP application built using .Net Standard 1.4 using Xamarin I have recently upgraded a couple of my nuget plugins and my UWP project has started giving me the following error: "System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.14.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)\r\n" Now usually this is quite

Netstandard1.x Nuget packages cannot be installed for netstandard1.x projects

自闭症网瘾萝莉.ら 提交于 2019-12-03 22:44:19
After doing a fresh Windows 10 installation along with latest Visual Studio 2015, netcore, and nuget tooling - I can no longer install Nuget packages to any .netstandard projects. Here's some example output: Restoring packages for 'ClassLibrary1'. Restoring packages for c:\users\zone1\documents\visual studio 2015\Projects\ClassLibrary1\ClassLibrary1\project.json... Package System.ComponentModel.EventBasedAsync 4.0.11 is not compatible with netstandard1.3 (.NETStandard,Version=v1.3). Package System.ComponentModel.EventBasedAsync 4.0.11 supports: - monoandroid10 (MonoAndroid,Version=v1.0) -

.NET Standard API Reference

天涯浪子 提交于 2019-12-03 16:05:16
问题 UPDATE: So it seems to be an open issue now. So I guess until this is done I will have to rely on .NET Core API reference and pray I won't hit one of the 43 APIs that .NET Framework 4.6.1 doesn't support but are officially supposed to be... Also relying on .NET Core API reference and considering the same as .NET standard could be badly surprising. For example when I take a look at the namespace list I can see System.Drawing but when clicking on it, we then realize this is an almost empty

How to use WCF services in .netstandard with Xamarin.Forms project?

 ̄綄美尐妖づ 提交于 2019-12-03 14:46:34
I've created a Xamarin.Forms project with .netstandard 2.0 as PCL project. I'm trying to consume WCF services in that project. I've added the connected service for WCF service. When I'm trying to call any method provided in the service, it gives the error as below: System.ServiceModel.FaultException`1[[System.ServiceModel.ExceptionDetail, System.ServiceModel, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Error in deserializing body of request message for operation 'GetData'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with

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

空扰寡人 提交于 2019-12-03 14:18:17
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:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft