Class Library (DLL) And Distributing?

Oct 7, 2011

I'm in the midst of developing a class library DLL for a third party application. On my machine, the developers machine, things are going along smoothly. I can compile/build and my DLL is loaded, and thus works as expected.

I've been copying the contents of the Release directory from C:Solutions...Release to C:ProgramDirectory. I realize now that my DLL is loaded into memory from the Release folder, and not the folder I copied it to.The point being of course, I want to distribute this third-party add-in to my users. And sure enough when I try that, presumably the DLL isn't loaded into memory and thus not available to the user, like it is on my machine.

I tried the first obvious thing and registering the DLL on the user's machine, but that failed."The module "..." was loaded but the entry-point DLLRegisterServer was not found." It's apparent I am missing some key step or caveat when it comes to developing this class library.

View 15 Replies


ADVERTISEMENT

Create An Application Without Distributing A Referenced Class Library

Mar 1, 2011

I am using VB .NET 2003. I have created a user defined Class Library and created a reference to it in my application. Is there a way I can compile the application so that the Class Library DLL is embedded into the application? I would really like to be able to distribute the application without having to distribute the DLL as a second a file.

In other words, I made a New Class Library lets say called TEST. I developed a new class within this library called MYCLASS. I built the Library TEST and created TEST.DLL. I then made a new visual basic project called APP1. I added a reference to TEST.DLL. I now can use TEST.MYCLASS within my APP1 project. The application APP1.EXE will run in the test environment, but if I move it to the runtime environment it will give me an error "File or assembly name TEST or one of its dependencies was not found". To correct this error I can place TEST.DLL in the directory where APP1.EXE resides. I would prefer not to have to put TEST.DLL in the directory. Can I easily compile it into APP1?

View 15 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

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

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

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

.dll In Class Library?

Dec 29, 2009

there's a lot of dlls i've got one in the Release folder and one in the Debug folder under bin, there seem to be one in the obj folder as well.they all seem to work fine, but which should be the correct one?

View 4 Replies

Class Library Or Not?

Oct 18, 2010

I have two projects; A and B, where B needs to use some classes that are in project A. Hence, I added B to A's solution, and in B I added a reference to project A.

Is that sensible? Or should I rather put those classes in a class library?

I see that if I further want to open form/program B from a menu option in project A, then A needs a reference to B. Which would not be possible if B already had a reference to A. However if I use the class library for the common classes, then it's ok as B doesn't need the A reference.

Does this sound logical? It would be nice to know what are typical reasons for putting projects in the same solution, and if it's advised to use libraries aggressively to refactor common code between two projects, even if it's just a couple of classes.. Yet I've never made my own library, so a bit unsure on when to use it.

View 5 Replies

ConnectionString In Class Library

Apr 27, 2011

I'm merging two of my projects that can share a lot of the same classes into one solution with two web applications and a shared class library.

I've literally just dumped all the classes into the class library project and as expected I've got a ton of errors to fix. My main problem at the moment is the connection string. Currently I have this (which is obviously not going to work):

''' <summary>
''' Initialise the data access layer by loading the database connection string from the Web.Config file

[Code].....

View 1 Replies

Build My Own Class Library?

Oct 18, 2009

Can I create my own class library, possibly to be sold commercially, in VB.NET?

View 2 Replies

Class Library Access In WCF?

Jun 30, 2011

I have two classes in two files in a class library project, they are:

Public Class Logins
Public CurrentUser As Login
Public Function Authenticate(ByVal id As String, ByVal pw As String)

[Code].....

View 1 Replies

Class Library Events?

Mar 6, 2012

I`ve made a .NET component in C#. After that, i`ve created a class library in VB.NET and added this C# component and a couple of buttons to the library (creating another component now with buttons). So far, so good.The problem is: when i use this final component (vb.net class library), i want to link all MouseClick Events of its own components (buttons and C# component). In other words, when i add this final class library to my VB solution, it has its own MouseClick event. But when i click inside it doesnt raise the click event unless i do not click in the buttons or in the C# component inside it. I want to raise this event in the application wherever i click (inside or outside its own components).

View 14 Replies

Convert A Class Library For Use In GAC?

Sep 18, 2009

My objective is to take a .vb class file that is used on multiple local applications/web sites and convert it to a .dll file that would would be deployed to the servers that we use.The code all works, I can build my class library project with Visual Studios 2008 Pro and end up with a DLL.I can then drag and drop the DLL into any application or website and use it successfully What I'm missing is how to compile it correctly so it will do two things;

1. Get it to show up as a .NET component

2. Get it to NOT scream at me when I try to reference it.

I think part of my problem is that I've been looking up assemblies and dll's when maybe I should have been looking at component authoring.No, I don't want to just stick with the drag and drop into local bins. I might as well just copy and paste the original .vb at that point.

View 6 Replies

Set Parameter In Class Library?

Jun 10, 2009

I want set in class library like this [code]....

View 4 Replies

Using App.config In A Class Library

Jun 30, 2008

I was dangerously close to high-jacking another thread, so I thought I should create my own. We make class libraries so we won't duplicate code, but what about settings? I have a large solution that I've created a project in for common material, which includes an app.config. The problem is that a class library isn't an "app" so my functions can't get to the values. How do I get around this?

View 20 Replies

Using The Namespace In A Class Library?

Aug 15, 2010

I am attempting to use the My.Computer.FileSystem namespace in a WPF VB.NET usercontrol library. I get no Intellisense etc for this namespace. I imagine I need to add a reference but no amount of googling has fixed this and VS.

View 1 Replies

VS 2008 Using A Class Library

Jul 24, 2009

I have a legal copy of a dll that I've used for years in VB6. Now I want to use it in VB.net. However, when I try to reference it, VB.net won't let me, displays an error. Tried to register the dll, got a no entry point error.

[Code]....

View 6 Replies

VS 2010 Class Library (dll) With Ocx

Oct 12, 2011

I'm creating a dll (class library project) file for an OCX. I have an OCX (not Active X, just normal ocx and no need to put on form in order to use it.) which I normally call it from normal windows project's code behind. However, in order to use this OCX, I need to install one software and register with the correct license key.

[Code]...

View 2 Replies

Writing A Class Library?

Apr 9, 2012

OK, so its many years since I last did anything with VB5 and I now have a requirement to write code in VB2010uld like to put together a proof of concept for a project I am involved in.A lot of our coding exists as VBScript, but I need to add some functionality that VBScript does not offer, and the obvious path is to create a .NET DLL that can be called from VBscript. What I want to be able to demonstrate is the ability to edit a hex character at offset 15 from the beginning in a file not exceeding 2000 bytes. The filename of the target file will be passed from VBScript.

So from a vbscript perspective I would be coding something like:
dim‚myObj, filepath, decval, offset
filepath = "c: emp estfile.bin"

[code].....

View 2 Replies

C# - Call .NET 4.0 WPF Class Library From 2.0 Application

Apr 8, 2011

I have an application written in .NET 4.0 that i compile into a DLL file. I want to be able to use this DLL file in a Windows Forms .NET 2.0 application. I don't need the application to really interact much, except just passing a couple string values to the 4.0 DLL. The DLL is pretty much a bunch of Windows which i converted to UserControls and i just need to be able to reference them to display the UserControls from the 2.0 application without having to use a different exe and having to package them separately.

What is the best way to do this? Because when i try to add the reference to the DLL to the 2.0 application, it gives me and error saying the DLL is built in a newer version of .NET so i can't do it that way. Is this where a COM object would come in?

View 2 Replies

Call A Function In A Vb Class Library (dll)?

May 31, 2011

How do I call a function in a visual basic class library?

View 7 Replies

Call Script From A Class Library?

Mar 20, 2011

I have created a class library DLL to be referenced from any third-party application and it contains only one function that calls a JavaScript to read a local file and returns some values from the file to referencing application.[code]...

View 1 Replies

Class Library Config File?

Sep 18, 2009

I have written a vb.net class library that pulls the url for a web service out of my.settings. However, at runtime it no longer bothers to read the class.dll.config file that it made.I want to deploy this dll in different environments and be able to custom choose the relative webservice via the class.dll.config file.

View 3 Replies

Class Library For The Matrix In VB10?

Apr 15, 2012

is there a library for the matrix like the library of the complex numbers for example?

View 2 Replies

Class Library Missing .sln File?

Sep 2, 2009

My co-worker gave me a class library project without .sln file. I can implement it by add the .dll file. I want to know if i can open this project in visual studio and modify something in there. How can I open this file?

View 1 Replies

Class Library Vs. Windows Application?

Sep 28, 2010

Here is code in a form that is called from the "main" form:Imports

System.Data.SqlClient
Imports
ClassObjects
Imports

[Code]...

frmOdyssey is the main form, from which frmSearch is called. After the above processing, I want to go BACK to frmOdyssey to process the FilFilterGrid sub on the Grid defined on frm Odyssey. I will be assigning a new DataSource for the Grid, which will be "selected down" by the strFilter. The above code works with no issue whatsoever in "Windows Application" mode. However, if I switch to "Class Library" mode, I get
an error on the last line of the last Sub, telling me "Reference to a non-shared member requires an object reference". If I uncomment the "Dim f As New frmOdyssey" line, and change the "frmOdyssey" to "f" on the next line, the error goes away, but then the process doesn't work, because the "select down" does not happen. I don't know why, except that "logically" I don't want a "new version" of the frmOdyssey. I want to update the existing form.

View 8 Replies

Config File On Class Library?

Mar 16, 2006

Got a solution with 3 projects, a Web Service, a WinForms (MyUI), and a Class Library (Foo).

MyUI calls methods in the DLL that access the web service. The DLL has project config settings that store the URL of the web service. I compile the solution and it compiles all 3 projects. In the DLL's bin dir it puts the foo.dll and foo.dll.config files. However, in the WinForms bin dir it puts the MyUI.exe, MyUI.exe.config, and foo.dll; it doesn't include the foo.dll.config. When I run the MyUI.exe from its bin dir, it appears to work, and is obviously getting the config settings from somewhere because it doesn't crash and successfully contacts the web service. However, if I copy the foo.dll.config file into the MyUI's bin dir, and change config settings and re-run, it appears to ignore my changes completely.

In the Class Library I setup the config settings through the project properties dialog under the Settings tab. I access them from code using My.Settings.

How do I modify the config settings post-compile?

View 1 Replies

Control Form With Class Library

Oct 27, 2009

I have trouble to control my form using with the class library. I am trying to set the form to maximum and set the form border to none. There is an error in come to the end of the statement next to the test.myform.[code]The error I have received is Object reference not set to an instance of an object.

View 6 Replies

Convert A Module To Class Library?

May 21, 2011

I have a single solution with 2 projects. One project contains all my forms and some other modules and the other project has 1 module with 1 giant class in it. I try to click on properties and change the output type, but it won't let me make it a Class Library, the only 2 options are "Windows Application" or "Console Application". The startup object is the module, and the project has references to a socket component.

View 2 Replies







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