FileNotFoundException when using dll method

in Visual Studio I have a solution with several projects. In one project, I added a link to another project. Everything is fine. I see namespaces / classes of another project in autocomplete, etc.

When i try to do

OtherProjectNamespace.Class a = new OtherProjectNamespace.Class();

I get this:

Could not load file or assembly '**OtherProjectNamespace**, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

There is no line, nothing, I tried to try ... catch a new line and not even catch an exception.

What could be the reason?

Thanks Carlos

+3
source share
2 answers

Some possible directions:

  • Does the class you are trying to create create a dependency on the class in another assembly? If so, try adding a link to the third assembly.

  • ? , Copy Local true.

  • , , Fusion Log View ( Visual Studio, fuslogvw.exe VS), , , CLR . , , .

+2

:

" " false. "". .

0

Source: https://habr.com/ru/post/1783902/


All Articles