Posts

Showing posts with the label Visual Studio 2015

A Fun Bug in Visual Studio 2015 ASP.NET 5 Projects, And How To Fix It

I've been encountering a fun bug in an ASP.NET 5 project in Visual Studio 2015. From time to time, I get messages like the following when trying to compile the app: The type or namespace name 'AspNet' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) The fix for this is to simply remove one of the references from your project.json file, save the file, then re-add the reference and save the file again. All of that removing and re-adding causes the packages to get updated. A weird problem, but thankfully, a simple fix until a real one is implemented.

How to Get ASP.NET 5 Apps To Run Under IIS

Recently I've been working on a web application using ASP.NET 5 and today had to deploy it to a web server in our test environment. Here are the steps I took to get this to work: Published the website project in Visual Studio 2015 by right-clicking on the project and selecting "Publish", I used the file system publish option, and specified the 64-bit version of the runtime we're using (in this case, 1.0.0-beta5). This is important, as I was unable to get IIS to host this website using the x86 version. I specified a path outside of the solution directory for the publish output. Inside the publish directory, the publish process created 2 folders -- approot and wwwroot, as well as a file called web (no extension), and web.cmd. On the web server, I created a new folder for the website. Inside this folder, I placed the output from the publish (the approot and wwroot folders and the two web files). I created a new website in IIS on the web server. For the app pool, I se...