Unity application block 2.0 - The given assembly name or codebase was invalid

前端 未结 7 1550
-上瘾入骨i
-上瘾入骨i 2021-01-04 03:26

Interfaces (In the assembly named \"Interfaces\". In project :- Interfaces)

namespace Interfaces
{
    public interface IDoSomeWork1
    {
          


        
7条回答
  •  被撕碎了的回忆
    2021-01-04 04:10

    In case anyone else ever has the same problem - I was also getting this error but had a slightly different problem. I was trying to load an assembly that clearly existed like the following:

    Assembly.Load("C:\\Program Files\\MyProgram\\MyAssembly.dll");
    

    After lots of trial and error I figured out that you aren't supposed to pass the path and you certainly aren't supposed to include .dll extension. The following fixed my issue:

    Assembly.Load("MyAssembly");
    

    Hopefully that helps someone else sooner or later!

提交回复
热议问题