473,465 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Dynamically load a class

Hi all,

I am trying to dynamically load a class, and I'm having trouble
getting past the Assembly.LoadFrom part (or at least I think so)

Error: The located assembly's manifest definition with name
'MyAssemblyName' does not match the assembly reference.

Assembly code:
<Assembly: AssemblyKeyFileAttribute("assemblykeys.snk")>
<Assembly: AssemblyKeyName("MyAssembly")>
<Assembly: AssemblyVersion("1.0.0.1")>

Calling code:
Dim ao As [Assembly] =
[Assembly].Load("MyAssemblyName,Version=1.0.0.1,Culture=neut ral,PublicKeyToken=de602f135d6a367f")
Dim ty As Type = ao.getType(ClassName, True, True)

I have recompiled a few times, so I'm wondering if I have to generate
a new set of keys...or what?

I have had some success getting past this point before, but always got
'Object reference not set to an instance of an object' when I tried to
use the GetType() method.

Any help would be a step in the right direction.

Thanks..
Robin..
Nov 20 '05 #1
0 1006

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

Similar topics

4
by: DotNetJunkies User | last post by:
Hi, Does anyone know how/if you can instantiate a C# reference type object dynamically? More specifically, my project has a number of classes that I've created and in some cases it would be very...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the web...
3
by: Egbert Nierop \(MVP for IIS\) | last post by:
Hi, I have a complex asp.net 1.1 program that dynamically needs to load controls (LoadControl) The textboxes etc inside these controls keep viewstate and values but not within Page_Load() ...
1
by: Reza Nabi | last post by:
Bakground: I have a webform (LoadCtl.aspx) which loads the user control to a placeholder dynamically based on the ctlName querystring passed in the URL. Webform (LoadCtl.aspx) also passes a...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
3
by: Tim Mavers | last post by:
I have created a DLL (class library) in .NET that I need to dynamically load from my ASP.NET application. I am trying to use Assembly.Load(...) to load the file, which is in the /bin directory...
4
by: sydney.luu | last post by:
Hello, I would greatly appreciate if someone can show me how to dynamically build a Repeater with unknown number of columns at design time. I have looked various threads in this newsgroup,...
2
by: ajayreddy2105 | last post by:
Hi All, I want to build the xpath expression dynamically in the xsl for for-each. Scenario is like this:: 1. From javascript I am sending the parameters to xsl. 2. In xsl I am taking those...
2
by: Smithers | last post by:
I have a Windows Forms application that implements a plug-in architecture whereby required assemblies are identified and loaded dynamically. Here are the relevant classes: A = application =...
1
by: filhodapuc | last post by:
How to Load the class "MyContent" dynamically ? I have 1 interface<T>, 1 abstract generic class<T> and 1 class. Check my code out: public interface IMyObjectInterface{ } public abstract...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.