Dec 30, 2011
I have a solution built of 3 projects:
View 1 Replies
1. VB.NET Class Library - data access and objects, reusable methods, etc.
2. ASP.NET Web app - web application that references the class library
3. VB.NET Windows Form app - windows app that references the class library
I have no problems with the web app. It referenes the class library and every time the project is built the web app gets a freshly compiled dll from the class library.
My problem is with the windows form app. When I first add the reference to the class library project, I get all of the intellisense I'd expect while coding. When I try to compile, though, it's like the reference disappears and all my code that is based on the class library errors out with "'xxx' is not declared" or "'xxx' is not defined" where 'xxx' is a method or class within the class library. If I go into the project properties, the reference is still there, but the project no longer compiles and I also lose intellisense for all classes within the class library. If I remove and re-add the reference, it works again, until I try to compile. Then the errors occur again.
I've tried creating a separate Windows Forms project and just referencing the DLL created by the class library but get the same problem. HOWEVER, if I create a seperate blank WEB project and reference the dll (or the project), everything compiles fine. It seems to be something with my class library being referenced by a windows forms app.
For reference purposes, my class library has the following references:system, system.cor, system.data, system.data.datasetextensions, system.drawing, system.web, system.xml, system.xml.linq I noticed I can't add a reference to System.Web in my windows forms app, and I wonder if my problem is somewhere in this area. I need the reference is my class library because it passes some HttpContext objects back and forth to a few of the methods.