views:

166

answers:

1

I used C# to write a program in .net framework 3.5.

But when i finished that and move it to another computer which .net framework 3.5 is installed , the program can't be start. It miss some dependent dll.

But when I move this program to a computer that installed visual studio 2008, it can run perfectly.

So what can I do to export all the dependent dll automatically ? so my program can run on a computer without installing visual studio 2008 ?

Thanks in advance !

A: 

Actually you just need to include the third party component that your project use.

Edit:

To know them you need go to references and check the Added DLL.

Edit2:

Did you try to make a setup for your project it will automatically collect all the library used in your applications?

another point is, are you using win32 libraries, if yes also you should include them?

Wael Dalloul
yeah I have done this and set copyToLocal = true, but still not work
MemoryLeak
can you show us the message that asks for missing DLLs
Wael Dalloul
No messages, just run in background and can't pop the UI dialog
MemoryLeak
What is the win32 libraries ?
MemoryLeak
Win32 contains native code not like dotnet assembly contains MSIL, Win32 lib or exe produced by C++ or delphi or vb6 etc...
Wael Dalloul
I have included all of them, but still not work and have no prompt messages.
MemoryLeak
In the main form Load for your application try to make log file that store every code line after executing it, and see where is it crashes.
Wael Dalloul
Thanks, i think i only can do this, it is really good idea.
MemoryLeak