Browse by Tags
All Tags »
Web.config (
RSS)
In Visual Studio 2010 we introduced a simple and straight forward method of transforming web.config during publishing/packaging. This support is called XML Document Transform, aka XDT. It allows you to transform any XML file, not just web.config. To learn more about XDT check out the docs . Since we've released XDT there has been interest in re-using the transformation engine in other scenarios. To enable some of those scenarios we released XDT on NuGet . After that we started working on integrating XDT into NuGet and asked for some feedback from the community . In order to cover all the scenarios for NuGet users we decided to release the source of XDT on codeplex.com using an Apache 2.0 license . You can now redistribute XDT with your own...
When we released VS2010 we add support for web.config (XDT) transforms during publish/package. Note: From now on I’ll only use the word publish from now on but the full content relates to packaging as well. In the original implementation when you published your web project the web.config file would be transformed by the file web.{Configuration}.config, where {Configuration} is the project build configuration. For example Debug, or Release. If you publish on Release and there exists a web.release.config we will take your web.config and transform it with web.release.config before publishing. Cascading web.config transformations In VS 2012 ( as well as the publishing updates for VS2010 through the Azure SDK ) now support the concept of publish...
One of the really cool features that we shipped for Visual Studio 2010 was web.config (XDT) transformations . Because the transformations are so simple and straightforward one of the first questions that someone asks after using it is “how can I use this in my other projects?” Unfortunately this feature is only built into the Web Application Projects (WAP). But it is very easy to reuse this because we just rely on an MSBuild task to do the heavy lifting for us. I received an email from that basically went like this “Hi, I would like to use XDT transformations on my WPF project for both the app.config file as well as my unity.xml file. How can I do this?” So one answer is to modify your project file to use the TransformXml task as I have blogged...
Today I just saw a question posted on stackoverflow.com asking Why are some Web.config transforms tokenised into SetParameters.xml and others are not ? Let me give some background on this topic for those who are not aware of what the question is. With Visual Studio 2010 when you package your application using the Build Deployment Package context menu option, see image below. When build the package by default the package will be created in obj\{Configuration}\Package\{ProjectName}.zip where {Configuration} is the current build configuration, and {ProjectName} is the name of the project. So in this case I since I’m building with Debug and the project name is MvcApplication1 the package will be placed at obj\Debug\Package\MvcApplication1...
DIsclaimer: You may experience some in-consistent behavior using this technique. If so please let us know. I have heard a lot of questions and confusion regarding web.debug.config and web.release.config. For example here is just one question on StackOverflow . The question states: Hello, I want to use the web.config transformation that works fine for publish also for debugging. When i publish a web app, visual studio automatically transforms the web.config based on my First let me explain, as I did to that question, the purpose of the files: web.config/web.debug.config/web.release.config. web.config This is the config file which developers should use locally. Ideally you should get this to be standardized. For instance you could use localhost...
Sayed recently posted a blog on extending XML (web.config) Config transformation. If you haven’t read it already, you can find it here: http://sedodream.com/2010/09/09/ExtendingXMLWebconfigConfigTransformation.aspx Read More...
If you crack open the project file in an ASP.Net MVC 2 application (in notepad or unload your project and then click “ Edit *.proj” ), you will notice an interesting line. <MvcBuildViews>false</MvcBuildViews> This is an option to enable a post build task that will run the Asp_net compiler. This command will compile your aspx pages and report any errors in the pages at design time. Ordinarily the compiler runs before your site loads for the first time after making a change. This is why you can debug a website or web application with errors in the markup and not see an error until actually running your site. So why is the option set to false by default? I obviously want errors at design time before I run the site! Well, if you turn...
Visual Studio 2010 improves .NET framework multi-targeting by applying framework-appropriate filtering to the property grid and Intellisense. For example, if you select a button on a web form of a .NET 2.0 web project, in the Property Grid you will see: If you go to the Project Properties and change the Target Framework version to 4.0: ...the Property Grid display will change to display 4.0-specific properties: While this looks simple and straight-forward, there's actually an illusion at work! Only one framework can be loaded into an AppDomain at a time, and Visual Studio uses .NET 4.0 specific capabilities. So the actual controls displayed on the design surface are always 4.0 controls. Their properties are filtered for display in the Property...
We have earlier discussed about Web Deployment and Web Packaging quite a bit, today I wanted to dive into web.config transformation. If you would like to check out the other topics please read through the earlier blog posts below: Web Deployment with VS 2010 and IIS Web Packaging: Creating a Web Package using VS 2010 Web Packaging: Creating web packages using MSBuild How does Web Deployment with VS 10 & MSDeploy Work? Installing Web Packages using Command Line Usually web applications go through a chain of server deployments before being finally being deployed to production environment. Some of these environments can be Developer box (Debug), QA Server, Staging/Pre-Production, Production (Release). While transitioning between these environments...
Today, deploying a web application is not as easy as it should be. Whether you are deploying your web to a shared hosting environment and paying monthly to maintain it OR whether you have a web server/s managed by your enterprise, there are a lot of manual steps involved in getting your application from point A to point B. If you are deploying your web application to a shared hoster then today you have to use technologies like FTP which take a long time to get your web content to the hosted server. After deploying your content you have to manually go to hoster control panel and install your database by running sql scripts and configure various IIS settings like marking a folder as an application to isolate it from the rest of the application...
More Posts
Next page »