web deploy package not picking up parameters.xml when using latest csproj format

风格不统一 提交于 2019-12-08 07:53:23

问题


I have a project which is being updated to use the new .csproj format. We used to use the following msbuild arguments:

msbuild Logging.sln /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="C:\Source\webdeploy"

Which created a .zip web deploy package. In the top level of this folder was parameters.xml, which is a copy of a custom parameters.xml from the project being built.

Since moving to the new .csproj format, the .zip is still being created, but the parameters.xml file inside the .zip is incorrect. I'm not sure where it comes from, but it just looks like a default file:

<parameters>
  <parameter name="IIS Web Application Name" value="Default Web Site" tags="IisApp">
    <parameterEntry kind="ProviderPath" scope="IisApp" match="^C:\\Source\\Repos\\Logging\\src\\Handler\\obj\\Debug\\net461\\win7-x86\\PubTmp\\Out\\$" />
  </parameter>
</parameters>

Is there a way to force msbuild to use the custom parameters.xml file?

EDIT: It looks as though there is a "declareParamFile" argument (https://technet.microsoft.com/en-us/library/dd569089(v=ws.10).aspx) you can pass into msdeploy - but not sure how to pass this through msbuild into msdeploy.


回答1:


Not sure why its not picking up you parameters.xml file, but you can pass a custom file with the ProjectParametersXMLFile property - /p:ProjectParametersXMLFile="c:\parameter.xml".



来源:https://stackoverflow.com/questions/46078706/web-deploy-package-not-picking-up-parameters-xml-when-using-latest-csproj-format

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