Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

In VS 2013 Web Applications cannot reference their own classes

$
0
0

I create a new empty web project. It can be either the new VS 2013 "Asp.Net Web project" with the "Empty" checkbox checked, or the VS 2012 "ASP.NET Empty Web Application template.

I create a couple of classes in the root of the project:

publicclassTest1{}publicclassTest2{publicTest2(){var test1 =newTest1();}}

and the project compiles fine. If I put the cursor on Test1  within Test2 and hit F12 I get taken to the Test1 declaration. However, if I close VS 2013 and then reopen it I can no longer F12 to it. Instead I am offered the opportunity to create the class.

The project still compiles okay however  occasionally I even get the red wiggles under the referenced class and an error message in the Errors list saying that it is not known.

If I open the project in VS 2012 it is fine. (However, for a larger solution this is not the case, even in VS 2012 I get similar problems).

The projects are targeting .NET 4.5. I have the same problem on two different PCs, one with Win 7 and one with 8.1.


Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>