473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

.net assembly question...

I have a windows c# application trying to load in an assembly (windows
control assembly that I built). I first do :

Assembly subAssembly =
Assembly.LoadFrom("c:\\bookmanager\\customereditor \\bin\\debug\\CustomerEditor.dll");
Object newSubApp = subAssembly.CreateInstance("CustomerEditor");

newSubApp always returns NULL. I checked and subAssembly.entrypoint is not
defined, which has to be the problem. I'm not sure how to fix.

I did verify my controls do work in a windows app that have direct
references to.

Nov 16 '05 #1
3 1165
You're probably missing the namespace.

Try subAssembly.CreateInstance("YourNamespace.CustomEd itor");

-vJ

"JT_74" <JT***@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
I have a windows c# application trying to load in an assembly (windows
control assembly that I built). I first do :

Assembly subAssembly =
Assembly.LoadFrom("c:\\bookmanager\\customereditor \\bin\\debug\\CustomerEditor.dll");
Object newSubApp = subAssembly.CreateInstance("CustomerEditor");

newSubApp always returns NULL. I checked and subAssembly.entrypoint is
not
defined, which has to be the problem. I'm not sure how to fix.

I did verify my controls do work in a windows app that have direct
references to.

Nov 16 '05 #2
Your problem is probably that you left out the namespace. You need to
provide the full name. Change the line as follows:

Object newSubApp = subAssembly.CreateInstance("<namespace>.CustomerEd itor");

Substitute the name of your namespace appropriately.
--

Chris Rolon
"JT_74" <JT***@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
I have a windows c# application trying to load in an assembly (windows
control assembly that I built). I first do :

Assembly subAssembly =
Assembly.LoadFrom("c:\\bookmanager\\customereditor \\bin\\debug\\CustomerEdit
or.dll"); Object newSubApp = subAssembly.CreateInstance("CustomerEditor");

newSubApp always returns NULL. I checked and subAssembly.entrypoint is not defined, which has to be the problem. I'm not sure how to fix.

I did verify my controls do work in a windows app that have direct
references to.

Nov 16 '05 #3
thanks! I'm learning from a book. That very basic item stumped me for a
while. Stupid book.
-JT

"Vijaye Raji" wrote:
You're probably missing the namespace.

Try subAssembly.CreateInstance("YourNamespace.CustomEd itor");

-vJ

"JT_74" <JT***@discussions.microsoft.com> wrote in message
news:B6**********************************@microsof t.com...
I have a windows c# application trying to load in an assembly (windows
control assembly that I built). I first do :

Assembly subAssembly =
Assembly.LoadFrom("c:\\bookmanager\\customereditor \\bin\\debug\\CustomerEditor.dll");
Object newSubApp = subAssembly.CreateInstance("CustomerEditor");

newSubApp always returns NULL. I checked and subAssembly.entrypoint is
not
defined, which has to be the problem. I'm not sure how to fix.

I did verify my controls do work in a windows app that have direct
references to.


Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Marian | last post by:
Hi, I am totaly novice in .NET and I am studying a book about this. There was mentioned "assembly". I did not understand, how function does it has . I would like to know the exact run of code...
10
by: Simon Wallis | last post by:
I know the general purpose for the GAC is to share a component among many applications. But even when you add something to the GAC, you still have to manually create a reference to the DLL in your...
2
by: Chris Dunaway | last post by:
I'm writing an app that processes orders for various customers. For most customers, the processing is the same. However, a few customers require custom processing in addition to the standard...
10
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
2
by: Brad | last post by:
I have one of those seemingly simple questions that evades/confuses me. I've created an assembly with bass classes (classes meant to be inherited in other assemblys). In a secondary assembly (my...
8
by: Umut Tezduyar | last post by:
I know that, in asp.net 2.0, the assembly for the web site is splitted into pieces and each time you build it, it generates a random name for assembly. My question is, if i create a custom web...
4
by: Brian Richards | last post by:
Is it possible to run code in an assembly when it's loaded? In my case I have an assembly that requires that the users path be setup correctly or GetTypes() will throw an exception. Looking for a...
2
by: Luis Arvayo | last post by:
I am compiling and executing c# code at runtime and I need to define in CompilerParameters.ReferencedAssemblies one of my own assemblies together with the standard System.dll u others. Example:...
12
by: TC | last post by:
I'm trying to figure out what the "Friend" keyword does. I know it specifies that "elements are accessible from within the same assembly", but that doesn't help because I don't know what an...
10
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Hi everybody, I'm trying to use the new VB 2008 right now and I want to know how to preset the company name and copyright informtion in Assembly Information. In my current VB 2005, company name...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.