在构建服务器上构建.NET Core 1.0 RC2应用 [英] Building .NET Core 1.0 RC2 app on the build server

查看:87
本文介绍了在构建服务器上构建.NET Core 1.0 RC2应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将我的应用程序从DNX,ASP.NET 5 RC1更新到ASP.NET Core 1.0 RC2. 它可以在本地构建并正常运行.

I've updated my app from DNX, ASP.NET 5 RC1 to ASP.NET Core 1.0 RC2. Locally it builds and runs fine.

在构建服务器上,我没有安装Visual Studio,并且构建失败并显示:

On the build server, I don't have Visual Studio installed, and the build fails with:

错误MSB4019:找不到导入的项目"C:\ Program Files(x86)\ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Props".确认声明中的路径正确,并且文件在磁盘上.

error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

我确实安装了:适用于Windows的.NET Core SDK . 尝试安装VS 2015工具预览失败,并显示以下信息:

I did install the: .NET Core SDK for Windows. Trying to install the VS 2015 tooling preview fails with:

在无需安装Visual Studio 2015的情况下在生成服务器上生成.NET Core 1.0 RC2应用程序的正确设置是什么?

What would be the correct setup to build .NET Core 1.0 RC2 app on the build server without having to install Visual Studio 2015?

注意:构建框(TeamCity 9)可以对.NET 4.5和DNX进行良好的构建/运行测试.

Note: The build box (TeamCity 9) builds/runs tests fine for .NET 4.5 and DNX.

推荐答案

因此,在没有Visual Studio或Web Deploy的情况下,我的TeamCity构建由4个构建步骤组成:

So without Visual Studio or Web Deploy, my TeamCity build is comprised of 4 builds steps:

dotnet restore
dotnet build
dotnet test
dotnet publish -c Release

我运行

I run dotnet test on all projects with a basic for loop.

这篇关于在构建服务器上构建.NET Core 1.0 RC2应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆