News

Visual Studio Team Addresses No. 1 User Request: Expanded Config File Transforms

More than six years ago, Chuck Fields asked Microsoft for better Web.config-style Transform support, an idea seconded by more than 8,800 fellow developers on the UserVoice site used by Microsoft to collect feedback and feature requests.

This week, the Visual Studio team posted an update to the request, which is No. 1 on UserVoice, based on votes.

Here's the original post:

Support Web.config style Transforms on any file in any project type
Web.config Transforms offer a great way to handle environment-specific settings. XML and other files frequently warrant similar changes when building for development (Debug), SIT, UAT, and production (Release). It is easy to create additional build configurations to support multiple environments via transforms. Unfortunately, not everything can be handled in web.config files many settings need to be changed in xml or other "config" files.

Also, this functionality is needed in other project types -- most notably SharePoint 2010 projects.

According to Microsoft developer documentation about transformation syntax for Web.config -- the primary configuration file for any Web service -- a transform file is an XML file specifying how the Web.config file should be customized when being deployed to different environments.

This week, Microsoft posted the latest update to the request.

"Thank you all for your continued feedback," Microsoft's response starts out, addressing the 8,000-plus votes received by the request. "In response to some recent feedback, we are happy to share that the SlowCheetah extension is officially supported by Microsoft and the Visual Studio team.

"Part of the reasoning behind moving it under the Microsoft repository on GitHub was to be able to maintain the extension moving forward. We understand many of you would love to see this integrated in the product. This idea is still under consideration and we will share the decision as soon as we can. We thank you for your patience."

Comparing Config File Differences with SlowCheetah
[Click on image for larger view.] Comparing Config File Differences with SlowCheetah (source: Microsoft).

SlowCheetah is indeed listed on the Visual Studio Marketplace, having been installed more than 260,000 times. Its listing says: "Transform XML and JSON files at build time based on configuration. Contains tooling to assist in the creation and previewing of transform files."

Specifically, the listing says, "This package allows you to automatically transform your app.config (or any file) when you press F5 in Visual Studio. You can have different transformations based on the build configuration. This will enable you to easily have different app settings, connection strings, etc. for Debug versus Release. If you want to transform other files you can do that too."

The tool is nearly as old as the original UserVoice request, with version 1.1 having been posted Sept. 8, 2011. It was created by Microsoft employees Sayed Ibrahim Hashimi and Chuck England, but was not officially sponsored or supported by Microsoft at the time.

Now it is. In May, the Visual Studio team posted this comment: "We are excited to announce SlowCheetah 3.0, which now supports JSON transforms. As well, this extension is released under Microsoft so the [NuGet and VSIX] name has been changed to Microsoft.VisualStudio.SlowCheetah. The gallery extension supports VS 2015 and VS 2017."

Microsoft's "slow-cheetah" repository on GitHub shows 58 stars, 10 contributors and 10 releases.

At least one developer wasn't overly impressed by Monday's announcement, posting this on the same day: "I believe the support should come from MSBuild, not from VS, since if build server can't reproduce this behavior then it's pointless. It's late 2017 but you still embracing the 'IDE centric' approach :( ."

Throughout the years, the issue has garnered more than 500 comments, in addition to that one.

Categorized UserVoice Requests
[Click on image for larger view.] Categorized UserVoice Requests (source: Microsoft).

Now the Visual Studio team can address No. 2 on the list: "Create a Ubiquitous .NET Client Application Development Model." Receiving more than 7,500 votes, that request is described thusly: "This vote is for developers who wish to see the idea of a ubiquitous .NET client application development model created by Microsoft and the Visual Studio team.

"A ubiquitous .NET client application development model is a model that is defined in .NET-based technologies and is able to run in a multitude of runtime environments -- both native-compiled (store-hosted) and Web-hosted."

About a year and a half ago, Microsoft marked that request as "Under Review."

Further down the list are requests for an open source Silverlight, addition of non-nullable reference types in C#, and C++ CLI support for optional parameters for using in C#, along with thousands more.

About the Author

David Ramel is editor in chief of Visual Studio Magazine and Application Development Trends Magazine.

comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.