Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"

Visual Studio 2012 Web Publishing Improvements

0 (0 Likes / 0 Dislikes)
  • Embed Video

  • Embed normal player Copy to Clipboard
  • Embed a smaller player Copy to Clipboard
  • Advanced Embedding Options
  • Embed Video With Transcription

  • Embed with transcription beside video Copy to Clipboard
  • Embed with transcription below video Copy to Clipboard
  • Embed transcript

  • Embed transcript in:
    Copy to Clipboard
  • Invite a user to Dotsub
[Microsoft] [] [Visual Studio 2012 & One ASP.NET - Scott Hanselman, Principal Community Architect, Microsoft Corporation] Hi, this is Scott Hanselman, and I wanted to take a second to share some of the new features of Visual Studio 2012 and ASP.NET 4.5—in this video publishing [Publishing - Scott Hanselman, Principal Program Manager, Microsoft Corporation] some very cool improvements to publishing, making it easier than ever to get your web site up on the actual Web. All of these features work with all aspects of ASP.NET—web forms, MVC, whatever makes you happy. It's important to remember that an ASP.NET application is an ASP.NET application. So when we get features like publishing and improvements to those features, you get that across all of your different ASP.NET apps. I've got a standard little MVC application right here. This application is a little stock manager. I've got a StockController, I've got my Stock Models, I've even done a couple of database migrations— my initial Create where I made my stocks, and then I added an extra field later. So you can see the migration there where I've added stocks. If I want to put that up on the Web, whether it be at a host or whether it be up at Azure, what I want to do is download a Publish Settings file. I'll use Azure for this example. I'm going to say New, Web Site with Database, scottstockapp. Super complicated password. Now we're creating that web site and again, this could be at any host. It doesn't need to be at Azure. So here's my stock application ready to deploy. I'm going to click Download publish profile. This is going to download a Publish Settings file. This is not specific to Azure; this is part of Web Deploy. I'll hit Save, go back over to Visual Studio, right click and say Publish. This is some of the new publishing dialogs within Visual Studio 2012. I'm going to say Import that publishing profile. It automatically brings in all the settings, user names, passwords, and things that I might need to deploy my application. If I like, I can validate the connection then hit Publish. That's going to start pushing my application up into Azure or whatever the normal host that I want to use is. And because I've got migrations, we're actually automatically going to apply those Entity Framework migrations in the cloud. My application automatically starts up. So my application is up. Another new feature is that PublishProfiles are actually stored within the Properties. So the PublishProfiles are shared and can be checked in as part of the project. You can see my Web Deploy properties there. I could name this Production. I could have different profiles for Dev, Test, and Production. This is my MSDeployProduction profile. I could also use command-line support and publish that. I'm going to go back to my Publish Settings file that I downloaded. I'm going to grab the password for deployment out of that Publish Settings file. And then we'll take this MVC application that's located in My Documents then I'll open up a Developer Command Prompt, change directories where my application is located. Now from here I can deploy from the command line when using a profile. So I'm going to say msbuild will build mvcApplication9, and then I'm going to say DeployOnBuild. We'll use the PublishProfile called Production. As a security measure I'm going to say AllowUntrustedCertificate. Once I decide that I do trust my host, I could import that into my local certificate store. Then I'll say Password= and there's the password from my PublishProfiles file. Go and do a build from the command line and then a Web Deploy publish. I've just published my application updated up into my host. Remember that I called my PublishProfile Production. One of the other new features is profile-specific config transforms. I could make a transform and call it Web.Production.config. Let's say that I needed a specific application setting but only in Production. In this case I make a web config transform file that's going to insert this key into the result, but I also have different web configs for things like release. So here's my release where I remove my debug attributes from web config. That can be a little confusing and hard to manage. Now I can right click and say Preview Transform. That will show me the transforms that will be applied from my original web config, debug=true, through my release web config, debug=false, and then finally my publish profile-specific configuration where I've added my new key. Those transformations are applied whether you publish from Visual Studio or from the command line. The PublishProfiles are now shared, you've got migrations, lots of great new features in publishing in ASP.NET 4.5 and Visual Studio 2012. [Microsoft] []

Video Details

Duration: 5 minutes and 38 seconds
Country: United States
Language: English
License: All rights reserved
Genre: None
Views: 6
Posted by: neudesicasp on Oct 3, 2013

Visual Studio 2012 Web Publishing Improvements

Caption and Translate

    Sign In/Register for Dotsub to translate this video.