My project is expecting a dll in the bin but it can't find it
-
25-05-2021 - |
Question
I have copied a project from my old XP machine to my new Win7 machine. It's a console app targeting the .net 2.0 framework. It uses a reporting tool called Active Reports. Active Reports has a series of dlls in the Program Files directory that are referenced in the project. When the project is run I get the error
Could not load file or assembly 'file:///C:\PROJECTPATH\bin\Debug\ActiveReports.Interop.Dll' or one of its dependencies. The system cannot find the file specified.
There is no need for this dll to be in the bin and when I copy it there the project doesn't even build.
Why is VS expecting the dll to be in the bin?
Solution 2
It looks like the build of Active Reports I was using (4.2.1.1238) wasn't compatible with Win7. I re-installed Active Reports with a newer build (4.2.1.1261) and I'm no longer getting the error.
OTHER TIPS
Check if there is a warning on the reference to the Active Report DLL in your project references. The path might not be the same on your win7 machine as on your XP machine.