I have recently been working on a prototype web-based admin tool using ASP.NET 5 RC1, and I want to impart some tips along with some issues I ran into and their workarounds. I do realize that the official name has been changed to ASP.NET Core 1.0 and RC2 was released a few weeks ago (5/16). I expect to upgrade soon and will update this post accordingly, but my hope is that this post will help those who are still using RC1.


My first challenge was getting Bower to work because I wanted to use it to manage my client-side libraries. First, I had to make sure the following Visual Studio components were installed using the Change option for Visual Studio 2015 under Programs and Features:

  • Cross Platform Mobile Development
    • Common Tools and Software Development Kits
      • Joyent Node.js
  • Common Tools
    • Git for Windows
    • GitHub Extension for Visual Studio

After this, it still did not work due to an issue with Git.  In the end, I installed a fresh copy of Git and updated the configuration to use the new copy as described in the first answer to this post: http://stackoverflow.com/questions/28725727/vs-2015-bower-does-not-work-behind-firewall.

Moving the Solution

At one point, I decided to move the solution from the sandbox area where I had created it to a more permanent location. After moving the solution, IIS Express no longer worked, so I could not run the web project in debug mode. I had to open “.vs\config\applicationhost.config” under the solution, find the appropriate “site” element under “system.applicationHost\sites”, and update the “physicalPath” attribute to point to the new location of the “wwwroot” folder.

Referencing .NET 4.x Assemblies

First, let me say that using an internal NuGet package is probably a better way to manage dependencies to .NET 4.x assemblies. I have not been able to try this yet, but is seems to be the preferred solution.  In my case, we do not have an internal NuGet Server setup yet, so I had to add the references using the Add Reference function. For this to work, I had to manually add “wrap” to the “projects” list in the global.json file. Visual Studio creates project.json files for each referenced assembly in this folder, but does not add the folder to the project list automatically.

Also, when the external assembly was updated, I had trouble getting the web project to recognize the change. When you add the reference, it copies the assembly to the “lib\dnx451” folder under the solution. Unfortunately, there is no right-click “Update Reference” option. You have to remove the reference, manually delete the assembly from the “lib\dnx451” folder, then re-add the reference. Thankfully, there is a “Recent” area in the Reference Manager dialog so you can just pick the previously referenced assembly instead of having to browse for the file location every time.

WCF Configuration

If one of the .NET 4.x assemblies you are referencing happens to be a WCF service, you might have trouble getting WCF to pick up its configuration data. You need to add an app.config at the root of the project. Putting the WCF configuration settings in the web.config does not work because it is under the “wwwroot” folder and it needs to be at the root of the project.

TFS Integration and Renaming Files

The web project TFS integration doesn’t really handle file renames the way it should, especially if you add a new file, then rename it before checking it in. TFS will still show a pending add for the original file name. You will need to undo that change, then add the new file to TFS using Source Control Explorer.

I hope you found this information to be helpful. If anyone is using RC2, I would love to have an update on any of the issue mentioned above. Otherwise, I will provide an update when I upgrade my project to RC2, which will hopefully be in the next few weeks.