Class Library Reference Disappearing Upon Compiling?

Dec 30, 2011

I have a solution built of 3 projects:

View 2 Replies


ADVERTISEMENT

Forms :: Class Library Reference Disappearing Upon Compiling?

Dec 30, 2011

I have a solution built of 3 projects:

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.

View 1 Replies

VS 2010 How To Add A Project Reference To A Class Library

Feb 23, 2012

I've created a class library and it's shared by several projects I'm working on.

I added a reference to the DLL - but it appears to have copied it locally - and that's causing problems when I modify the class library. Seems I have to drop the reference and re-add it.

I'm seeing info on the web about adding a PROJECT REFERENCE but can't seem to get that to work.

What is the best method of sharing a class library with several other projects.

Actually - should all my projects be in one SOLUTION? Is that preferred.

It will be 5 projects all working with the same class library...

View 3 Replies

Compiling Path And Reference

Sep 2, 2009

Suppose I have a solution containing several projects. I set the compiling path as ..in folder. A reference file xxx.dll is used in project aaa, yyy.dll is used in project bbb etc.

xxx.dll and yyy.dll are stored in c:sharedlls folder.

My question is that if I compile the entire solution, do xxx.dll and yyy.dll are draged into ..in folder automatelly?

I am not clear the purpose of the compiling of the solution exactly.

View 4 Replies

Include Reference Dll When Compiling Program?

Sep 14, 2008

I've made a program using Visual Basic Express Edition which references MySql.Data.dll (located at C:Program FilesMySQLMySQL Connector Net 5.2.3Binaries.NET 2.0MySql.Data.dll) which has been installed on my computer. But when I run my compiled program on a different computer (without MySQL Connector/.NET installed) I am unable to start the program as it gives me an error.

I'm wondering if there is a way to compile the dll with my program so that I wouldn't have to install MySQL Connector on the only computer it'll be executed on (I'm not sure if I have the privilege to install programs on it yet).Or is there a way I could import the dll at runtime which is located in the same directory as my .exe?

View 3 Replies

VB2010 Class Library: Create A Static Library Instead Of DLL?

Jun 21, 2011

I have a Visual Basic Class Library project. It generates a DLL. Is there a method to generate a static .LIB to which I can do a static link?Alternatively, can I do a static link against a DLL?

View 6 Replies

Null Reference While Compiling Resourcefiles In A Project Converted From 2008?

Feb 15, 2010

I just tried to convert some of my Projects from VB2008 to VB2010 RC, but got compiling Errors while compiling the resX Files. Seems like the reason are ImageLists/Icons, since if I remove them the files compile fine. I already tried to edit the Forms witch are showing the Errors with the Designer. The Designer changed the Content of the resX file lightly, but the error was still present Here the Error(German Version): 'FormsfrmUserTmpBUTable.resx : error RG0000: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.' I recall a similar error in the Beta, but since I can't find it anymore, I guessed it was fixed.

View 4 Replies

.net - Vlc Dll Library Compiling - Error "Clase No Registrada (Excepción De HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"

Jan 13, 2011

im developing a desktop program where i use VLC libraries but when i compile de code on visual studio .net and i try to execute the binary on clean windows installation dont work and give me this error message

[Code]...

View 1 Replies

Compiling A Class Module Into A .dll File

Feb 23, 2009

I want to know how can convert (compile) a class module into a .dll file. You can refer to me an article, tutorial or a code sample.

View 1 Replies

Surrounding My Class With A Namespace Cause All Other Classes To Stop Compiling

Jan 26, 2012

I have a large web app in vb.net 4.0. Its default namespace is configured in its project properties. None of the root-level classes in our app are surrounded by namespace declarations. When I add a .asmx file to the root folder of the website, it compiles fine, but it doesn't work for some reason (already asked why in other topics). So to get it to work, I try to surround the class declared in the .asmx by a namespace declaration. As soon as I do this, I go from zero compiler errors to about a zillion. My app can't find ANYTHING in the root namespace. But I haven't changed any other files, only this .asmx file.

WHY is it behaving this way? How do I prevent it from behaving this way without refactoring the entire app? I would love to blank out the default namespace and add them explicitly around every root-level class, but I'm not sure that would fly with our release manager, and I don't even know if it would fix the problem.

View 1 Replies

How To Add Reference To Library

Apr 16, 2010

I was looking at tutorial that was detailing how to Build a Class Library Component and Consumer Client Application. One of the steps involved was how to add a reference to a library. Am I right in assuming that the reason for adding a reference is to show Vb where class library is located. I would also like to know if it is possible to add the reference within the code. In the tutorial the reference was added via the top menu (selecting project and add reference).

View 4 Replies

Adding A Windows Service Class To A Class Library

Feb 14, 2012

I have a class library in VB.NET that does a NET-envelope for an USB device driver.There is only one function of that driver that I could not envelope in a traditional class, but I had to put it in a Windows Service as described here:Sharing a class property (field) between applications.The Windows Service works fine, but I have now two projects for my NET-envelope: the one with the class library, the second with the windows service and I do not like the idea to maintain two distinct projects for the same driver.Is it a good practice (or even if possible) to add a windows service class to a normal class library (without creating its own project as described in the vb tutorial)?I know, in any case I should create a separate setup only for the windows service, but in this way I could have together all the classes that envelope my usb device driver in only one project.

View 1 Replies

Set Reference Path To DLL Library?

Feb 10, 2009

I want to use IWshRuntimeLibrary library to create shortcut icon, i know how to use it within the VS IDE, just add it as reference. My problem is im creating the program on the fly using CSharpCodeProvider. So how do i reference the library in my source code. it will work if i use it from VS IDE, i got some hints on the web and try it ,but it doesnt load the assembly. The line below is what i got from the web but it doesnt work . "DLLFILES" is the folder that i put the IWshRuntimeLibrary.dll AppDomain.CurrentDomain.AppendPrivatePath(Application.StartupPath + \DLLFILES); i put this line the mainusing IWshRuntimeLibrary; //refrence the library,

View 12 Replies

Creating An Instance Of A Class From A Class Library?

May 18, 2010

I've createda vb.net class library where I've defined a number of small classes... nothing complicated, just working with strings, sending emails, etc.In another project, I reference the class library and I'm seemingly able to create an instance ofone of tclasses - intellisense shows me all of the plic properties, methods, etc... all looks perfect. No compile errors at all, nothing b gumdropsand lollipops.When I run the app I'm working on that references the class library, it fails at the point where I'm creating an instance of the class and gives me a vague exception, "System.TypeLoadException".

View 2 Replies

Private And Public Class At Class Library

Mar 12, 2011

I'm posting this there is a relationship with my previous post [URL]

I have two projects, namely:

1. Project1 (Windows Application)

2. Project2 (Class Library)

in Project2 there are several classes:

* frmLogin.vb
* frmCustomer.vb
* clsGlobals.vb

in my case, I want to frmLogin.vb and frmCustomer.vb not called in Project1 and I can only call is clsGlobals.vb

View 8 Replies

Can't Reference Outlook Object Library

Aug 16, 2009

This is strange. I tried to create a new project to reference the Outlook Object Library, but I can't get the code references to work. Here's what I'm doing:

Quote:# Start Microsoft Visual Studio .NET.# On the File menu, point to New, and then click Project.# Click Visual Basic Projects under Project Types, and then click Console Application under Templates. By default, Module1.vb is created.# Add a reference to the Microsoft Outlook 12.0 Object Library. To do this, follow these steps:

1. On the Project menu, click Add Reference. 2. Click the COM tab. 3. Click Microsoft Outlook 12.0 Object Library, and then click Select 4. Click OK. If you are prompted to generate wrappers for the library that you selected, click Yes.

# In the Code window, replace the default code with the following code:

[Code].....

View 1 Replies

COM Classes - Library - Reference To En External Dll

Dec 20, 2011

I have a .net class library that works fine. This library has a reference to en external dll. I have converted all its class to comclasses and checked the com interopt checkbox in order to use it as com library. I also registered it with regasm.

[Code]...

View 5 Replies

Add A Microsoft Speech Object Library Reference?

Nov 28, 2010

So I would like to explain what am I doing before I post the question. I would make a textbox in the form, then I add a Microsoft Speech Object Library reference. Then using Microsoft Speech, I would have the text-to-speech option. In the same class I would add this code:

[Code]...

View 1 Replies

Add Reference To Microsoft HTML Object Library?

Mar 11, 2012

Okay normally this was easy to do, but now with IE9 Visual Studio 2010 hangs and crashes. The problem seems to be even worse because you can't build an Interop.mshtml.dll to match version 9. I've tried using the VS command prompt with no luck. Allegedly this is how it is done, but there are no known examples that actually work. If anyone has done this with success

View 3 Replies

How To Reference A C++ Library In Asp.net Form Application Writen

Jan 8, 2011

Im trying to write a simple c++ dll and then reference it in my vb form app however im having a hell of a time doing so. but im getting an error when i call the c++ function in vb.net

here is the c++ code
#include <WINDOWS.H>
LPCSTR DisplayStringByVal(LPCSTR pszString)

[code]....

View 2 Replies

Is The Reference Library Is Available In VB 2008 Express Edition

Apr 12, 2010

Is the my reference library is available in visual basic 2008 Express Edition?

View 1 Replies

VS 2008 : Adding Excel Library Reference Is Not Working?

Sep 20, 2009

I'm a VBA programmer and can do Office integration in Office applications.I'm programming in VB in VSTS 2008 and following these steps to create an Excell application at runtime: [URL] but it is not working.The issue I'm having is when I add the reference, the library is not recognized by VBE intellisense and compiler, so: the code doesn't run.When I use late binding technique and declare variables as objects, the code runs OK, but I don't want that way.I tried adding the references in two different ways:

1 - Menu Project / Add Reference / tab COM / Microsoft Excel 11.0 Object Library / OK

2 - Menu Project / VB Properties / References / Add / Microsoft Excel 11.0 Object Library

Both methods didn't work.

View 11 Replies

Unable To Load The Type Library For Reference "MSCommLib?

Jun 24, 2010

I have a big problem.I'm starting with Visual Basic (2008) and I get this error when you want to run the program,

Warning 2.Unable to load the type library for reference "MSCommLib.Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) prjRxData

View 5 Replies

Made A Class Using New->Class Library

Nov 17, 2009

I have made a class using New->Class Library. I have 2 constructors, 1 function (that computes length of circle), one subroutine that computes area of circle, and main subroutine.

Public Class Class1
Class Circle
Dim rad As Double

[CODE]...

My problem is when I try to run the program: No errors of syntax.

What I must do? I need to right click in solution explorer add new item->add->class and copy here this code?

After I write the code I chose from the vb menu: Build->Build Solution_name

Before writing the code I choose File->New->and selected class library then save all to save as a project.

Or class library is only a dll file that runs with a windows forms application. (that is added after i write the code for write library).

View 7 Replies

Compiling Error 'The Value "Ctrl" Can't Be Found' While Compiling VB2008 Imported Project

Feb 15, 2010

In one of my forms witch I imported from VB2008 there are all properties saved in the *.resx file. One Property, of the Type System.Windows.Forms.Keys, can contain the Value 'Ctrl+F1' witch compiles fine in VB2008, but not in VB2010. To reproduce, simply add the following to any resx file:

<data name="cmdFenster.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>Ctrl+F1</value>
</data>

It will compile fine with VB2008, but not with VB2010. Notice: The VB2010 also generates this Code in the resx file

View 2 Replies

How To Assign A Different Reference To A Class Instance From Inside The Class Code

Jan 18, 2011

my proble is the following: I have a class MyClass and another class Modifier, which has a method ModifyMyClass(ByRef mc as MyClass) that receives a MyClass instance as ByRef parameter to modify it. A smell of the code is:

[Code]...

View 4 Replies

VS 2008 Reference Parent Class From Inside Child Class?

Apr 11, 2009

I have a 'property management class' that contains several functions and properties. I have several other classes that use the 'management class' as a property to derive the value of several of its other properties.Is there a way for me to reference the outer class from the 'management class' functions without having to pass it as a parameter? I ask because several different classes can have this 'management class' as a property and am having a hard time typing the parameter.

View 7 Replies

Visual Basic 2010 Express Reference Library Offline Support?

Nov 13, 2010

I was able to use the VB off line iso file to install VB 2010 Express but it did not include the Reference Library

View 9 Replies

Class With Class Properties: AObject Reference Not Set To An Instance?

Aug 19, 2009

I have a class in which some of the fields are also classes.I can put values in the "normal" properties, but in the others when o try to assign values it gives the: "Object reference not set to an instance of an object"But the code compiles fine.

dados_Defenicao = New ServiceReference1.draftClaimEntryDefinition
dados_Defenicao.arCode = "123"
dados_Defenicao.claimMarket.warrantyType = "w" - Here it gives the error

How can i fix this ?

View 6 Replies

Class With Class Properties: Object Reference Not Set To An Instance

Aug 19, 2009

I have a class in which some of the fields are also classes.

I can put values in the "normal" properties, but in the others when o try to assign values it gives the: "Object reference not set to an instance of an object"

But the code compiles fine.

dados_Defenicao = New ServiceReference1.draftClaimEntryDefinition
dados_Defenicao.arCode = "123"
dados_Defenicao.claimMarket.warrantyType = "w" - Here it gives the error

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved