28

I have developed a lot of class library projects in VS 2012 to be used in Windows Forms and Web forms applications.

The question is simple. Do I need to deploy the DLL file itself together with the XML file that is created?

For example, the class library project is called DataWare. Upon building, I got 5 files in Release folder (this project reference Entity Framework):

  • DataWare.dll
  • DataWare.pdb
  • DataWare.dll.config
  • EntityFramework.dll
  • EntityFramework.xml

I know that ".pdb" file contains debugging information, so there is no need to deploy. The ".config" file is not taken into account. Instead the App.config or Web.config are.

Regarding this, I think I have to deploy just DataWare.dll and EntityFramework.dll.

However, the main doubt is if I need to deploy EntityFramework.xml as well.

Regards Jaime

2 Answers 2

35

The XML file contains the doc comments for the public types & members in the assembly.

You only need it if you want Visual Studio to show documentation in IntelliSense.

If you're deploying a consumer-facing app (as opposed to a developer-facing reusable library), you do not need it.

2
  • 1
    Thanks.... and finally.... the Exe file has also a ".vshost" file.... that is not need to deploy, is it?
    – jstuardo
    Commented Aug 24, 2015 at 21:39
  • 1
    Correct; that's only used by the debugger.
    – SLaks
    Commented Aug 24, 2015 at 21:40
1

No, in most cases you do not need it. If there is an external DLL that needs to be copied local and referenced using the config, then you might need to, but that is somewhat rare.

4
  • This is not a config file, and DLLs cannot have config files at all.
    – SLaks
    Commented Aug 24, 2015 at 21:40
  • Curious then, why have the [dllname].dll.config file at all? I thought in some cases (like with Newtonsoft) the class library needs to know the location of another DLL for it to work. Commented Aug 24, 2015 at 21:53
  • .dll.config files should not exist at all, unless you add an App.config to a DLL project (which you shouldn't).
    – SLaks
    Commented Aug 24, 2015 at 22:38
  • 1
    @SLaks: Any specific reason for avoiding it? So I have got a WPF desktop application and a Word VSTO add-in both of which form a thin UI layer on top of a class library. I'm using built-in .NET Settings Provider to store some user-level settings in the library project. Is there any downside to it? Otherwise I'd have to duplicate entire bunch of user-settings in both UI projects.
    – dotNET
    Commented Jan 31, 2022 at 6:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.