Problem with Sept 1 Version

Sep 2, 2009 at 3:17 AM

It may be just me, but I downloaded the version of the source code you uploaded today (Sept 1) for the Aug '09 CTP version of the SDK. I extracted it and tried to open the solution with VS2008.

The first message I got was

The project file ...API.UnitTest\API.UnitTest.csproj cannot be opened. The project type is not supported by this installation.

Any idea what that is about? I can't figure it out. The project file is there, but VS2008 does not like it.

Running it (anyway), I got the following build errors which are likely due to the missing API.UnitTest project.

Error    1    Cryptographic failure while signing assembly 'C:\Clients\Experiments\FlexDoc1\Api\obj\Debug\FlexDoc.Api.dll' -- 'Error reading key file 'c:\Clients\Experiments\roberttekaat.snk' -- The system cannot find the file specified. '    Api

Error    2    Metadata file 'C:\Clients\Experiments\FlexDoc1\Api\bin\Debug\FlexDoc.Api.dll' could not be found    Cmd

Thanks Phil

Sep 2, 2009 at 8:22 AM

Hello Phil,

Your version of Visual Studio probably does not support MSTest-projects (Api.UnitTest).

Error 1: You have to disable strong-name signing, or create your own keyfile. Check this issue:

Error 2: You get this error because the Api-project could not be compiled. Solve Error 1 and you also solved this error.

Within a few weeks I plan to create a first release of fleXdoc. You then get the pre-built DLL's (packaged as MSI) which you can simply reference in your own Visual Studio projects, so you don't have to compile the sources yourself.


Sep 2, 2009 at 1:23 PM

Thanks for replying so quickly. flexDoc seems to be exactly what I need to generate (server-side) a bunch of letters based on extracts from a database. All the other mail-merge approaches seem to be lacking, especially when it comes to server-side.

I loaded the solution without the API.UnitTest (My version of VS2008, Standard Edition, does not have Unit Test support, nor does it seem to have key signing).

So I used your suggestion and disabled signing.

Following the instructions found at the top of Program.cs, I got the solution to build and run.

I don't expect you to debug all this for me, but I then got this error:

error when building the document: Package validation errors/warnings:/word/docum
ent.xml (xpath: /w:document[1]/w:body[1]/w:p[5]/w:r[2]/w:drawing[1]/wp:inline[1]
/wp:docPr[1]): [Semantic] Attribute 'id' should have unique value. Its current v
alue '1' duplicates with others.
/word/document.xml (xpath: /w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:p
[1]/w:r[1]/w:drawing[1]/wp:inline[1]/wp:docPr[1]): [Semantic] Attribute 'id' sho
uld have unique value. Its current value '1' duplicates with others.

I'm happy to wait for the msi release version but I expect to need this code in a few weeks and was planning to use my time learning about it. What I can then do is post my experiences back in a way that might help others.

Like most of us, the fun in this stuff is learning something new.

Thanks again, Phil

Sep 2, 2009 at 1:43 PM

You are getting a semantic validation error. Semantic validation was added to the most recent version of Open XML SDK. I fixed the code of fleXdoc to work with the new SDK, but haven't tried it myself yet (deeeeeply ashamed! ;)).

I think Word has no problem opening the generated file, even though is not 100% valid OOXML. If you don't want to be bothered with the error, for now you can disable validation. I just added an issue to remind myself to fix this problem asap:

Sep 2, 2009 at 4:40 PM
Edited Sep 2, 2009 at 4:40 PM

Sorry about that, maybe I'm the first guy through your latest version.

I disabled the validation. Only problem is it does not produce any output file (that I can find).

What I need to do, I may not be able to do with flexDoc. I have a database full of names and addresses (and other details) and a one page template in Word that I want to mail merge, server-side. So the entire template repeats, rather than some section in it. Any hints for me?

I'm going to stop bothering you now, I kinda got into this just as I was packing for a vacation. I'll see where we're at when I get back in a week and maybe I can help somehow.


Thanks Phil


Sep 14, 2009 at 7:36 PM

I fixed the drawing validation error.

You may want to call the api or the console-app that comes with it once for every record you find. You can create the XML for one specific record yourself, instead of having SQL server handle it for you, but that part you'll have to figure out yourself, since that's not a problem that fleXdoc was designed for: it's only an API...