4
Answers

Cannot load Assembly

Photo of pootle

pootle

15y
4k
1
VS 2008
C#

Hi

I am sure this me being a numpty.
I create a DLL from a C# class project. I stick it in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727. I create a new project, set a reference the DLL and refer to the DLL in code. All the objects and methods appear in intellisense. It builds correcly.

If I execute, as soon as I reference a method that references this DLL I get hwat appear to be a compile time error:
"Could not load file or assembly 'myAssembly' Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

There are no dependencies. The file is where I referenced it from.

Please could someone point me in the right direction?

Many Thanks

Answers (4)

0
Photo of veronica.colacci
NA 5 0 20y
Thank you Mykonian - I appreciate the explaination.
0
Photo of Mykonine
NA 520 0 20y
Semi-C programmer here. Hopefully you did accidentally come back... To hardcode this, I would define the conversion factors using preprocessor directives. Use a Switch statement to choose between the conversion factors.
0
Photo of veronica.colacci
NA 5 0 20y
Sorry - did not know I was in the wrong forum. I am not asking for someone to do it - I was asking for help in understanding it, but that's okay - I will look for understanding elsewhere. Thank you for your response - I appreciate it.
0
Photo of james
NA 1.1k 313k 20y
Okay, two things my dear.... #1... you're in a forum for the WRONG language, this is a C# forum, not a C forum. #2... we don't help people with their homework here. Read your textbook and I'm sure you will figure this out on your own. -James