{"id":474,"date":"2014-06-03T22:42:12","date_gmt":"2014-06-03T22:42:12","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2014\/06\/03\/asp-net-vnext-in-visual-studio-14-ctp\/"},"modified":"2022-08-08T07:52:02","modified_gmt":"2022-08-08T14:52:02","slug":"asp-net-vnext-in-visual-studio-14-ctp","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/asp-net-vnext-in-visual-studio-14-ctp\/","title":{"rendered":"ASP.NET vNext in Visual Studio \u201c14\u201d CTP"},"content":{"rendered":"<p>A few weeks ago at <a href=\"https:\/\/channel9.msdn.com\/Events\/TechEd\/NorthAmerica\/2014\">TechEd North America<\/a> we announced <a href=\"http:\/\/www.hanselman.com\/blog\/IntroducingASPNETVNext.aspx\">ASP.NET vNext<\/a>. Today we are releasing the first preview of Visual Studio \u201c14\u201d CTP, which will have support for creating and debugging ASP.NET vNext applications. This post will cover what is ASP.NET vNext and give you a walkthrough of what you can do in this preview.<\/p>\n<p>ASP.NET vNext has been designed to provide you with a lean and composable .NET stack for building modern cloud-based apps. ASP.NET vNext will build on .NET vNext.<\/p>\n<p>.NET vNext is the next major release of .NET Framework. .NET vNext will have a cloud optimized mode which will have a smaller footprint as compared to the full .NET Framework. For more details see this <a href=\"http:\/\/blogs.msdn.com\/b\/dotnet\/archive\/2014\/05\/12\/the-next-generation-of-net-asp-net-vnext.aspx#_.NET_vNext\">post<\/a>.<\/p>\n<p>ASP.NET vNext can be best described by highlighting the following scenarios<\/p>\n<ul>\n<li><strong>Cloud-Optimized<\/strong>       \n<ul>\n<li>ASP.NET vNext can target .NET vNext (with cloud optimized mode). This means that services such as session state and caching can be replaced based on whether the app is running in the cloud or in a traditional hosting environment, while providing a consistent API for developers. <\/li>\n<\/ul>\n<\/li>\n<li><strong>Side by side support<\/strong>       \n<ul>\n<li>When targeting the Cloud optimized mode in .NET vNext, ASP.NET vNext will let you deploy your own version of .NET Framework. Since now the .NET vNext Framework can be deployed with the app, each app can run different versions of .NET vNext side-by-side and upgrade separately, all on the same machine. <\/li>\n<\/ul>\n<\/li>\n<li><strong>Enhanced developer experience<\/strong>       \n<ul>\n<li>In ASP.NET vNext, you can now edit your code files and refresh the browser to see the changes without explicitly building your app. You can also edit your application outside of Visual Studio. <\/li>\n<li>ASP.NET vNext projects have project.json file where all the project dependencies are stored. This makes it easier to open vNext projects outside of Visual Studio so that you can edit them using any editor such as Notepad etc. You can even edit ASP.NET vNext projects in the cloud. <\/li>\n<\/ul>\n<\/li>\n<li><strong>A single programming model for building Web sites and services<\/strong>       \n<ul>\n<li>MVC and Web API have been merged into a single programming model. For example, there\u2019s now unified controller, routing and model binding concepts between them. You can now have a single controller that returns both MVC views and formatted Web API responses, on the same HTTP verb. <\/li>\n<\/ul>\n<\/li>\n<li><strong>Modular Stack<\/strong>       \n<ul>\n<li>ASP.NET vNext will ship as NuGet packages. NuGet packages will also be the unit of reference in your application. NuGet packages and libraries references will be treated the same so it will be easier to manage the references in your project. <\/li>\n<li>This makes it possible for an application developer to choose what functionality they want to bring into their application. In the previous versions of ASP.NET features such as HttpContext, Session, Caching, and Membership were baked into the framework. As an app developer now if you do not need these features then you can choose not to bring it into your app. <\/li>\n<\/ul>\n<\/li>\n<li><strong>Dependency Injection<\/strong>       \n<ul>\n<li>Dependency Injection is built into vNext and is consistent across the stack. All of the vNext components such as MVC, Web API, SignalR, EF and Identity will use the same DI. This will allow us to provide the right set of services based on the environment that you are running in. <\/li>\n<\/ul>\n<\/li>\n<li><strong>Configuration<\/strong>       \n<ul>\n<li>There is a new configuration system which can read values from environment variables. This configuration provides a unified API system for accessing configuration values. You can use the same APIs to access configuration values locally or in Azure. <\/li>\n<\/ul>\n<\/li>\n<li><strong>Open Source<\/strong>       \n<ul>\n<li>The entire source code is already released as open source via the <a href=\"http:\/\/www.dotnetfoundation.org\/\">.NET Foundation<\/a>. You can see the source at <a href=\"https:\/\/github.com\/aspnet\">https:\/\/github.com\/aspnet<\/a> and follow progress on vNext in real time. You can also send pull requests and contribute to the source code. <\/li>\n<\/ul>\n<\/li>\n<li><strong>Cross-platform support<\/strong>       \n<ul>\n<li>We&#8217;re developing vNext with cross-platform in mind, including an active collaboration with Xamarin to ensure that cloud-optimized .NET applications can run on Mac or Linux on top of the Mono runtime. <\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>The following chart shows the feature set that will be available in .NET vNext and .NET vNext (Cloud Optimized)<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/4087.vnextfeaturechart_thumb_580533E2.png\"><img decoding=\"async\" title=\"vnextfeaturechart\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"vnextfeaturechart\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/4087.vnextfeaturechart_thumb_580533E2.png\" width=\"695\" height=\"237\" \/><\/a> <\/p>\n<p>In this post I\u2019ll outline how you can get the tools and walk you through some of the features which we\u2019ve enabled in this preview.<\/p>\n<h2>How to download<\/h2>\n<p>Getting started is easy. Just download <a href=\"http:\/\/go.microsoft.com\/fwlink\/p\/?LinkId=400850\">Visual Studio \u201c14\u201d CTP<\/a>. After that you\u2019ll have everything you need to follow along with the remainder of this post. <b>One important thing to note in this early preview is that you should not install this on your main machine. We recommend installing the product in a VM, a VHD, or a computer that is not used in a production environment because there are known side by side compatibility issues with other versions of Visual Studio. <\/b>In later previews we will ensure that we have a good side-by-side story, but in this early preview we are not quite there yet.<\/p>\n<h2>Walkthrough<\/h2>\n<p>In Visual Studio you can find the vNext templates under the Visual C#Web node as shown below.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/7522.newprojdialog01_thumb_04B07E6D.png\"><img decoding=\"async\" title=\"new-proj-dialog-01\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"new-proj-dialog-01\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/7522.newprojdialog01_thumb_04B07E6D.png\" width=\"586\" height=\"407\" \/><\/a> <\/p>\n<p>In the screenshot above, the first template, ASP.NET Web Application, will open up the existing One ASP.NET dialog. The remaining templates are for ASP.NET vNext. Later we will integrate the vNext templates into the One ASP.NET dialog box. There are three flavors of templates here. These templates can run on .NET vNext and cloud optimized .NET vNext.<\/p>\n<ul>\n<li>Web templates \u2013 for creating web applications <\/li>\n<li>Class library \u2013 for creating cloud-optimized class library projects <\/li>\n<li>Console application \u2013 for creating console apps <\/li>\n<\/ul>\n<p>We have two web templates out of the box; an empty template and a starter template. Let\u2019s take a look at the starter template, ASP.NET vNext Web Application. When you create a vNext Web Application you\u2019ll probably notice that the project files\/layout is very familiar. Controller classes go in the Controllers folder, Views are in the Views folder, etc. In addition to some familiar files, we have introduced some new\/modified files. I\u2019ll highlight those here.<\/p>\n<h4><b><u>Startup.cs<\/u><\/b><\/h4>\n<p>This class must contain a Configure method that takes an IBuilder parameter, and you configure the HTTP pipeline inside this Configure method. <\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/5710.startup.cs_thumb_332C1EBE.png\"><img decoding=\"async\" title=\"startup.cs\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"startup.cs\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/5710.startup.cs_thumb_332C1EBE.png\" width=\"680\" height=\"446\" \/><\/a> <\/p>\n<p>In Startup.cs you\u2019ll see the Configure method as you have previously. You can add and configure various services that you need in your application. In the snippet above we can see the following customizations. <\/p>\n<ul>\n<li>Add Browser Link <\/li>\n<li>Configuration system is configured to pull values from config.json and environment variables <\/li>\n<li>Add Entity Framework to persist data in SQL server <\/li>\n<li>Add ASP.NET Identity <\/li>\n<li>Add ASP.NET MVC <\/li>\n<\/ul>\n<p>Now let\u2019s take a look at the project.json file.<\/p>\n<h4>project.json<\/h4>\n<p>Project.json is used by the ASP.NET vNext. This file is where you\u2019ll find items like dependencies (for example NuGet packages or framework references for your project), a list of available build configurations, and a list of commands which can be invoked from the command line.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/4478.project.json_thumb_4B54AA7B.png\"><img decoding=\"async\" title=\"project.json\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"project.json\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/4478.project.json_thumb_4B54AA7B.png\" width=\"699\" height=\"360\" \/><\/a> <\/p>\n<p>In the image above you can see that the starter template depends on several NuGet packages. Besides references being in a new file there is another significant change here. In vNext apps the list of dependent NuGet packages in project.json includes only the NuGet packages which are directly referenced by the project. In ASP.NET projects created in previous releases of Visual Studio in packages.config you\u2019ll find the NuGet packages which are directly referenced by your project, and any other NuGet packages which those packages depends on. This new view simplifies things. If you uninstall a NuGet package it will automatically remove it dependencies as well, assuming that no other NuGet package in project.json depends on it.<\/p>\n<p>In the project.json you can see there are two other sections; commands and configurations. Each entry in the commands section corresponds to a command line that may be executed. The configurations element defines the configurations which the project should be built against. Here net45 represents the full .NET desktop CLR and k10 represents the cloud-optimized CLR.<\/p>\n<h4>myproject.kproj<\/h4>\n<p>When you create a project in Visual Studio a corresponding .kproj file will be placed in the root of the project. It\u2019s is an MSBuild file like most other project files that Visual Studio creates. Visual Studio uses this file to persist settings which it needs to load\/run your application. The ASP.NET vNext runtime does not use this file, it\u2019s only used by Visual Studio. Later this file will also be useful for CI scenarios, like project files are today.<\/p>\n<p>In this preview release you\u2019ll find that all files in your project are listed in the .kproj file. In later versions the files will not be listed in the .kproj. More info on that later in this post. Now that we\u2019ve discussed the artifacts in the project let\u2019s move on to debugging the application, and then add some new content to this project.<\/p>\n<h4>config.json<\/h4>\n<p>In previous versions of ASP.NET, the application and web server configuration were both found in web.config. You can specify your application specific configuration settings in the config file. The file format can be the one of your choice. You can use ini, xml, json and plug in any format that you want. The template uses Microsoft.Framework.ConfigurationModel.Json package to read configuration values from a json file called config.json. Below you\u2019ll find the default contents of config.json from the vNext Web Application template.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/5078.config.json_thumb_3EE91803.png\"><img decoding=\"async\" title=\"config.json\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"config.json\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/5078.config.json_thumb_3EE91803.png\" width=\"689\" height=\"138\" \/><\/a> <\/p>\n<h3>Debugging an ASP.NET vNext application<\/h3>\n<p>Debugging an ASP.NET vNext application is the same as any standard Visual Studio project. Once you start debugging your application you can set breakpoints, use the immediate window, and use all the other features that you are familiar with. Debugging works for both the full .NET desktop CLR as well as the cloud-optimized CLR.<\/p>\n<h4>Adding a new Controller and View<\/h4>\n<p>In this new preview we have not enabled the Add View\/Add Controller menu options yet. That will be coming later. For now we have created a basic set of item templates that can be used. To get to these item templates you can use the Add New Item menu option.<\/p>\n<p>Let\u2019s add a new controller and view to the starter web template we created. To do that, right click on Controllers and select Add New Item. Once you do that you\u2019ll see the list of available templates.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/7077.addcontroller_thumb_2753FB41.png\"><img decoding=\"async\" title=\"add-controller\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"add-controller\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/7077.addcontroller_thumb_2753FB41.png\" width=\"603\" height=\"418\" \/><\/a> <\/p>\n<p>OK name the controller HelloWorldController and click on the Add button. After that you\u2019ll get a new controller class created with an Index method. In the Index method let\u2019s pass a message to the view that we will create. Just like in previous versions one method to do this is to use the ViewBag property. Let\u2019s add a Message property and set the value to \u201cHello World\u201d. Your controller class should look like the following.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/3704.hellocontroller_thumb_3B037586.png\"><img decoding=\"async\" title=\"hello-controller\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"hello-controller\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/3704.hellocontroller_thumb_3B037586.png\" width=\"395\" height=\"301\" \/><\/a> <\/p>\n<p>Now that we\u2019ve created our controller we need to create the corresponding view. The Visual Studio templates have routes configured in the same way as in previous releases. This means we will need to create a new view at \/Views\/HelloWorld\/Index.cshtml. You can use the MVC 5 View Page (Razor) item template to get you started.<\/p>\n<p>After creating the view you can update it to display the message that the controller passes to it. The view item template has the layout and title commented out by default. Since we started with a web application template, which has the layout page in the default location, we can just un-comment that out to enable it. Below is the current contents of the view.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/6403.helloview_thumb_2A1ED196.png\"><img decoding=\"async\" title=\"hello-view\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"hello-view\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/6403.helloview_thumb_2A1ED196.png\" width=\"592\" height=\"190\" \/><\/a> <\/p>\n<p>Now that you have created the controller and view, you can visit the page by browsing to \/helloworld\/index or \/helloworld\/. Let\u2019s move on to see another way you can add files to your project.<\/p>\n<h4>Adding files to a project<\/h4>\n<p>In the previous section we used the Add New Item dialog to add new files to your project. When working with a vNext project, <b>all files\/folders in the project folder are automatically included in your project<\/b>. If you have existing files that you need to add to a vNext project you can simply copy the files into your project folder. Visual Studio will notice the new files and include them. In this preview we have not implemented the ability to exclude files from the project. You can exclude source files from the build process by editing project.json. Now that you\u2019ve seen how to add files to your project let\u2019s move on to see how to add a dependency in your project. <\/p>\n<h4>Adding a new dependency<\/h4>\n<p>In a vNext app dependencies are declared in the project.json file. In this preview, to add a new dependency you can edit the project.json file. Even though we have not yet enabled the Visual Studio dialogs to simplify adding dependencies, we have implemented another really cool feature that I think you\u2019ll love: <b>dynamic IntelliSense in the project.json file for dependencies. <\/b>In the screenshot below you can see this in action. The IntelliSense here is showing ClassLibrary1, which is a vNext class library project in my solution. <b><\/b><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/7380.project.jsonintellisense01_thumb_1DB33F1E.png\"><img decoding=\"async\" title=\"project.json-intellisense-01\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"project.json-intellisense-01\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/7380.project.jsonintellisense01_thumb_1DB33F1E.png\" width=\"576\" height=\"367\" \/><\/a> <\/p>\n<p>When adding a reference to a project in the solution the format in project.json for that is \u201cProjectName\u201d: \u201c\u201d.<\/p>\n<p>In addition to IntelliSense for projects, you\u2019ll also find IntelliSense for NuGet packages. The NuGet package IntelliSense covers package names as well as version, including remote packages. Local packages (those installed with Visual Studio) have the folder icon, and remote packages have the NuGet icon.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/0268.project.jsonintellisense02_thumb_4890C492.png\"><img decoding=\"async\" title=\"project.json-intellisense-02\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"project.json-intellisense-02\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/0268.project.jsonintellisense02_thumb_4890C492.png\" width=\"581\" height=\"273\" \/><\/a> <\/p>\n<p>When a change to the project.json file is saved, a package restore is started in the background by Visual Studio automatically. The References node in the Solution Explorer is also updated to show this new reference. Below I\u2019ve included a screenshot of that.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/3730.referencesnode_thumb_10083529.png\"><img decoding=\"async\" title=\"references-node\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"references-node\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/3730.referencesnode_thumb_10083529.png\" width=\"299\" height=\"418\" \/><\/a> <\/p>\n<p>Now that we have covered a few basics let\u2019s see how to opt-in to the cloud-optimized CLR.<\/p>\n<h4>Opting into .NET vNext Cloud-Optimized<\/h4>\n<p>By default all the vNext projects are configured to use the full .NET vNext Framework. To switch the project to target the cloud-optimized .NET vNext Framework we\u2019ll modify the project properties. In the solution explorer right-click on your web application and select the Properties menu option. A screenshot is below.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/5228.propertiesdialog_thumb_662A51A4.png\"><img decoding=\"async\" title=\"properties-dialog\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"properties-dialog\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/5228.propertiesdialog_thumb_662A51A4.png\" width=\"582\" height=\"416\" \/><\/a> <\/p>\n<p>In this dialog we can switch the Active Target Framework property .NET Core Framework 4.5 to start using the cloud-optimized .NET. There are a few other properties in this dialog, but for now its a little bit bare bones. Now let\u2019s see how you can deploy your app. In this preview we have enabled publishing vNext apps to Microsoft Azure Web Sites. Let\u2019s take a look at that now.<\/p>\n<h4>Publish to Microsoft Azure Web Sites<\/h4>\n<p>Publishing to Azure Web Sites is really easy in Visual Studio. For the vNext projects we have a trimmed down version of the Publish Web dialog. In this preview we are supporting publishing to the file system (local folder, network folder, etc.) and publishing to Azure Web Sites. In later versions you\u2019ll see all the existing publish methods enabled for vNext apps. Ok let\u2019s see how you can publish your project to Azure Web Sites.<\/p>\n<p>To publish your vNext app right-click on the project in the Solution Explorer and select the Publish menu option as you would a standard ASP.NET project. After that you\u2019ll see the modified Publish Web dialog.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/5684.webpublish01_thumb_6317F3AF.png\"><img decoding=\"async\" title=\"web-publish-01\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"web-publish-01\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/5684.webpublish01_thumb_6317F3AF.png\" width=\"404\" height=\"317\" \/><\/a> <\/p>\n<p>To publish to Azure Web Sites click on the top button. After signing in you can select an existing site, or create a new one in the following dialog.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/2480.webpublish02createazwebsite_thumb_3E1A3336.png\"><img decoding=\"async\" title=\"web-publish-02-create-az-website\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"web-publish-02-create-az-website\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/2480.webpublish02createazwebsite_thumb_3E1A3336.png\" width=\"411\" height=\"245\" \/><\/a> <\/p>\n<p>For this project let\u2019s create a new Azure Web Site. To do that pick the New button and then configure the name on the Create Site dialog. After creating your site the publish settings are automatically downloaded by Visual Studio. The publish dialog will look something like the following.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/2437.webpublish03publishsettings_thumb_7DE6AA6C.png\"><img decoding=\"async\" title=\"web-publish-03-publish-settings\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"web-publish-03-publish-settings\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/2437.webpublish03publishsettings_thumb_7DE6AA6C.png\" width=\"463\" height=\"364\" \/><\/a> <\/p>\n<p>At this point you can click on the Publish button to start the publish process. When the publish process starts, the Web Publish Activity window is opened, which will show you the status of the publish operation. Once the publish operation has completed, a browser will be opened with your site\u2019s URL.<\/p>\n<p>In vNext projects we\u2019ve also enabled the selective publishing feature. To use selective publishing, right-click on one or more files in the Solution Explorer and select Publish. You can see publish, preview, and replace menu options in the following screenshot.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/6136.webpublish04selectivepublish_thumb_5CF5C876.png\"><img decoding=\"async\" title=\"web-publish-04-selective-publish\" style=\"border-top: 0px;border-right: 0px;border-bottom: 0px;border-left: 0px\" border=\"0\" alt=\"web-publish-04-selective-publish\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/6136.webpublish04selectivepublish_thumb_5CF5C876.png\" width=\"372\" height=\"381\" \/><\/a> <\/p>\n<p>That covers the publish support that we have enabled for this release. Let\u2019s move on to discuss command line scenarios.<\/p>\n<h4>Command Line support<\/h4>\n<p>As you saw above you can use Visual Studio to create, edit and debug your ASP.NET vNext application. You can also use your favorite editor of choice to edit the files and run the application from the command line.<\/p>\n<p>The following image shows an ASP.NET vNext project opened in Sublime. I have changed the About action in the Home Controller<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/0042.nonVSEditor_thumb_32ABB1FD.png\"><img decoding=\"async\" title=\"nonVSEditor\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"nonVSEditor\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/0042.nonVSEditor_thumb_32ABB1FD.png\" width=\"553\" height=\"322\" \/><\/a> <\/p>\n<p>I can run the application by using a command called \u201ck web\u201d from the command line. \u201cweb\u201d is a command which is defined in the project.json file. <\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/8726.kweb_thumb_2810754C.png\"><img decoding=\"async\" title=\"kweb\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"kweb\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/8726.kweb_thumb_2810754C.png\" width=\"717\" height=\"87\" \/><\/a> <\/p>\n<p>Once I run the command I can launch the browser and navigate to <a href=\"http:\/\/localhost:5000\">http:\/\/localhost:5000<\/a> as specified in my \u201cweb\u201d command and see this application running in the browser.<\/p>\n<h4><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/5611.commandline_thumb_5A0AA687.png\"><img decoding=\"async\" title=\"commandline\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"commandline\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/5611.commandline_thumb_5A0AA687.png\" width=\"719\" height=\"180\" \/><\/a> <\/h4>\n<h2>FAQ<\/h2>\n<h4>What is Cloud Optimized .NET vNext?<\/h4>\n<p>NET vNext will have a cloud optimized mode that enables you to deploy your apps with a copy of the .NET Framework libraries they need. Since the runtime and framework libraries are deployed on an app-basis, each app can run different versions of .NET vNext side-by-side and upgrade separately, all on the same machine. These libraries have been slimmed down significantly to reduce the footprint of the framework, and will be distributed via NuGet. <\/p>\n<h4>What\u2019s new for ASP.NET Web Forms in ASP.NET vNext<\/h4>\n<p>There were bunch of new <a href=\"http:\/\/blogs.msdn.com\/b\/webdev\/archive\/2014\/05\/13\/improvements-to-asp-net-web-forms.aspx\">improvements to ASP.NET Web Forms<\/a> in VS2013 Update2 including:<\/p>\n<ul>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/webdev\/archive\/2014\/03\/20\/test-announcing-rtm-of-asp-net-identity-2-0-0.aspx\">ASP.NET Identity<\/a> 2.0 support <\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/webdev\/archive\/2014\/02\/28\/announcing-the-release-of-dynamic-data-provider-and-entitydatasource-control-for-entity-framework-6.aspx\">Entity DataSource control for EF6<\/a> <\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/webdev\/archive\/2014\/02\/28\/announcing-the-release-of-dynamic-data-provider-and-entitydatasource-control-for-entity-framework-6.aspx\">Dynamic Data provider for EF6<\/a> <\/li>\n<li>Schedule <a href=\"http:\/\/blog.mariusschulz.com\/2014\/05\/07\/scheduling-background-jobs-from-an-asp-net-application-in-net-4-5-2\">small background worker tasks in .NET 4.5.2<\/a> <\/li>\n<li><a href=\"http:\/\/visualstudiogallery.msdn.microsoft.com\/a6c3614f-83be-4749-afbc-8da394b6ea86\">Updated WebForms Scaffolding<\/a> <\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/webdev\/archive\/2014\/05\/12\/enabling-the-net-compiler-platform-roslyn-in-asp-net-applications.aspx\">Roslyn support for WebForms<\/a>, razor pages, and code-behinds! This includes support for new C#6 features and lots more! <\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/webdev\/archive\/2014\/05\/13\/improvements-to-asp-net-web-forms.aspx\">Twitter Bootstrap CSS for WebForms<\/a> <\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/webdev\/archive\/2014\/05\/12\/announcing-asp-net-session-state-provider-for-redis-preview-release.aspx\">New ASP.NET Session State Provider for Redis <\/a><\/li>\n<\/ul>\n<p><b>Note:<\/b> You will be able to use your existing Web Forms apps and run them on ASP.NET vNext which is running on .NET vNext. You will not be able run them on cloud optimized .NET vNext. <\/p>\n<h4>How do I migrate my apps to ASP.NET vNext<\/h4>\n<p>You can run your existing application that were built on ASP.NET on .NET vNext. If you want to port your application to run on Cloud optimized .NET vNext, then you will have to see which libraries are supported in Cloud optimized .NET vNext. This is because the cloud optimized .NET vNext has a reduced set of assemblies. You can use the <a href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=42678\">APIPort tool<\/a> to analyze your app. The tool provides you with two main pieces of data: the platforms that you can easily\/reasonably target with your code, and the dependencies that are preventing you from targeting additional platforms. <\/p>\n<p>Please read the following post for more information on how to <a href=\"http:\/\/blogs.msdn.com\/b\/dotnet\/archive\/2014\/05\/12\/the-next-generation-of-net-asp-net-vnext.aspx#_Targeting_Multiple_Platforms\">target multiple platforms<\/a>.<\/p>\n<p>We will provide with a migration tool which will help you to migrate your existing applications to ASP.NET vNext for both .NET vNext and cloud optimized .NET vNext<\/p>\n<h4>What does compatibility look like?<\/h4>\n<ul>\n<li>Web Forms, MVC 5, Web API 2, Web Pages 3, SignalR 2, EF 6, Identity 2 will be fully supported on .NET vNext <\/li>\n<li>MVC, Web API, Web Pages 6, SignalR 3, EF 7, Identity 3 <\/li>\n<li>MVC, Web API and Web Pages have been merged into a single framework MVC 6. For example, there\u2019s now unified controller and routing concepts between all three. <\/li>\n<li>These include some of the following changes which will require modifications to your app.      \n<ul>\n<li>New project system <\/li>\n<li>New configuration system <\/li>\n<li>No System.Web, new lightweight HttpContext (not System.Net.Http) <\/li>\n<li>We will have a migration tool which will help you migrate your application to use ASP.NET vNext on .NET vNext and cloud optimized .NET vNext. This will cover scenarios such as migrating from MVC 5 to 6 and more. <\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>Can I use existing libraries in the Cloud Optimized .NET vNext?<\/h4>\n<p>If the libraries that you were using were already PCL, then you should be able to use them.<b><\/b><\/p>\n<h4>What level of support do we provide for Cross-platform?<\/h4>\n<p>We are actively collaborating with the Mono team so that we can add Mono to our test matrix so we can provide a better experience. We will fix bugs that prevent us from running on Mono. <\/p>\n<h4>Is cloud optimized .NET vNext only for the cloud? Can I use it in my environment?<\/h4>\n<p>Since you are running cloud optimized .NET vNext, your app contains the framework and the libraries needed for the app to run. In this case you can self-host your app, host it in IIS and your own environment.<\/p>\n<h2>More Info<\/h2>\n<p>This section will help you find more information about ASP.NET vNext<\/p>\n<h4>Learn more<\/h4>\n<p>The ASP.NET site has been updated with all new vNext content and walkthroughs.<\/p>\n<ul>\n<li><a href=\"http:\/\/asp.net\/vnext\/overview\/aspnet-vnext\/getting-started-with-aspnet-vnext-and-visual-studio\">Getting Started with ASP.NET vNext and Visual Studio &quot;14&quot;<\/a> <\/li>\n<li><a href=\"http:\/\/www.asp.net\/vnext\/overview\/aspnet-vnext\/overview\">Getting Started with ASP.NET MVC 6<\/a> <\/li>\n<li><a href=\"http:\/\/www.asp.net\/vnext\/overview\/aspnet-vnext\/walkthrough-mvc-music-store\">MusicStore Sample Application for ASP.NET vNext<\/a> <\/li>\n<li><a href=\"http:\/\/www.asp.net\/vnext\/overview\/aspnet-vnext\/walkthrough-bugtracker\">BugTracker Sample Application for ASP.NET vNext<\/a> <\/li>\n<\/ul>\n<h4>Relevant blog posts for ASP.NET vNext<\/h4>\n<p>Following blogs have content related to ASP.NET vNext which are good to read and follow.<\/p>\n<ul>\n<li><a href=\"http:\/\/www.hanselman.com\/blog\/IntroducingASPNETVNext.aspx\">Scott Hanselman introduction to ASP.NET vNext<\/a> <\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/dotnet\/archive\/2014\/05\/12\/the-next-generation-of-net-asp-net-vnext.aspx\">The Next Generation of .NET \u2013 ASP.NET vNext<\/a> <\/li>\n<li><a href=\"http:\/\/blogs.msdn.com\/b\/webdev\/archive\/2014\/05\/13\/asp-net-vnext-the-future-of-net-on-the-server.aspx\">ASP.NET vNext: the future of .NET on the Server<\/a> <\/li>\n<li><a href=\"http:\/\/davidfowl.com\/asp-net-vnext\/\">David Fowler\u2019s introduction to ASP.NET vNext<\/a> <\/li>\n<li><a href=\"http:\/\/weblogs.asp.net\/jgalloway\/archive\/2014\/05\/13\/a-30-minute-look-at-asp-net-vnext.aspx\">Jon Galloway\u2019s 30 Minute Look At ASP.NET vNext<\/a> <\/li>\n<\/ul>\n<h4>Videos<\/h4>\n<ul>\n<li><a href=\"https:\/\/channel9.msdn.com\/Events\/TechEd\/NorthAmerica\/2014\/DEV-B385#fbid=\">The Future of .NET on the Server part 1 &#8211; Overview<\/a> &#8211; Scott Hunter and Scott Hanselman <\/li>\n<li><a href=\"https:\/\/channel9.msdn.com\/Events\/TechEd\/NorthAmerica\/2014\/DEV-B411\">The Future of .NET on the Server part 2 &#8211; Deep Dive<\/a> &#8211; David Fowler and Scott Hanselman <\/li>\n<li><a href=\"https:\/\/channel9.msdn.com\/Events\/TechEd\/NorthAmerica\/2014\/C9-09#fbid=\">Channel 9 Live: ASP.NET Developer Q&amp;A with Scott Hunter, David Fowler, and Scott Hanselman<\/a> <\/li>\n<\/ul>\n<h4>Source Code<\/h4>\n<p>ASP.NET vNext is an open source project released under Apache License Version 2.0. You can follow its progress and find instructions on how to contribute on <a href=\"https:\/\/github.com\/aspnet\">https:\/\/github.com\/aspnet<\/a><\/p>\n<h4>Give Feedback<\/h4>\n<p>&#8211; If you find bugs file issues at GitHub<\/p>\n<p>&#8211; Add suggestions for new features on User voice <a href=\"http:\/\/aspnet.uservoice.com\/forums\/252111-asp-net-vnext\">http:\/\/aspnet.uservoice.com\/forums\/252111-asp-net-vnext<\/a><\/p>\n<p>&#8211; Discuss on the ASP.NET vNext Forums <a href=\"http:\/\/forums.asp.net\/1255.aspx\/1?ASP+NET+vNext\">http:\/\/forums.asp.net\/1255.aspx\/1?ASP+NET+vNext<\/a><\/p>\n<h3>Running ASP.NET vNext on mono, on both Mac and Linux<\/h3>\n<p>Lastly ASP.NET vNext runs on Mono, on both Mac and Linux. We are collaborating with the Mono team to make sure that our ASP.NET vNext stack just works on Mono.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/6471.mac_thumb_6224638D.png\"><img decoding=\"async\" title=\"mac\" style=\"border-left-width: 0px;border-right-width: 0px;border-bottom-width: 0px;border-top-width: 0px\" border=\"0\" alt=\"mac\" src=\"https:\/\/devblogs.microsoft.com\/aspnet\/wp-content\/uploads\/sites\/16\/2014\/06\/6471.mac_thumb_6224638D.png\" width=\"649\" height=\"367\" \/><\/a> <\/p>\n<p>Following are some articles explaining how to run ASP.NET vNext on Mac and Linux.<\/p>\n<p>&#8211; <a href=\"http:\/\/graemechristie.github.io\/graemechristie\/blog\/2014\/05\/26\/asp-dot-net-vnext-on-osx-and-linux\/\">Graeme Christie\u2019s article on running ASP.NET vNext on OSX and Linux<\/a><\/p>\n<p>&#8211; <a href=\"https:\/\/github.com\/akoeplinger\/vagrant-mono-aspnetvnext\">https:\/\/github.com\/akoeplinger\/vagrant-mono-aspnetvnext<\/a><\/p>\n<h3>Known Issues<\/h3>\n<p>Visual Studio side by side support is not available on this early build. Do not install this CTP on a machine with any other version of Visual Studio installed.<\/p>\n<h3>Summary<\/h3>\n<p>Today\u2019s announcement is just a step towards many more awesome features that will be part of ASP.NET vNext. Please do provide your feedback and thank you for trying out the preview.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few weeks ago at TechEd North America we announced ASP.NET vNext. Today we are releasing the first preview of Visual Studio \u201c14\u201d CTP, which will have support for creating and debugging ASP.NET vNext applications. This post will cover what is ASP.NET vNext and give you a walkthrough of what you can do in this [&hellip;]<\/p>\n","protected":false},"author":408,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[],"class_list":["post-474","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet"],"acf":[],"blog_post_summary":"<p>A few weeks ago at TechEd North America we announced ASP.NET vNext. Today we are releasing the first preview of Visual Studio \u201c14\u201d CTP, which will have support for creating and debugging ASP.NET vNext applications. This post will cover what is ASP.NET vNext and give you a walkthrough of what you can do in this [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/474","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/408"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=474"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/474\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}