Strange PackageTmp when create deploy package with msdeploy in asp.net mvc project

蓝咒 提交于 2021-02-07 10:30:44

问题


I have the following path to my asp.net (with mvc) project:

D:\testAppMvc\testAppMvc.sln

I have installed msdeploy from here (no settings were made).

In Visual Studio 2010, right click on project-> Build Deployment package. Until now is ok.

If I open the ZIP package I see the strange path to my project necessary files for IIS.

\Content\D_C\testAppMvc\obj\Debug\Package\PackageTmp\

Are there any way to change that path for deploy source files or it is unchangeable ?


回答1:


I think you need to set this in your project file:

<!-- Must be after Microsoft.WebApplication.targets import -->
<PropertyGroup>
  <_PackageTempDir>C:\Package</_PackageTempDir>
</PropertyGroup>



回答2:


Note that "right click on project->Build Deployment package" in Visual Studio 2010 has become "right click on project->Publish..." in Visual Studio 2013.

How to: Deploy a Web Application Project Using a Web Deployment Package on MSDN provides details on publishing a deployment package in VS 2013.

To publish a deployment package in VS 2013, I created a custom publish profile named Local Package, then chose the Web Deploy Package publish method - screenshots below:

VS 2013 Web Publish - Profile

VS 2013 Web Publish - Connection



来源:https://stackoverflow.com/questions/11946741/strange-packagetmp-when-create-deploy-package-with-msdeploy-in-asp-net-mvc-proje

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!