dotnet-cli

MSTest no xml output on .NET Core RC2

醉酒当歌 提交于 2019-12-23 12:32:45
问题 I'm targeting dotnet-test-mstest": "1.0.1-preview on dotnet core rc2 in my test project. Edit: Okay. I'm targeting the the desktop .NET. But this should not make any difference. project.json { "version": "1.0.0-*", "testRunner": "mstest", "dependencies": { "Betgame": "1.0.0-*", "dotnet-test-mstest": "1.0.1-preview", "MSTest.TestAdapter": "1.0.0-preview", "MSTest.TestFramework": "1.0.0-preview", "NETStandard.Library": "1.5.0-rc2-24027" }, "frameworks": { "net461": { } } } output when running

How to make ASP.NET Core RC2 app build on net46 framework with older third party dependencies

时光毁灭记忆、已成空白 提交于 2019-12-22 10:05:21
问题 I have a shiny new Asp.Net Core MVC App that references some older net45 libraries. Works fine with Asp.Net Core RC1 on full net45 framework. Migrating from Asp.NET Core rc1 to rc2 I have hit an obstacle that I don't know how to fix. The App is a ASP.NET Core App that using EF6, Autofac, Kendo.MVC and it needs to run on the full .Net 4.6 framework as there are references libraries that use WCF. In migrating from rc1 to rc2 I first update the NuGet.config feed to point to https://www.myget.org

Asp core wrong assembly redirect on publish

喜欢而已 提交于 2019-12-22 04:10:27
问题 When publishing my asp core project using visual studio a .config file is created alongside my executable. The .config includes a couple of bindingRedirect like this: <?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="6.0.0.0" newVersion="8.0.0.0" /> <bindingRedirect oldVersion=

Unable to build default ASP.Net Core Web Application (.NET Core) on Visual Studio Team Services using Hosted Agent

有些话、适合烂在心里 提交于 2019-12-22 03:48:09
问题 Having created a new ASP.Net Core Web Application (.Net Core) project in Visual Studio 2015 Update 3 and checked this in to a Visual Studio Team Services git repository. I am using the release version of .Net Core and ASP.Net Core. I am now trying to build this using the VSTS Build system using a build definition based on this guide: https://www.visualstudio.com/en-us/docs/build/apps/aspnet/aspnetcore-to-azure However, the build fails on the dotnet restore step with the log shown below (first

Excluding File From Publish Directory in VS 2017 .NET Core Project

依然范特西╮ 提交于 2019-12-21 07:57:16
问题 I have a .gitignore file in the wwwroot folder of my project that I am trying to exclude from being published. The following code does not seem to work: <ItemGroup> <Content Include="wwwroot\.gitignore"> <CopyToPublishDirectory>Never</CopyToPublishDirectory> </Content> </ItemGroup> When I publish the project using the dotnet publish command, the .gitignore file is still found in the output directory. 回答1: You have to use Update like so: <Content Update="wwwroot\.gitignore">

Convert a project.json to a csproj without using Visual Studio

旧街凉风 提交于 2019-12-21 07:08:15
问题 As of preview3 dotnet new produces a csproj, and both dotnet restore and dotnet build fail against a project.json and/or an xproj. For instance, running dotnet restore against a directory that has both a project.json and an xproj gives this error. ...xproj(7,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-preview3-004056\Extensions\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that

“The library 'hostpolicy.dll' required” if run from deploy folder, but emitEntryPoint is true

梦想与她 提交于 2019-12-19 07:48:47
问题 I created a Web API project using the default ASP.NET Core Web Application (.NET Framework) template and then published to local folder using VS. Now if I call dotnet application.exe in the console, I receive the following error: A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found I have found in this answer and this issue on github, that the actual problem is a missing emitEntryPoint property. All is fine, except that my project.json

Relationship between the dotnet cli and the new vs2017 msbuild

只谈情不闲聊 提交于 2019-12-17 22:05:01
问题 With the move from project.json to the new csproj format introduced with VS2017, I'm struggling to understand the difference between the dotnet cli and the new msbuild and when to use one over the other. 1) To build a new csproj netstandard library from the command line, should I be calling the dotnet cli (for example dotnet restore dotnet build ) or use msbuild (for example msbuild ExampleNetstandard.sln ). 2) Also, my understanding is that there are two versions of msbuild , one built on

'dotnet build' error after migrating dotnetcore project to 1.0.4

送分小仙女□ 提交于 2019-12-12 09:47:40
问题 I've been trying to run the dotnet build command on a migrated .net core project (from 1.0.0-preview2-003131 to 1.0.4). I followed the steps for migrating the project mentioned here, and the solution builds using Visual Studio 2017. However, using the dotnet CLI command 'dotnet build' gives me the following error: C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(2867,5): error MSB4216: Could not run the "GenerateResource" task because MSBuild could not create or

ASPNET Core pre-RC2 dependency ambiguity

别来无恙 提交于 2019-12-11 01:05:19
问题 I am using: .NET Command Line Tools (1.0.0-rc2-002439) Product Information: Version: 1.0.0-rc2-002439 Commit Sha: ef0c3b2cee Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x64 and getting: error CS0121: The call is ambiguous between the following methods or properties: 'Microsoft.Extensions.DependencyInjection.OptionsServiceCollectionExtensions.Configure(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.Action)' and 'Microsoft