By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,493 Members | 1,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,493 IT Pros & Developers. It's quick & easy.

One kind of error opening codebehind file in Visual Studio.NET 2003 (solved)

P: n/a

after fighting with an issue in Visual Studio.NET 2003 in aspx, I've
finally figured out what it is and maybe you might find it usefull.


When you try to open a .aspx or related file (like a usercontrol) you
receive the message:
"The class file "WebForm1.aspx.cs" specified as the codebehind for
"WebForm1.aspx" could not be loaded. Make sure that the codebehind
in the page or control directive properly references an existing code

My error was:

This is an error message coming directly from the Visual Studio
Envrionment, not any IIS or asp_net thing and can only happen in a
multi-language scenario. I originally had the German Version of Visual
Studio.NET 2003 installed. I then removed that version and installed
the English Version. Unfortunately not all original German Version
things were removed with the result that I had a English-German
mish-mash. Everything worked fine except when locale related things
were accessed.
One case is when you try to open an aspx page. It accesses the
'VS2003\VC#\Designer Templates' Directory and in there is either a 1031
(for german) or 1033 (for english). I have 1033 installed but somewhere
the system still believes it's german and tries to go for 1031 - which
of course it can't find. That in turn causes the error.


Unfortunately as far as I can tell, the only solution for that error is
to completely deinstall VS.NET and make sure that everything is
removed. That includes:

Making sure the registry is clean with:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\ 7.1
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio \7.1

making sure the dirs are gone:

The installation directory for VS.NET.

..\Documents and Settings\[USERNAME]\Local Settings\Application

.\Documents and Settings\[USERNAME]\Application

c:\program files\microsoft visual studio .Net

Once that all is removed and you re-install your VS.NET 2003, things
should be working again. Of course using a locale as part of a
directory isn't exactly the best idea, but there you go...

Eduard Ralph

Feb 1 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.