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.
Figure 1.0 – Unable to read the project file “DocX.csproj”
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).
or - Open DocX.csproj in a text editor (notepad.exe) and remove the following two lines,
- <DeepSeaObfuscate>false</DeepSeaObfuscate>
- <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.
Figure 1.1 – Missing reference DocumentFormat.OpenXml
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.
Figure 1.2 – Test projects missing reference DocX
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.
Figure 1.5 – Select the projects tab
That’s it your done, now the entire solution will compile.
No comments:
Post a Comment