Click here to Skip to main content
15,912,082 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I need to refer an assembly during runtime.

I have used assembly.loadfile(path), If I use this I am getting a error in the below line.

Html.CodeEffects().Scripts().Render();

Exception: Could not find or load assembly "TestCode, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null". Error message: Could not load file or assembly 'TestCode, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. (Error S103)

Can I know how this can be done.
Posted

1 solution

Using reflection you can add assemblies at runtime.
Using Reflection to load unreferenced assemblies at runtime in C#[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900