BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

ASP.NET vNext Projects Get Simpler

by Roopesh Shenoy on Aug 22, 2014 |

ASP.NET vNext alpha3 was released along with the Visual Studio "14" CTP3. Several interesting changes are around ASP.NET projects - simpler project files, ability to specify build event handlers, cleaner source folders and more.

A bit of recap - .kproj files were introduced with ASP.NET vNext and Visual Studio 14. Overall, you would see the following files in a barebones ASP.NET vNext application -

  • project.json file that holds the build information for the ASP.NET vNext project
  • startup class is where you configure the HTTP request pipeline for your application
  • .kproj file which is used and maintained by Visual Studio along with the solution (.sln) file. This holds VS specific information such as VSToolsPath and the project GUID. You do not need this file without Visual Studio, for example, when you run the build from command line or if you use other tools to do your development.

You can read more about these new file formats in the ASP.NET vNext Overview and the ASP.NET vNext and Visual Studio "14" articles.

The legacy project file formats (such as .csproj or .vbproj) list all the compile and content items in an xml format in a separate section. This allowed Visual Studio to list all the project files in the Solution explorer, without having to check the file system. .kproj files initially followed this format but did not require manually adding files to the project - a file watcher listening to file events would update the project file manually. With CTP3, MS has decided to do away with this altogether - now, if you have a file within your source folder where the .kproj file exists, it is assumed to be included in the project.

One immediate advantage of this is that it avoids conflicts requiring merges when multiple developers add files at the same time. Another advantage is that it is consistent with how the runtime uses these files.

This change also makes .kproj files built with CTP2 incompatible with CTP3. You either need to recreate the .kproj file or manually remove the files listed in it to make existing projects created with VS 14 CTP2 work with CTP3. Read the official announcement for more details on how to do this. 

Some other improvements around projects -

ASP.NET vNext represents a fundamental change to how Microsoft constructs and deploys web frameworks. You can read a quick introduction about some of the changes in our earlier coverage on the topic

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT