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.

Comments

Popular posts from this blog

A Generic Method Using HttpClient to Make a Synchronous Get Request

The Cause and Solution for the "System.Runtime.Serialization.InvalidDataContractException: Type 'System.Threading.Tasks.Task`1[YourTypeHere]' cannot be serialized." Exception

"$.ajax is not a function" Error When Using jQuery and Darren Johnstone's ASP.NET Upload/Download Module v2