Add nested dependent web.config transformation

Possibly save 1 hour of your time: When you want to do a continuous integration build, you may want to specify different web.config or app.config used for the transformation based on a specific environment configuration.

In my environment, we used web.config for local use. Then we have SYST for system integration environment (team check in), UAT for user acceptance testing environment and finally PROD for production environment.

So you add a web.SYST.config and it is not nested under the web.config. It should look like this.


Some people suggest right click on the Web.config and find Add Config Transform. That did not show up for me.

The alternative is to go into the csproj file directly and edit the include to have DependentUpon element.

content include.png

You also need to right click on the Solution and choose Configuration Manager. Under Active solution configuration, you can select New to create your own configuration. The name used here should also reflect the name in the config file.

configuration manager.png

Book:Murach’s ASP.NET 4.6 Web Programming with C 2015


Javascript File Editor empty or blank on Visual Studio 2015

Possibly save 2 hours of your time: One day I open a .js file on my Visual Studio and it shows a blank or empty screen. No code is displayed.

What I found is that under Visual Studio menu >> Tools >> Options >> Text Editor >> I was missing the JavaScript editor. I have no idea what may have caused this.

visual studio tool options.png
Luckily I am able to use the repair feature and restart computer to get this working again.

Search on Windows start menu >> Programs and Features

Programs and features.png

Right click on Visual Studio 2015 and click Change.

Uninstall or change a program.png
Then click on Repair. This next part may take over an hour so it is probably best to do this at end of day.

Finally, after the repair is completed, it may show some errors. Please make sure to capture and copy those errors to another file for reference later if needed. It will ask you to restart your computer. Hopefully, you can now open the .js file successfully.