Home > Net >  Avoid having to copy referenced assemblies into application directory
Avoid having to copy referenced assemblies into application directory

Time:02-10

When deploying new builds of applications, I find that applications built by another dev would have the structure:

  • ApplicationName.exe
  • ProprietaryClassLibrary.dll
  • associated config files.

However, when I deploy a version I have built, I start to get "Could not load file or assembly" type errors. These can be "resolved" by including the named assembly in the application folder. So now I would have (for example):

  • ApplicationName.exe
  • ProprietaryClassLibrary.dll
  • System.Data.SqlServerCe.dll (for example)

But my question is- if these aren't references I've added, and the version hasn't changed, why do I now need to include them in the application folder? I don't necessarily want to have to include copies of libraries that are already in the GAC or installed elsewhere on the server if I don't need to- but am open to suggestions on best practice.

I have checked my the references' settings in VS to change "Copy Local", "Specific Version" as well as Path, but with limited success.

Any pointers on what might be causing this?

Thanks.

CodePudding user response:

  •  Tags:  
  • Related