I received a few emails outlining problems that people have encountered while trying to compile DocX from source. This post explains how to solve those problems.
Unable to read the project file “DocX.csproj”
Anyone who downloaded change set 17108, this was the build uploaded (Mon at 6:58 PM) would have experienced the following error on opening DocX.csproj in Visual Studio.
There are two ways to overcome this problem,
- You can simply download change set 15663, this is the build uploaded (Thursday at 11:08 AM).
- Open DocX.csproj in a text editor (notepad.exe) and remove the following two lines,
- <Import Project="$(MSBuildExtensionsPath)\DeepSea Obfuscator\DeepSea.Obfuscator.targets" />
Missing reference DocumentFormat.OpenXml
If Visual Studio’s reference window cannot find DocumentFormat.OpenXml then you need to download and install the Open XML Format SDK 2.0.
Test projects missing reference DocX
If Visual Studio’s reference window for the projects CustomPropertyTextApp and StringReplaceTestApp cannot find DocX then you need to update the reference.
First you need to build the DocX, you can do this by right clicking on the project and selecting build.
Right click on the references for both projects and select “Add Reference…”
Select the Projects tab and choose DocX.
That’s it your done, now the entire solution will compile.