C# type defined in an assembly that is not referenced

后端 未结 7 1259
梦毁少年i
梦毁少年i 2021-01-01 23:00

I have two projects A and B. Project A makes use of type X in project B, so I have a reference to B added in A. Everything built fine.

I signed project B using a s

7条回答
  •  生来不讨喜
    2021-01-01 23:45

    This also happened to me.

    In my case, the problem was that from a solution A I was referencing projects from a solution B (I changed the name of a project from B). When I tried to compile A, it tried to find the old name of the project in B.

    I added again the new reference of this project, recompile and so on but unhopefully it did not work.

    The problem was fixed when I added again all the reference of B in A. I was loading old DLLs that were compiled with the old project of B. These DLLs had some kind of cross interaction with the old reference.

    I hope this work for someone else.

提交回复
热议问题