开发者

DLL Dependencies in C#

I produced a DLL from a source project. Let's call i开发者_Python百科s sourceProject.dll.

This project depends on first.dll, among other DLLs.

   sourceProject.dll --> first.dll 

When I run sourceProject.dll, I get an error that first.dll is "missing one or more project references".

If I understand correctly, sourceProject.dll is trying to use a class in first.dll, but apparently first.dll has a bad reference to one of its own DLLs. As a result, first.dll gets built again (at the run-time of sourceProject.dll), but it's built incorrectly. Finally, sourceProject.dll blows up because first.dll is bad.

Is that true?

thanks, Kevin


When I run sourceProject.dll

You cannot run DLLs in .NET. You use assemblies in applications which can be of different types (console, WinForms, ASP.NET, ...). So if sourceProject.dll depends on first.dll the application that uses sourceProject.dll need to have both assemblies in its working folder (current folder for desktop applications and bin folder for ASP.NET).


My be your fist project is not included in the solution build. check the configuration manager from right click in the solution files.

I you want to work this was you have to build your first project (manual) before you build the other one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜