BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News ASP.NET vNext Projects Get Simpler

ASP.NET vNext Projects Get Simpler

This item in japanese

Bookmarks

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

Rate this Article

Adoption
Style

BT