8

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?

DubiousPusher
  • 1,132
  • 2
  • 8
  • 19

1 Answers1

1

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!

chief7
  • 14,263
  • 14
  • 47
  • 80
  • Basically I never got this to work. As far as I can tell, the blog post was correct and I went for using a post deployment step to modify the parameters file. Shortly after we switched from using Lightswitch to straight Web API 2. – DubiousPusher Dec 16 '15 at 18:17