2016-05-23 79 views
4

我在构建服务器上没有Visual Studio。 After migrating from DNX (RC1) to .NET Core CLI (RC2) my build on TeamCity broke无法在构建服务器上发布ASP.NET Core 1.0 RC2应用程序

确保我已经从我的电脑复制的MSBuild目标,以构建服务器后:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet 

我能来构建解决方案。

问题是:我无法发布它!

当我运行:MSBuild.exe Solution.sln /p:DeployOnBuild=true /p:publishprofile=local它将失败:

C:\ Program Files文件(x86)的\的MSBuild \微软\ VisualStudio的\ v14.0 \ DOTNET的\ Microsoft.DotNet.Publishing.targets(406, 5):错误:发布期间发生错误。 [d:\ path \ project.xproj] C:\ Program Files(x86)\ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Publishing.targets(406,5):error:Can bind argument参数'路径',因为它是一个空字符串。 [d:\路径\ project.xproj]

我已经重新创建发布轮廓与Visual Studio(产生的PowerShell脚本是一个比与RC1不同)

的发表作品罚款本地,我已经安装了Visual Studio。

的问题是:

什么我需要添加到构建服务器,能够与/p:DeployOnBuild=true /p:publishprofile=运行的MSBuild,而无需安装Visual Studio

感谢

回答

0

我并不标志着以此为答案,因为我仍然希望能为的答案,而是要帮助别人谁卡住了像我这样的:

我做了什么至今:

project.json有:

"publishOptions": { 
    "include": [ 
     "appsettings.json", 
     "hosting.json", 
     "web.config" 
    ] 
    }, 
    "scripts": { 
    "postpublish": [ 
     "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:project.Bla%" 
    ] 
    }, 

构建步骤:

  1. DOTNET的解决方案目录恢复
  2. MSBuild的解决方案
  3. DOTNET发布具体项目目录

e.g:

d:\project\Project.Bla>dotnet publish -c Release 
Publishing Project.Bla for .NETFramework,Version=v4.5.2/win7-x64 
Project Project.Bla (.NETFramework,Version=v4.5.2) was previously compiled. Skipping compilation. 
Project Project.Ble (.NETFramework,Version=v4.5.2) was previously compiled. Skipping compilation. 
... 
Configuring the following project for use with IIS: 'd:\project\Project.Bla\bin\Release\net452\win7-x64\publish' 
Updating web.config at 'd:\project\Project.Bla\bin\Release\net452\win7-x64\publish\web.config' 
Configuring project completed successfully 
publish: Published to d:\project\Project.Bla\bin\Release\net452\win7-x64\publish 
Published 1/1 projects successfully 
相关问题