Why Does .NET Class Library Show "My" And "My.Resources" Namespaces In Reflector
Jan 16, 2009
I have no intention of using "My" for anything in any of my projects. I haven't done anything with it (that I know of). But every one of class libraries shows a "My" namespace in Reflector and NDepend. This adds a lot of unnecessary clutter.
1) Why does it show up?
2) How can I remove it?
View 2 Replies
ADVERTISEMENT
Jul 13, 2010
Is something like this possible?
Namespace Transaction, Document
Class Signer
Public Sub New()
[Code].....
I basically want to be able to instantiate the Signer class from either Namespace. The reason is that I mistakenly set it up in the Transaction class and need to migrate it over to the Document class without breaking existing legacy code. I'd prefer to not have the same Signer class duplicated in both Namespaces if possible.
View 3 Replies
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
Sep 27, 2010
Is it possible to have a single class reside within two name-spaces and how can I do this?
To clarify: We have a class library (let say root namespace is classLib1), which has grown over time (more classes) and I want to logically group classes into different namespaces. However some of the older classes need to be grouped into these new namespaces (e.g classLib1.section1) and doing so will break legacy code in other assemblys that use this class library. So I want to be able to refer to a class using both name-spaces until we can phase the old ones out.
I can't find any information on this, which suggests there is a reason that people would not want to do this!?!
View 3 Replies
Oct 13, 2009
After being spoiled for years with C# automatically setting the default namespace for new classes to match my folder structure, I'm wondering if there is any way to get VB.NET to do the same?
I've been aware for awhile that it doesn't do this automatically but I've never really researched alternatives. keep my VB.NET class namespaces in sync with my project folder structures?
View 1 Replies
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
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
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
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
May 18, 2010
how to disable NET Reflector .. I want my application doesnot open with NET Reflector how can I do this
View 1 Replies
Jan 26, 2012
Im trying to get softehci.interop.dll to show up as a com library in vb.net how do i get it to show up because im trying to use it but it doesnt even show up in vb.net or i could use it as a dotnet library.Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering -
View 3 Replies
Oct 19, 2009
I have added a .jpg file to the resources folder in my project. I then added the file as a resource so it shows up under the resources folder in the Solution Explorer. However, when I go to call the resource file in my code it doesn't show up in the list of available resources. Here is what I am trying to do:
[Code]....
View 1 Replies
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
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
Apr 20, 2010
I don't know if this is the right place for this. I've used Red-Gate's Reflector to disassemble .NET dlls and applications. I was wondering if there's an equivalent for non .NET products.
[Code]...
View 6 Replies
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
Oct 18, 2009
Can I create my own class library, possibly to be sold commercially, in VB.NET?
View 2 Replies
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
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
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
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
Jun 10, 2009
I want set in class library like this [code]....
View 4 Replies
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
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
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
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
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
Jun 8, 2010
I am not sure of the proper, or best, way to use Settings and Resources. For now I use the default project wide My.Settings and My.Resources. I have a class that I would like to reuse in other projects, so adding project wide settings or resources in each project doesn't sound proper, nor does creating constants and variables within the class itself.I'm guessing there is a way to give a class its own resource file, and maybe even settings file, but I'm not sure how to do it. I tried adding a resource file with the same name (but with .resx extension) and I got a weird error saying I was trying to edit a resource that is apart of another project. I continued, but it didn't seem to be what I wanted and I wasn't sure how to access that new resource.
View 3 Replies
Jun 18, 2012
Recently I retrieved code of my project EXE file. And it was almost same with 100s of errors. So my question is Is career in .NET is safe? And is our code safe? Can this be done with other languages?
View 3 Replies
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