Click here to Skip to main content
15,072,391 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:

I am using WeifenLuo.WinFormsUI.Docking dll.

I want to include that dll into my project. When I do so, I get an error
Could not load file or assembly 'WeifenLuo.WinFormsUI.Docking, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Please help me with this.

Updated 7-Aug-14 5:08am
StM0n 7-Aug-14 3:46am
Did you change the reference to "Copy local"?
nikita2410 7-Aug-14 4:00am
StM0n 7-Aug-14 4:04am
When do you get that error? By runtime or compile?
nikita2410 7-Aug-14 4:07am
StM0n 7-Aug-14 4:16am
is the dll in your output folder?

(Sorry for asking so many questions :)
nikita2410 7-Aug-14 5:31am
Its ok :)
I want to embed dll.. Understand this, i just wanna give the application not the respective dll with it.
StM0n 7-Aug-14 5:38am
So you want to deploy just an exe w/o any dlls...?
nikita2410 7-Aug-14 11:09am
dll should get included in the exe
StM0n 7-Aug-14 11:58am
after a merge it will be included... you will create a single exe (at least I hope, this is your request?)
nikita2410 8-Aug-14 3:36am
no it isnt!
StM0n 8-Aug-14 4:13am
which part: this isn't your request or "create a single exe"?
nikita2410 8-Aug-14 7:23am
my request
Alan N 7-Aug-14 9:03am
Please edit the question to include what you mean by "embed".
nikita2410 7-Aug-14 11:08am
Alan N 7-Aug-14 15:01pm
Not really, you just changed the word embed to include. Your responses to other questions suggest that you want to use the executable without the libraries that it requires. That doesn't make much sense! Please explain what you did to 'include' or 'embed' the WeifenLuo assembly.

The default settings for a project in Visual Studio would copy the assembly into the output directory where it should be. So what did you do?
nikita2410 8-Aug-14 1:39am

I want to give my application to my clients as an exe. but i dont want my dll to go on their machine. As it will open up my system.
So i want to include in the exe.
Alan N 8-Aug-14 9:43am
If your program requires the dll to run then it MUST be deployed. Using ILMERGE is the only reasonable option to produce a single assembly.
StM0n 8-Aug-14 10:54am
Alan N 8-Aug-14 13:06pm
It's like getting water out of a stone! I suspect the dll has been added to the exe's resources but I don't think I'm ever going to find out.
StM0n 8-Aug-14 14:04pm
I dare say you're right.

1 solution

Maybe ILMerge[^] could be helpful.

I didn't read this article[^] but it could also clearify things a little :)
nikita2410 7-Aug-14 7:01am
but that will only merge!!!
StM0n 8-Aug-14 10:54am
did you try and check if this fulfill your requirements...?
jokler.007 8-Aug-14 9:39am
hello when you add an .DLL to your project after compiling the project it appear in the bin folder with the .EXE download ILMerge and use it to merge the .EXE and the .DLL ,hopping that will help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900