Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extending deploy parameterization in a light switch application

I'm using MSDeploy to change the web.config of my service at deployment time. This works great except that now I'm developing a Lightswitch app which generates its own parameters.xml file. So while I can configure the Lightswitch specific parameters at deploy time I haven't figured out a way to inject my own parameters. I can of course modify the parameters.xml after publishing. Is there a more straight forward way to tell Lightswitch to include my parameters?

like image 721
DubiousPusher Avatar asked Sep 18 '14 22:09

DubiousPusher


1 Answers

In a standard ASP.NET web application project you can simply add a parameters.xml file to your project and it will be used instead of the generated file. I would expect LightSwitch to support this as well but the following blog post from 2011 suggests it doesn't work.

http://blog.pragmaswitch.com/?p=120

Maybe this has been fixed in more recent versions of VS/MSBuild. I would try this first.

The previous blog suggests modifying the parameters.xml file in the package as a workaround.

You could also add parameters using the MSDeploy.exe settings declareParamFile or declareParam

http://technet.microsoft.com/en-us/library/dd569084(v=ws.10).aspx

Hope this helps!

like image 166
chief7 Avatar answered Nov 20 '22 22:11

chief7