Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a slick way to deploy my silverlight app and change settings programmatically?

I am fairly new to web development. I am at the point of deployment (for testing). I have a few places (maybe 4 places) where I had to add a URI that was non-relative into the appliation. So now, at deployment, those need to be changed.

Is there a slick way of handling this? By slick I mean not manually going through the app and changing the URIs or a blanket find and replace (too risky). I only have 4 places to change now, but this could easily change and cause deployment issues.

I am using a Microsoft technology stack. Silverlight, ASP.NET, RIA, etc. Development is done in Visual Studio 2010.

I noticed that the web projects have a nifty transformation for the web.config...which is nice. Is there an equivalent mechanism for silverlight resources? Any other ways?

Any thoughts?

like image 972
Mike S. Avatar asked Nov 04 '22 02:11

Mike S.


1 Answers

I just found this post on stack overflow concerning using MS's built in transformation mechanism for service references. But in reality...it's generic for any XML file. Which means I was able to apply the same concepts to my custom XML file that held some settings...and it worked brilliantly.

See Randoms solution. It isn't the selected solution but it is far better than anything else I have seen.

like image 134
Mike S. Avatar answered Nov 09 '22 13:11

Mike S.