Last post Apr 06, 2012 03:17 PM by joel6653_2
Apr 04, 2012 07:06 PM|joel6653_2|LINK
This is driving me nuts. In the Visual Web Developer 2010 Express development environment, I occasionally get this error under one or many tags for a number of my custom controls. It is ONLY a dev env problem, as the site will run just fine. I've googled
and tried many different suggestions. Some conbimation will usually fix the problem after awhile, but I haven't figured out the right steps or the right order yet. I've even seen the problem go away on its own at times.
Among the things I've tried, both alone and in combination: deleting caches in 4 different location (Temporary ASP.NET Files; ReflectedSchemas; WebsiteCache; and VWDWebCache) after I've exited VWD; restarting Windows; re-saving Web.Config; making a minor
edit and then undoing it and saving the control in question; putting a space in the tag name, waiting a few seconds for Intellisense to generate a different error, removing the space, and hoping that the error goes away; and there might be other things I've
tried, too (the list of tricks I've found on google is is so long, I might've forgotten a few).
The point I'd like to reinforce is that there really is no compilation error in the web site, nor is the web.config file missing. This is simply a spurious error that crops up to annoy me, occupy a few minutes to a few hours of my time, and distract me
from getting actual work on the site done.
The application in question is a Web Site project, NOT a Web Application, in case that makes a difference (and no, I have no plans or desires to convert it).
Has anyone else encountered this (what is obviously a) BUG, and successfully resolved the issue? (In case anyone from Microsoft is reading this post, I would especially like to hear from you.)
Oh, I should also mention that this will sometimes progress to other spurious error messages, too, and the same steps may or may not make those go away.
Apr 04, 2012 07:08 PM|robwscott|LINK
are these custom (user) controls?
put in your web.config
Apr 04, 2012 07:12 PM|joel6653_2|LINK
Yes, custom controls (as stated in OP). Already have them registered the way you suggest.
Apr 04, 2012 08:06 PM|joel6653_2|LINK
Here's another one of the error messages (just received, but site still runs fine):
Reference required to assembly 'App_Code.7e2wcf6x, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' containing the type 'Common'. Add one to your project.
('Common' is one of the classes that I have in the App_Code folder.)
Apr 04, 2012 08:49 PM|robwscott|LINK
try making another folder, and putting your classes in there, then reference the folder in your page(s) that you need.
Apr 04, 2012 08:58 PM|joel6653_2|LINK
All my custom controls are in a folder structure like this:
for example: ~/Controls/ItemContainer (which contains the ItemContainer.ascx file and the code file to go along with it)
this full resolve-to-root path is how they appear in web.config, too
Again, I have to stress that the site works just fine (from the server). IIS is able to find and resolve all these controls without error. This is a development environment (my own PC) issue ONLY.
Apr 06, 2012 02:46 AM|Dino He - MSFT|LINK
You only receive the error if you have all the following things:
A Class Library project in Visual Basic .NET.
A Class Library project in Visual C# .NET that refers to the Visual Basic .NET Class Library project.
A method in Visual C# .NET that returns an instance of a Visual Basic .NET class.
Please refer to MS support:
BUG: You receive a "Reference required to assembly" error message when you run a Visual Basic .NET application
Hope it helpful.
Apr 06, 2012 03:17 PM|joel6653_2|LINK
The article at that link says that it refers to a Windows Application project. Mine is a Web Site project. Furthermore, I don't think that VWD is even capable of producing Class Library projects, and I'm also certainly not mixing VB and VC#. Thanks for
the tip, but I'm still looking for a solution.