1

Well the problem should be minor....should.

I'm building my program with an assembly referenced with an absolute path (c:\ProgramData\Cryptus) which is obviously there:

dll

The app itself will be run from ...Cryptus\HUB;

exe

The library is referenced and works fine within the designer / editor:

editor

The program also is compiling fine, but when I try to run the program it just gives me the .....Assembly or namespace not found, version = .....stuff. It would be nice if anyone knew where the problem is and how to fix it.

PS: There is no difference when I run with admin rights so that's not the issue.

Community
  • 1
  • 1
  • 2
    You almost certainly need to copy the referenced DLL with your app unless its in a normal path – BugFinder Mar 07 '16 at 14:02
  • What's the actual text of the error? Paraphrasing error messages makes it somewhat hard to interpret. – Glorin Oakenfoot Mar 07 '16 at 14:03
  • @GlorinOakenfoot no it doesnt its just the standard "libary not found" stuff – Sacul Rennorb Mar 07 '16 at 14:04
  • Well unless your DLL is in the windows\system, and .net folders, or other "PATH" variable options, chances are it wont find it. there used to be a sysinternals type app that you could run and it would show how it looked for where it was looking for things like DLLs.. but in short if its not under its nose, or in a pathed place. It wont find it. Especially as the DLL is in the folder above it.. not where your app is – BugFinder Mar 07 '16 at 14:07
  • @BugFinder well i thought i made it clear in the qustion but the path c:\ProgrammData\Cryptus is a referenced path for libarys and visual studio also detects it but when i start the application it wout work cuz of the missing dll ^^ – Sacul Rennorb Mar 07 '16 at 14:11
  • It might be for designtime, but clearly its not at run time. – BugFinder Mar 07 '16 at 14:15
  • @BugFinder ` ` is not at runtime ? – Sacul Rennorb Mar 07 '16 at 14:17
  • Maybe its not about the Assembly in the probing path but the dependencies of that Assembly. Looking at your screenshot there are apparently some subfolders. The fuslogvw tool might help in detecting what really can't be found here. – Ralf Mar 07 '16 at 14:24
  • 1
    The ProgramData folder should only ever be used to, as it says, store program data. The DLL is copied into the wrong directory, the CLR will never find it there. Just don't fight the build system, everything you need should be present in the bin\Release folder. And deployed to the Program Files directory. – Hans Passant Mar 07 '16 at 14:50
  • you shouldn't be doing what you are doing. Put the referenced assembly into the same folder as the executable or in a subdirectory and set the `privatepath` property. Or put the assembly in a folder that is listed in your system's `PATH` variable. – Steffen Winkler Mar 07 '16 at 14:57

0 Answers0