By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,572 Members | 946 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,572 IT Pros & Developers. It's quick & easy.

why this does not work??

P: n/a
Why this does not work?
/*first option*/

String path = @"C:\TestMethod.dll"; //There is file named TestMethod.dll at
C:\

/*second option*/

String path = "TestMethod.dll"; //There is file named TestMethod.dll at
Current directory

Assembly a = Assembly.Load(path);//File Not Found exception....!!!


Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi Tamir,

You are using the wrong Load method, try Assembly.LoadFile( path ) or
Assembly.LoadFrom

For the different between them, take a look at MSDN, I think that you will
do with LoadFile
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:ue**************@TK2MSFTNGP11.phx.gbl...
Why this does not work?
/*first option*/

String path = @"C:\TestMethod.dll"; //There is file named TestMethod.dll at C:\

/*second option*/

String path = "TestMethod.dll"; //There is file named TestMethod.dll at
Current directory

Assembly a = Assembly.Load(path);//File Not Found exception....!!!

Nov 15 '05 #2

P: n/a
Hi Tamir,

You should use LoadFile or LoadFrom methods.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:ue**************@TK2MSFTNGP11.phx.gbl...
Why this does not work?
/*first option*/

String path = @"C:\TestMethod.dll"; //There is file named TestMethod.dll at C:\

/*second option*/

String path = "TestMethod.dll"; //There is file named TestMethod.dll at
Current directory

Assembly a = Assembly.Load(path);//File Not Found exception....!!!

Nov 15 '05 #3

P: n/a
It's OK now.
Thanks,
MS change it from .NET 1.0 to .NET 1.1 and NOTHING in documentation....

Thank you anyway...
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Tamir,

You are using the wrong Load method, try Assembly.LoadFile( path ) or
Assembly.LoadFrom

For the different between them, take a look at MSDN, I think that you will
do with LoadFile
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Tamir Khason" <ta**********@tcon-NOSPAM.co.il> wrote in message
news:ue**************@TK2MSFTNGP11.phx.gbl...
Why this does not work?
/*first option*/

String path = @"C:\TestMethod.dll"; //There is file named TestMethod.dll

at
C:\

/*second option*/

String path = "TestMethod.dll"; //There is file named TestMethod.dll at
Current directory

Assembly a = Assembly.Load(path);//File Not Found exception....!!!


Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.