开发者

VS2010, MSDeploy and declaration of parameters

开发者 https://www.devze.com 2022-12-28 09:25 出处:网络
I\'m trying to deploy an ASP.NET MVC 2 app using MsDeploy. I use VS2010 to generate the package as a ZIP. Inside that ZIP is a parameters.xml file that declares the parameters that I can set.

I'm trying to deploy an ASP.NET MVC 2 app using MsDeploy. I use VS2010 to generate the package as a ZIP. Inside that ZIP is a parameters.xml file that declares the parameters that I can set.

I want to be able to set more parameters, using the auto-generated deploy.cmd file like this:

MySite.deploy.cmd 
    "-setParam:name='IIS Web Application Name',value=MySite" 
    "-setParam:name=IisVirtualDirectoryPhysicalPath,value=C:\inetpub\MySite" 
    "-setParam:name=httpBinding,value=*:80:www.mysite.dk"

That works fine, except for the httpBinding param. That is because that parameter is not declared inside the parameters.xml file that is added to the ZIP container.

I could go and add that parameter declaration manually, but isn't there a way to do it from the command line a开发者_如何学Cnd have it declare parameters I have in another XML file?


Are you saying that the value param was not declared when the package was created? If so then I think you would have to add it. Either manually or you can use the -setParam switch and sync the package from and to itself. If you use -setParam with a name which was never declared as a param to begin with I'm pretty sure that value is just ignored.


I'm only just looking at this, but is the section on MSDN about the matching of declareParam with setParam the way to go ?

I'm using MsDeploy to update my deployment zip following the idea in this stackoverflow post

Apologies if I'm completely off on this

0

精彩评论

暂无评论...
验证码 换一张
取 消