vendredi 5 juin 2015

Post-build ditrective syntax

I received this dreaded error, related to ClosedXML, when I deployed my project to the server.

The project runs locally, though.

Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

So I placed the "missing" DLL file in /binDLL

I then added the following cmd line directive:

Copy "$(SolutionDir)binDLL\DocumentFormat.OpenXml.dll" "$(ProjectDir)$(OutDir)"

When I build, I get a build error

Error   17  The command "Copy "C:\Projects\MyProject\binDLL\DocumentFormat.OpenXml.dll" "C:\Projects\MyProject\bin\"" exited with code 1

Aucun commentaire:

Enregistrer un commentaire