.net-standard

Build Net Framework web application referencing net-standard library with Cake build

允我心安 提交于 2019-12-11 04:13:13
问题 I have two projects: NET Standard class library and regular NET Framework web application. Web application references class library. I use Visual Studio 2017 Preview . When I try to build the solution with Cake using MSBuild command I get the unsupported project message: error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the

Azure WebJob create with DotNet Core targeting Net Standard fails with error

大城市里の小女人 提交于 2019-12-11 03:18:10
问题 I have a dot net core console app that I want to run as a webjob in Azure. When it tries to execute I see in the logs Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.DotNet.InternalAbstractions', version: '1.0.0', path: 'lib/netstandard1.3/Microsoft.DotNet.InternalAbstractions.dll' My project.json looks like this { "buildOptions": { "emitEntryPoint": true, "copyToOutput": [ "appsettings.json", "run.cmd" ] }, "dependencies": { "Helga.Core": "1.0.0-*"

Can't inspect variables while debugging CLI project referencing .Net Standard Lib

こ雲淡風輕ζ 提交于 2019-12-11 02:08:27
问题 We are facing the same issue as this question asked on the visual studio community by Laurent: LINK. Problem: If we try to debug the C++/CLI project, all variables defined in .Net Standard library inspection fails with the message : Unable to resolve reference to type 'System::ValueType' in assembly 'System.Runtime'. When the project is compiled below warning is displayed: warning C4691: 'System::Object': type referenced was expected in unreferenced assembly 'netstandard', type defined in

Add a reference to a class library which target .NET standard 2.0 to a Xamarin PCL which targets .NET Standard 4.5

时光怂恿深爱的人放手 提交于 2019-12-11 01:03:45
问题 I am building a Xamarin application and I have my shared code in a PCL which targets the .NET 4.5 framework. I also have a library, which basically implements the service access layer of my Xamarin application in another library, which targets .NET standard 2.0. The problem is that when I try to reference the latter, Visual Studio gives me the following error: Project [Service access library] targets '.NETStandard,Version=v2.0'. It cannot be referenced by a project that targets '.NETPortable

Distribute custom MS Build Task with .NET Standard and VS 2017 via Nuget

纵饮孤独 提交于 2019-12-10 22:26:49
问题 I have a .NET Standard library (1.4) VS 2017 project that contains custom MS Build task (MyTask) that need to be distributed via Nuget package (Let's say MyCustomTask.dll and it contains MyTask and Portable.targets that will be imported by target project) This Nuget package with custom build task is then used by target .NET Standard (1.4) project cspro file to import the Portable.targets that invoke the Custom Build task. However, at this point I keep on getting the build error Could not load

Nuget Packager the default XML namespace of the project must be the MSBuild XML namespace in TFS 2017

♀尐吖头ヾ 提交于 2019-12-10 18:31:18
问题 I changed the project type I am packaging from .net framework v4.6 to .net standard 2.0, now the build definition is failing in Nuget packager step and I am getting this error message. [error]The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to

CS1703: In Xamarin.Droid, should I use the .Net Standard windowsruntime.dll located in Mono.Framework, or System.Runtime?

北城余情 提交于 2019-12-10 18:30:24
问题 I'm trying to build this Android Xamarin project, and am getting the compile time error: ./ResilientServices/ResilientServices.Droid/CSC: Error CS1703: Multiple assemblies with equivalent identity have been imported: ./ResilientServices/packages/System.Runtime.InteropServices.WindowsRuntime.4.0.1/lib/netstandard1.3/System.Runtime.InteropServices.WindowsRuntime.dll' and ./Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v1.0/Facades/System.Runtime.InteropServices

How to load a certificate with private key from PEM files in .NET standard

被刻印的时光 ゝ 提交于 2019-12-10 18:19:51
问题 I'm trying to load an X509Certificate2 from PEM files in a .NET standard library. I created a self-signed certificate using openssl like so: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj /CN=localhost -days 365 I loaded the resulting PEM files into embedded string resources within the project and am trying to load them with the following code: private X509Certificate2 GetCertificate() { try { byte[] pubPem = System.Text.Encoding.UTF8.GetBytes(Properties

How to Reference Microsoft.VisualBasic in a .Net Standard Class Library?

我是研究僧i 提交于 2019-12-10 16:55:36
问题 I am attempting to utilize some of the static classes in the Microsoft.VisualBasic name space in a .Net Standard 2.0 Class library (the Financial.Rate function specifically.) This is a C# project and the library contains various financial functions and calculations. I know that simply adding the using Microsoft.VisualBasic; is not enough since I need to reference the actual dll. But I am not sure how to do this in a .net Standard Class library. I have tried adding the NuGet Package Microsoft

Azure Function Structure

China☆狼群 提交于 2019-12-10 15:38:37
问题 I'm trying to wrap my head around how we're supposed to build Azure functions. I love the idea of building serverless, compact, single-function apps that respond to events. Here are the problems I'm running into: I have nice class libraries built in .NET Standard 2 that handle all my "backend needs" namely handling CRUD ops with Cosmos Db, Azure Table Storage, Azure SQL, Redis, Azure Storage. No matter what I did, I couldn't integrate these class libraries into an Azure Functions project.