5

In VS2015 Community, when I create an ASP.NET 5 project, I get many errors with namespaces and I'm not sure why that is.

I have downloaded VS2015 Community and have downloaded Microsoft ASP.NET and Web Tools 2015 (Beta8) and followed the install instructions on the Web Tools Beta8 page and installed .NET Version Manager (Beta8) prior to the Web Tools. In VS2015, I click on New Project, go to Web within the Visual C# section and select "ASP.NET Web Application". Then I select the "Web Application" template within ASP.NET 5 Preview Templates. It creates my project. I can start debugging by click on the green play button with "IIS Express" text and the page loads in my web browser as it should. However, almost all of the namespaces are flagged as '"Cannot resolve symbol". I have tried uninstalling and reinstalling and that has not worked. In the Solution explorer, I have two references, DNX 4.5.1 and DNX Core 5.0 and these have a fair number of references within those. I noticed that only DNX 4.5.1 has "Framework Assemblies" containing Microsoft.CSharp, mscorlib, System and System.Core.

The same issue occurs when I select the "Empty" ASP.NET 5 Preview Template

Images: What my Startup.cs looks like in VS2015, References in Solution Explorer

1 Answer 1

6

I had the same issue. The problem was in ReSharper, it cannot resolve namespaces using new ASP.NET 5 namespaces approach (using project.json) I have installed the latest version of ReSharper (9.2), which supports ASP.NET 5 and the issue was resolved.

Sign up to request clarification or add additional context in comments.

1 Comment

Updating my ReSharper to version 9.2 resolved the issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.