Fast Koala (VS 2019)Enables build-time config transforms for various project types including ASP.NET 4.6-or-below web apps (but not web sites). You do not need Fast Koala to be installed once its changes have been applied to a project. A TFS build server would need no knowledge of Fast Koala for any of Fast Koala's changes to be effective. Video Demov1.1.22 - https://youtu.be/mHC6_zRbO-Y (Click to watch) "Build-time" means F5All references to "build-time" refer to F6 (Build) or F5 ([Build and] Debug). This means that you can finally test web apps with different configuration transformations applied without publishing, you can simply select the configuration and hit F5. Inline Build-Time TransformationsThis tool enables build-time transformations for ASP.NET 4.6-or-below web apps (not websites), including ASP.NET MVC 5. .. become .. and Web.config at project root becomes transient (and should never be added to source control). Web.config is created upon build. (This was a feature I and many others always wanted from other extensions like Slow Cheetah and Configuration Transform.) Bin-Targeted Build-Time TransformationsThis tool also supports enabling build-time transformations for class library projects (which can have config files) and for Windows apps that need to transform out to the bin\Debug or bin\Release directory as AssemblyName.exe.config. For App.config and its transform files there is no App_Config (or other chosen name) folder. The App.config in the root directory is transformed upon build in the bin directory. How to useIn all cases, to use, right-click on the project node or the [Web|App].config in Solution Explorer and choose "Enable build-time transformations". If a transform file (i.e. Web.Debug.config) has been deleted or removed, right-click on the base config file and choose "Add missing transforms". Setting the config directoryFor web apps, which use inline transformations in a nested folder, the default folder name is "App_Config", but you can choose any name you like when prompted--you must keep that folder name unless you edit the project file--and you can use backslashes in the folder name to deeply nest the config files, i.e. "cfg\server". To leave the base config and its transforms in the project root, use simply a dot ("."). You can also share configs further up in the solution using "..", i.e. "..\CommonConfigs\Web". LimitationsWeb sites are not supported and will never be supported. ASP.NET 5 (which includes ASP.NET MVC 6) is not supported; it might not ever be supported. How build-time config transformations workThis Visual Studio extension will modify your project by injecting a custom MSBuild target that invokes the TransformXml task with the custom config paths as parameters. It does not use NuGet and it does not import an external .targets file in order to support build-time transformations--at least, not at this time, these behaviors might be added down the road but there are several reasons to avoid any of that. The complete and simple explanation of the core method of how this is accomplished is laid out in the following very useful resource from EdCharbeneau which upon reading it started this whole effort: https://gist.github.com/EdCharbeneau/9135216 NuGet packages and other caveatsNuGet packages or other automated tasks that make tweaks to the web.config will need to be managed more carefully after Fast Koala is applied to a project. If you know changes will be made to web.config
If you are an automation authorThe You will need to either evaluate the MSBuild project property or load the project's XML and parse these properties out yourself. Adding Build ScriptsFast Koala also supports adding build scripts, such as PowerShell scripts, NodeJS scripts, or project extensions (.targets). Scripts added with Fast Koala have the added advantage of having the MSBuild project properties exposed to the script runtime engine.
|