本文介绍了尝试使用TeamCity 8部署SSDT项目时无效的文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我正在尝试使用TeamCity 8和MSBuild Publish任务将Visual Studio 2012 SSDT项目部署到Sql Server,但部署失败。



当我查看TeamCity日志和在我的构建配置中使用/ v:diag开关我看到,由于未知原因MSBuild搜索 MyProject .sqlproj .publish.sql和 MyProject .sqlproj .dacpac文件。



确切的错误:

正确的.sql和.dacpac文件生成(在middel中没有.sqlproj)在buildAgent / work / identificator / * MySolu * / MyProject / bin / Debug文件夹。



我的TeamCity构建步骤配置如下:




  • 运行者类型:MSbuild

  • 构建文件路径:MyProject / * MyProject * .sqlproj

  • MSBuild版本:4.5

  • MsBuild ToolsVersion :: 4.0

  • 运行平台:4.0

  • 目标:发布

  • 命令行参数: / p:SqlPublishProfilePath =Debug.publish.xml/ p:Configuration = Debug



如果我从命令行执行,我没有收到错误。



任何有关如何配置TeamCity搜索正确文件或配置我的项目以生成TeamCity正在搜索的文件的任何想法。



或者是我计划使用MSBuild的发布任务无效,我应该使用 sqlpackage.exe



更新



花了差不多三天的时间试图弄清楚这一点,我放弃了我们ed sqlpackage.exe 它的工作方式就像一个魅力。
但是我仍然会对一个答案感兴趣,但是在构建服务器中传递可执行文件的路径似乎有点粗糙的方式来完成任务。

解决方案

我有一个类似的问题,得出结论,TeamCity以* .teamcity生成伪项目文件后缀在MSBuild / SSDT目标链中令人困惑。



我简单地用纯粹的命令行步骤替换了MSBuild的运行程序构建步骤,问题消失了。 >

我们失去了TeamCity MSBuild运行器配置的用户友好性,但如果它有效,这是我愿意做的妥协。



注意 - 我们正在运行TeamCity 7 - 我不知道这是否在以后的版本中得到解决。


I am trying to deploy Visual Studio 2012 SSDT project to Sql Server using TeamCity 8 and MSBuild Publish task but the deployment fails.

When I look at TeamCity logs and use /v:diag switch in my build configuration I see that for unknown reason MSBuild searches for MyProject.sqlproj.publish.sql and for MyProject.sqlproj.dacpac files.

The exact error:

The correct .sql and .dacpac files get generated (without the .sqlproj in the middel) in buildAgent/work/identificator/*MySolution*/MyProject/bin/Debug folder.

My TeamCity build step is configured as follows:

  • Runner type: MSbuild
  • Build file path: MyProject/*MyProject*.sqlproj
  • MSBuild version: 4.5
  • MsBuild ToolsVersion: 4.0
  • Run platform: 4.0
  • Targets: Publish
  • Command line parameters: /p:SqlPublishProfilePath="Debug.publish.xml" /p:Configuration=Debug

If I execute this from commandline I get no errors.

Any ideas on how can I configure TeamCity to search for correct files or configure my project to generate the files that TeamCity is searching for.

Or is my plan to use MSBuild's Publish task futile and I should utilise sqlpackage.exe instead?

UPDATE

After spending almost three days trying to figure this out I gave up and used sqlpackage.exe which works like a charm.But I would still be interested in an answer though, passing paths to executables in build servers seems a bit crude way to accomplish things.

解决方案

I had a similar issue and came to the conclusion that the way TeamCity produces "pseudo-project" files with *.teamcity suffixes is confusing something in the MSBuild/SSDT target chain.

I simply replaced the MSBuild runner build step with a pure Command Line step and the problem went away.

We lose the user friendliness of the TeamCity MSBuild runner configuration, but if it works, it's a compromise I'm willing to make.

Note - we are running TeamCity 7 - I am not sure if this has been addressed in later versions.

这篇关于尝试使用TeamCity 8部署SSDT项目时无效的文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 21:34