1

On a visual studio solution containing multiple projects, one compiling to give A.dll and other intending to create A.exe.The A.dll is used as a reference in the project creating A.exe. When attempting to execute project exe prompts the error

TypeLoadException was unhandled:Could not load type 'A.A' from assembly 'A, Version=4.0.0.5, Culture=neutral, PublicKeyToken=null

When I try with different assembly names this is resolved, but yet I require both assemblies to contain the same name, A.dll and A.exe.How is this possible? Any workaround

TheLoneWolf91193
  • 415
  • 7
  • 19
  • This is entirely by design and the way that the CLR searches for assemblies. Easy to see with Fuslogvw.exe, always the tool to use when you have trouble with assembly resolution. The display name does not specify the filename extension so it first tries to find a .exe, next a .dll. You must rename the assembly or store it in the GAC. – Hans Passant Feb 21 '17 at 06:21

0 Answers0