Thanks for commenting on this. This reminded me that I owed a followup on this problem back to the list. My original theory was that “through some magic” having toggled my project’s Framework to 2.0, then back to 3.5 solved the problem. Although I was uncomfortable with such magic, project pressures sent me merrily along my way.
Later however a coworker checked out the project tree and encountered the same problem (not found) with saxon9api.netmodule. The magic (of course) did not work for him. Further analysis uncovered that the solution was actually putting a copy of the netmodule file in one of the “well known” spots where VS2008 apparently looks. In our case we used the \windows\Microsoft.NET\Framework\v2.0.50727 folder. I had missed this cure earlier because apparently one has to restart VS2008 before it looks around again; thus my resort to magic when I later restarted the project.
So, the solution makes at least a little sense. Probably had I created the environment variable for Saxon this wouldn’t have been a problem, but I was attempting to avoid introducing process steps for other developers that went beyond doing an update from SVN. To this end I had put copies of the Saxon related files in a folder within the overall “solution” folder. It worked fine, except for the netmodule file.
Thanks to the others who have replied to this. I'm afraid it's one of those "environmental" problems that's difficult to respond to because it's hard to replicate the environment in which the failure occurs. And although I use some of these tools, I'm often very inexpert in how to configure them. I do find some of these issues of fixing up references are very sensitive to the exact details of your configuration.
From: Bill Cohagan [mailto:email@example.com]
Sent: 18 February 2009 14:39
Subject: [saxon] Build for .Net Framework 3.5?
I am attempting to use the (free) saxon engine in a new project that is using the 3.5 framework. I have encountered 2 problems right out of the gate:
1.) Although the dll’s are registering in the gac as expected (using the cmd file provided) none of them show up in the “Add Reference” dialog within Visual Studio 2008. The workaround is simply to manually browse to the dlls in a known location on the disk, but this is not a desirable solution.
2.) No matter where I put it, the saxon9api.netmodule file is “not found” when I attempt to use the Saxon.Api namespace. The only cure I’ve found for this is to change the project back to using Framework 2.0. While this isolates the problem, it isn’t a solution because my project otherwise requires Framework 3.5.
So, has anyone rebuilt these dlls under 3.5? Is that even possible? I’m VERY reluctant to simply forge ahead and try to do that myself since I have no way of knowing how many layers that particular onion might have! My only option at this point is simply to abandon the use of the Saxon engine and drop back to XSLT 1.x as supported by the native .Net framework. That of course introduces complications at the XSLT level. Groan ….
Thanks in advance,