About Me

My photo
Hello, my name is Cathal Coffey. I am best described as a hybrid between a developer and an adventurer. When I am not behind a keyboard coding, I am hiking and climbing the beautiful mountains of my home country Ireland. I am a full time student studying Computer Science & Software Engineering at the National University of Ireland Maynooth. I am finishing the final year of a 4 year degree in September 2009. I am the creator of an open source project on codeplex.com called DocX. At the moment I spend a lot of my free time advancing DocX and I enjoy this very much. My aim is to build a community around DocX and add features based on requests from this community. I really enjoy hearing about how people are using DocX in their work\personal projects. So if you are one of these people, please send me an email. Cathal coffey.cathal@gmail.com

Thursday, March 12, 2009

Compiling DocX from source code

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.

Unable to read the projectFigure 1.0 – Unable to read the project file “DocX.csproj”

There are two ways to overcome this problem,

  1. You can simply download change set 15663, this is the build uploaded (Thursday at 11:08 AM).

  2. Open DocX.csproj in a text editor (notepad.exe) and remove the following two lines,
    1. <DeepSeaObfuscate>false</DeepSeaObfuscate>
    2. <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.

imageFigure 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.

imageFigure 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.

imageFigure 1.3 – Build DocX

Right click on the references for both projects and select “Add Reference…”

imageFigure 1.4 – Add reference…

Select the Projects tab and choose DocX.

imageFigure 1.5 – Select the projects tab

That’s it your done, now the entire solution will compile.

No comments:

Post a Comment