Copying package contents to web site directory fails

So, the deploy works great - very fast, no locks. But, I am struggling with the appsettings.json file. I have defined variables and added the JSON configuration feature, but something is no right. Also, there is a config file that also needs to be ‘personalized’. I am tweaking things.

Hey there Suzanne! Glad to hear the lock issue has been resolved :slight_smile: If I’m understanding you correctly, you’re saying that you have some variables defined within your project that are supposed to be replacing values in your appsettings.json file and the replacement isn’t working?

HI Shawn! Solved the appsettings.json issue. Still working on replacing the connection string in a logging config file.

Nice work! Is the logging config file in an XML format?

It is and the structure is like this and the value I wish to set per target environment is the connectionString:

image.png

Ah! Thanks for providing that information :slight_smile: In cases like these, I’d use an XML transform file and enable the Configuration Transforms and Substitute Variables in Files features

In the XML transform file, place the place holders (#{variable} syntax) for what you want replaced. Then transform the XML file using the transform file and you should be good to go! I’ve done this quite a few times :slight_smile:

After 3 attempts, I created a transform file that did the job. Thank you.

Excellent work Suzanne, well done :slight_smile: Please let me know if you need anything else. As an FYI, I have a family matter to attend to so I may not be able to respond for a day or two.

You have been fantastic! Thank you so much.

My pleasure :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.