By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,516 Members | 1,126 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,516 IT Pros & Developers. It's quick & easy.

project runs fine in visual studio, but not as a standalone exe. Why?

P: n/a
I have a vb 'solution' which has 2 projects, one of which produces an
exe, and one of which produces a dll. (The exe uses the dll). When I
click on Debug/Start-without-debugging, it works well. But if I close
Visual Studio, and then double click on the 'exe', I get into
trouble. An error message comes up saying:
"System.IO.FileNotFoundException: Could not load file or assembly
'clslib' or one of its dependencies."
It sounds like either the exe cannot locate the dll, or the dll itself
cannot locate some of its dependencies (it depends on several dlls I
got from a developer).
But I'm not sure what I should do about this. Should I make a new
directory, and copy the exe, the dll, and all dependent dlls to that
directory? And why does it work when run from within Visual Studio?
Thanks,
HA

Jul 16 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Jul 16, 4:38 pm, HONOREDANCES...@YAHOO.COM wrote:
I have a vb 'solution' which has 2 projects, one of which produces an
exe, and one of which produces a dll. (The exe uses the dll). When I
click on Debug/Start-without-debugging, it works well. But if I close
Visual Studio, and then double click on the 'exe', I get into
trouble. An error message comes up saying:
"System.IO.FileNotFoundException: Could not load file or assembly
'clslib' or one of its dependencies."
It sounds like either the exe cannot locate the dll, or the dll itself
cannot locate some of its dependencies (it depends on several dlls I
got from a developer).
But I'm not sure what I should do about this. Should I make a new
directory, and copy the exe, the dll, and all dependent dlls to that
directory? And why does it work when run from within Visual Studio?
Thanks,
HA
I would generate EXE with a setup project. As long as the EXE project
is configured to "depend" on the DLL project, you should be good to
go.

Jul 16 '07 #2

P: n/a
On Jul 16, 3:38 pm, HONOREDANCES...@YAHOO.COM wrote:
I have a vb 'solution' which has 2 projects, one of which produces an
exe, and one of which produces a dll. (The exe uses the dll). When I
click on Debug/Start-without-debugging, it works well. But if I close
Visual Studio, and then double click on the 'exe', I get into
trouble. An error message comes up saying:
"System.IO.FileNotFoundException: Could not load file or assembly
'clslib' or one of its dependencies."
It sounds like either the exe cannot locate the dll, or the dll itself
cannot locate some of its dependencies (it depends on several dlls I
got from a developer).
But I'm not sure what I should do about this. Should I make a new
directory, and copy the exe, the dll, and all dependent dlls to that
directory? And why does it work when run from within Visual Studio?
Thanks,
HA
Is the .dll located in the same folder as the .exe?

Chris

Jul 16 '07 #3

P: n/a
On Jul 16, 5:35 pm, Chris Dunaway <dunaw...@gmail.comwrote:
On Jul 16, 3:38 pm, HONOREDANCES...@YAHOO.COM wrote:
I have a vb 'solution' which has 2 projects, one of which produces an
exe, and one of which produces a dll. (The exe uses the dll). When I
click on Debug/Start-without-debugging, it works well. But if I close
Visual Studio, and then double click on the 'exe', I get into
trouble. An error message comes up saying:
"System.IO.FileNotFoundException: Could not load file or assembly
'clslib' or one of its dependencies."
It sounds like either the exe cannot locate the dll, or the dll itself
cannot locate some of its dependencies (it depends on several dlls I
got from a developer).
But I'm not sure what I should do about this. Should I make a new
directory, and copy the exe, the dll, and all dependent dlls to that
directory? And why does it work when run from within Visual Studio?
Thanks,
HA

Is the .dll located in the same folder as the .exe?

Chris
That was it! I had to copy the dll and the exe, and all the secondary
dlls that the dll depends on, to one folder. Then I double clicked on
the exe, and it found the dlls.
Thanks,
HA

Jul 17 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.