Home / ASP.NET Weblogs

Latest Microsoft Blogs

Browse by Tags

Related Posts

  • How to compress CSS/JavaScript before publish/package

    Today I saw a post on stackoverflow.com asking Using Microsoft AJAX Minifier with Visual Studio 2010 1-click publish . This is a response to that question. The Web Publishing Pipeline is pretty extensive so it is easy for us to hook in to it in order to perform operation such as these. One of those extension points, as we’ve blogged about before, is creating a .wpp.targets file. If you create a file in the same directory of your project with the name {ProjectName}.wpp.targets then that file will automatically be imported and included in the build/publish process. This makes it easy to edit your build/publish process without always having to edit the project file itself. I will use this technique to demonstrate how to compress the CSS &...


  • Video on Web Deployment using Visual Studio 2010 and MSDeploy

    Back in November I participated in Virtual Tech Days which is an online conference presented by Microsoft. In the session I discussed the enhancements to web deployment using Visual Studio 2010 and MSDeploy. Some of the topics which I covered includ: web.conig (XDT) transforms How to publish to local file system using Visual Studio How to publish to a 3rd party host using Visual Studio via MSDeploy How to publish to local IIS server using the .cmd file generated by Visual Studio How to use msdeploy.exe to delete IIS applications How to use the IIS Manager to import web packages How to use msdeploy.exe to deploy a web package to the local IIS server How to use msdeploy.exe to deploy a web package to a remove IIS server How to use msdeploy.exe...


  • XDT (web.config) Transforms in non-web projects

    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...


  • ASP.NET Web Application: Publish/Package Tokenizing Parameters

    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...


  • Web Deploy: How to see the command executed in Visual Studio during publish

    I just saw a post on Twitter asking the question Is there any easy way to see the underlying MSBuild command when building in VS2010? Want to see the MSDeploy params. @ wdeploy ? One thing to know is that when you publish from Visual Studio, by default we use the MSDeploy (AKA Web Deployment Tool) Object Model in order to perform the deployment. We do this for performance and other reasons. Because of this there is no real msdeploy.exe command that is being issued. You can however change that behavior. This is controlled by an MSBuild property UseMSDeployExe which is false by default. In this case since Troy wants to see the command we will need to set that property to false. There are 2 ways in which you can do this. You can set it in the project...


  • ASP.NET Web Projects: web.debug.config & web.release.config

    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...


  • An example of packaging web application containing database upgrade SQL file

    A few months ago, we have a blog talking about extending the web publishing pipeline to package database project deployed SQL file.  In this blog, I’ll show step by step example of packaging web application with SQL Server database upgrade SQL file using Visual Studio 2010.  This way, we can generate a web package with incremental SQL script to certain database version.  The scenario may help distributions of a web upgrade package which needs to be installed on many different locations, each with their own SQL server database.   1. Create a Web Application Project 2. Add a new “SQL Server 2008 Database Project” to the solution 3. Prepare a development database, such as my test1 database as the following: 4. Right click our...


  • Web Deploy Parameterization in Action

    A few weeks back I explained the key differences between Web.Config Transformation and Web Deploy (aka MSDeploy) Parameterization…  Before you read this post I recommend that you read Transformation vs. Parameterization post, it is tiny and will clear few fundamentals… Automatic Parameterization Before I dive in more let me clarify that if you are using VS 2010 then in common scenarios you may not even need to do custom parameterization, coz VS 2010 already parameterizes things like IIS Application Name, Application physical installation directory and connectionStrings… So when you actually create a web deploy .zip package you can easily build it once and deploy it several number of times by changing the parameters values… Custom Parameterization...


  • A practical example of using web application deployment package with IIS7

    When a zip package is built from VS2010 web application UI (via Build Deployment Package command), or through command line (msbuild myproject.csproj /t:package), a few files are generated in the destination folder. Here’s some brief description: File Name Description myApp.deploy-readme.txt Read me file of how to use myApp.deploy.cmd. myApp.deploy.cmd The auto generated command file which can be used in many situations.  Check MSDN topic for details. myApp.SetParameters.xml The parameter file that user can modify to affect deployed IIS application, such as IIS application name, connection string etc.  Check MSDN topic for more details. myApp.SourceManifest.xml The source manifest file that VS uses to compile the package via web deploy...


  • Parameterization vs. Web.Config Transformation

    I was recently asked about being able to change values of different variables like ConnectionStrings, Installation physical directory, app Settings etc during install time rather than build time, so I thought it might be worth while to de-mystify the concepts around Web.Config Transforms and Parameterization… Web.Config Transformation Geeks say Web.Config Transformation is a great feature of Web Deploy (aka MsDeploy), well the first part about being a great feature is true :-) but it is important to note that Web.Config Transformation is not a Web Deploy feature but it instead is a VS 2010 only feature.  Web.Config Transformation is connected with Build configuration of MSBuild/VS/Team Build etc…  Its XML transformation engine is wrapped...


Page 1 of 3 (24 items) 1 2 3 Next >

Archives