Extending deploy parameterization in a light switch application
Asked Answered
C

1

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?

Cephalad answered 18/9, 2014 at 22:36 Comment(0)
I
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!

Ignorance answered 1/10, 2014 at 14:20 Comment(1)
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.Cephalad

© 2022 - 2024 — McMap. All rights reserved.