473,396 Members | 1,875 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,396 software developers and data experts.

TypeResolve & GetType()

I've a piece of code which does Type.GetType("full.type, name") on a
type that is located in an assembly that is currently not loaded.
I don't have control over the code that call this and I don't have any
control on the string that get passed.
I wanted to use TypeResolve to handle this, but it doesn't get call for
static assemblies.

Any ideas how I can handle this?

Nov 17 '05 #1
3 1346
This event is not called if the runtime knows that requested type cannot be
retieved from an assembly. Does the type you're requesting exists in the
assembly?
--
Vadym Stetsyak aka Vadmyst
<ay****@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I've a piece of code which does Type.GetType("full.type, name") on a
type that is located in an assembly that is currently not loaded.
I don't have control over the code that call this and I don't have any
control on the string that get passed.
I wanted to use TypeResolve to handle this, but it doesn't get call for
static assemblies.

Any ideas how I can handle this?

Nov 17 '05 #2
It exists, but the assembly is not loaded, that is the problem.

Nov 17 '05 #3
I'm already subscribing to AssemblyResolve, but it's not getting
called, and I don't know why.

Nov 17 '05 #4

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

Similar topics

1
by: phancey | last post by:
I am trying to invoke a web service method dynamically. I have created a generic function that takes a method name, string of parameters and calls the web method using System.Reflection: ...
5
by: ayende | last post by:
I've a piece of code which does Type.GetType("full.type, name") on a type that is located in an assembly that is currently not loaded. I don't have control over the code that call this and I don't...
2
by: Shmuel Cohen | last post by:
I have a class holding some enumerated types, i.e., public class MyEnums { public enum DATA_ITEM {FIRST, SECOND, THIRD,FOURTH,FIFTH}; ... } And I have a class the contains data, for example:
3
by: Fredrik Wahlgren | last post by:
Hi I found an interesting piece of code which shows how to makee an Excel automation add-in at http://www.codeproject.com/dotnet/excelnetauto.asp. I decide to experiment with it and i made a few...
7
by: Clint Herron | last post by:
Howdy! I posted this question on CSharpCorner.com, but then realized I should probably post it on a more active newsgroup. This will be my only cross-post. I'm creating a game engine, and...
1
by: | last post by:
The following code: Private Sub ClearControls(ByVal ctrl As Control) Dim i As Int32 For i = ctrl.Controls.Count - 1 To 0 Step -1 ClearControls(ctrl.Controls(i))
12
by: Michael Maes | last post by:
Hello, I have a BaseClass and many Classes which all inherit (directly) from the BaseClass. One of the functions in the BaseClass is to (de)serialize the (inherited) Class to/from disk. ...
4
by: marcmc | last post by:
Hi, I hope to create a XML file that will hold my Connection data to a SQL Db. I want to write an XML file from 4 Text Box named UserName, Password, Database & Server and later read from it. My...
1
by: Sky | last post by:
Yesterday I was told that GetType(string) should not just be with a Type, but be Type, AssemblyName. Fair enough, get the reason. (Finally!). As long as it doesn't cause tech support problems...
3
by: | last post by:
Hello, I try to open a new Window in code behind with : ClientScript.RegisterClientScriptBlock(this.GetType(), "MyOpenScript", "window.open('toto.doc');", true); My problem is that the new...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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
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,...

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.