使用 TeamCity 设置 Orchard 项目的部署

发布于 2024-11-09 03:57:43 字数 411 浏览 3 评论 0原文

我们使用 teamcity 来部署我们的几个项目。我正在尝试设置果园项目的部署,目前遇到了一些问题。

我有 teamcity 项目构建并通知成功和失败的构建。当我添加部署步骤并运行它时,出现以下错误:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3460, 5):错误 MSB4044:未给“ConcatFullServiceUrlWithSiteName”任务赋值对于所需参数“SiteAppName”。

我不知道是否只是我没有正确配置构建步骤,或者果园是否有问题。有人成功从 TeamCity 部署 Orchard 项目吗?您能帮助阐明这个问题吗?

We use teamcity to deploy several of our projects. I'm attempting to setup the deploy of an orchard project, and I'm currently running into some issues.

I have the teamcity project building and notifying of successful and failed builds. When I add a deploy step and run it, I get the following error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets(3460, 5): error MSB4044: The "ConcatFullServiceUrlWithSiteName" task was not given a value for the required parameter "SiteAppName".

I can't tell if it's just me not configuring the build step properly, or if it has trouble with orchard. Has anyone has success deploying orchard projects from TeamCity, and can you help shed some light on this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

朕就是辣么酷 2024-11-16 03:57:43

我遇到了同样的问题,并通过转到 Visual Studio 项目设置中的“发布/打包 Web”选项卡并在“IIS 网站/应用程序名称”下指定 IIS 网站名称来修复该问题在目标服务器上使用。。

您还可以将 DeployIisAppPath 指定为 TeamCity 中的 MS 构建参数。

I had the same problem and fixed it by going to the 'Publish/Package Web' tab in the Visual Studio project settings and specifying the IIS Website name under 'IIS Web site/application name to use on destination server'.

You can also specify DeployIisAppPath as an MS build arguement in TeamCity.

埋葬我深情 2024-11-16 03:57:43

在项目文件设置中设置以下参数对我有用。

默认网站/MySampleWebSite

Setting the following parameter in the project file settings worked for me.

Default Web Site/MySampleWebSite

溺ぐ爱和你が 2024-11-16 03:57:43

我将其添加到 csproj 文件(使用文本编辑器手动编辑)

  <PropertyGroup> ...
   <DeployIisAppPath>mysite</DeployIisAppPath>
  </PropertyGroup>

并解决了错误...

I added this to the csproj file (manual edit using a text editor)

  <PropertyGroup> ...
   <DeployIisAppPath>mysite</DeployIisAppPath>
  </PropertyGroup>

and that took care of the error...

謸气贵蔟 2024-11-16 03:57:43

我没有运气使用 Visual Studio 2010 一键发布来部署 Orchard CMS。 *.targets 文件确实存在一些问题。

我认为它应该发布的方式是使用 Orchard.proj 文件。它拥有生成正确的 Web 部署包所需的一切:
当您调用 msbuild /t:Build Orchard.proj 时,它会编译所有内容,将适当的文件放置在临时文件夹中的适当位置,然后生成 ~\artifacts\MsDeploy\Orchard.Web.zip< /代码>。
该包已准备好部署。您可能需要根据您想要完成的任务来编辑 manifest.xmlparameters.xml。对于 Orchard.proj 来说也是如此:您可能希望在那里启用一些禁用的模块等。

我还将发布示例 msdeploy 脚本:

deploy.cmd:

@echo off
set site=sitename.com
set user=iis_manager_login
set pass=password
set host=wmsvc='https://hosting.provider.com:8172/msdeploy.axd?site=%site%',userName='%user%',password='%pass%',authtype='Basic'
set cmd=-allowUntrusted -verbose
echo on

::This command puts app_Offline.htm to web application root, asp.net will
::automatically shut down instantly. My hosting provider does not let me use
::recycleApp Provider anyway. I am also not able to use filePath Provider.
::That's why I use contentPath.
msdeploy -verb:sync -source:contentPath='%CD%\lib\msdeploy\app_Offline.htm' -dest:contentPath="%site%\app_Offline.htm",%host% %cmd%

::This is the main deploy command. It will apply every provider listed in
::manifest.xml, applying changed written in parameters.xml.
::It will also skip Media, Settings.txt and app_Offline.htm itself.
::Without skip directive, it would all get removed.
::Deploy will try to delete folders that do not exist in Orchard.Web.zip
::You might have a need to add something like
::<WriteLinesToFile File="$(StageFolder)\App_Data\Sites\Default\_placeholder.txt" Lines="some_text" Overwrite="true"/>
::to your Orchard.proj
msdeploy -verb:sync -source:package='artifacts\MsDeploy\Orchard.Web.zip' -dest:auto,%host% -setParam:name='Application Path',value='%site%' -skip:File='%site%\\App_Data\\Sites.*Settings.txt' -skip:File='%site%\\app_Offline.htm' -skip:Directory='%site%\\Media' %cmd%

::Remove app_Offline.htm, now your site can start up.
msdeploy -verb:delete -dest:contentPath="%site%\app_Offline.htm",%host% %cmd%

可能 这篇博文可能会有所帮助。

I had no luck deploying Orchard CMS using Visual Studio 2010 1-click Publish. It indeed had some problems with *.targets file.

I think the way it should be published is using Orchard.proj file. It have everything needed to generate proper web deployment package:
When you call msbuild /t:Build Orchard.proj, it compiles everything, places proper files at proper locations in temp folders and then generates ~\artifacts\MsDeploy\Orchard.Web.zip.
This package is ready to be deployed. You might want to edit manifest.xml and parameters.xml depending on what you want to get done. Same for Orchard.proj: you might want to enable some of disabled modules there etc.

I'm also going to post sample msdeploy script while i'm at it:

deploy.cmd:

@echo off
set site=sitename.com
set user=iis_manager_login
set pass=password
set host=wmsvc='https://hosting.provider.com:8172/msdeploy.axd?site=%site%',userName='%user%',password='%pass%',authtype='Basic'
set cmd=-allowUntrusted -verbose
echo on

::This command puts app_Offline.htm to web application root, asp.net will
::automatically shut down instantly. My hosting provider does not let me use
::recycleApp Provider anyway. I am also not able to use filePath Provider.
::That's why I use contentPath.
msdeploy -verb:sync -source:contentPath='%CD%\lib\msdeploy\app_Offline.htm' -dest:contentPath="%site%\app_Offline.htm",%host% %cmd%

::This is the main deploy command. It will apply every provider listed in
::manifest.xml, applying changed written in parameters.xml.
::It will also skip Media, Settings.txt and app_Offline.htm itself.
::Without skip directive, it would all get removed.
::Deploy will try to delete folders that do not exist in Orchard.Web.zip
::You might have a need to add something like
::<WriteLinesToFile File="$(StageFolder)\App_Data\Sites\Default\_placeholder.txt" Lines="some_text" Overwrite="true"/>
::to your Orchard.proj
msdeploy -verb:sync -source:package='artifacts\MsDeploy\Orchard.Web.zip' -dest:auto,%host% -setParam:name='Application Path',value='%site%' -skip:File='%site%\\App_Data\\Sites.*Settings.txt' -skip:File='%site%\\app_Offline.htm' -skip:Directory='%site%\\Media' %cmd%

::Remove app_Offline.htm, now your site can start up.
msdeploy -verb:delete -dest:contentPath="%site%\app_Offline.htm",%host% %cmd%

Probably this blog post can be helpful.

原来是傀儡 2024-11-16 03:57:43

使用竹子使我的部署自动化时遇到了同样的错误。就我而言,我有两个项目:一个 Web 应用程序项目和一个 Web 应用程序所依赖的类库。当我使用 msbuild 部署命令行 类库依赖项将构建并因缺少 SiteAppName 错误而失败(查看诊断日志,它似乎正在尝试部署我的类库)。

为了解决这个问题,我首先结束了构建整个项目,然后通过将 /p:BuildProjectReferences=false 添加到 msbuild 部署命令行来运行 msbuild 部署,而不重建类库。

Ran into the same error getting my deployments automated using bamboo. In my case I have two projects a web application project and a class library that the web application depends on. When I ran the deployment using the msbuild deployment commandline the class library dependency would build and fail with the missing SiteAppName Error (Looking at the diagnostic logs it appears to be trying to deploy my class library).

To get around the problem I ended building the entire project first and then running the msbuild deployment without rebuilding the class library by adding /p:BuildProjectReferences=false to the msbuild deployment commandline.

美煞众生 2024-11-16 03:57:43

我发现了问题,我们没有为 Web 服务器上的部署用户正确设置一些权限。我能够给用户正确的

I found the problem, we had some permissions not correctly set for the deploy user on the web server. I was able to give the user correct

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文