Wednesday, September 10, 2008

How to use the Microsoft Solution Generator on a 64bit machine?

Got asked this question today on OzMoss and I thought I'd share the answer with you.

The problem - the microsoft visual studio extensions for WSS do not support 64bit and refuse to install. One useful application in that package has nothing to do with the extensions - it is the solution generator that connects to a list or a site and creates a visual studio 2005 project out of them - as list or site definitions.

So - how to use it if it wont install if my dev box is running 64bit?

Note: My solution has been tested on a win2003 64bit machine, but failed on win2008 - which I assume has to do with the permissions on the IIS. If anyone can solve this problem on windows 2008, I will be grateful (leave a comment).

The solution:

  1. download the VseWSS1.1 but do not install. save the file ("VSeWSSv11.exe") in a temp folder in your hard drive:
  2. Next, using your zip application of choice (I use the free and useful 7-zip), extrace the file. Yes, I know it looks like an exe file, but using 7-zip (or winrar if you prefer), you can get into the files that are compressed in the exe.
  3. In the files you extracted, there will be a file called "VSeWSSv11.msi". Extract that file as well!
  4. Now there will be a lot more files. We are looking for "". Guess what...extract this one as well!
  5. Now we are getting somewhere. The extracted files will now contain the actuall application files for the solution generator, including the "SPSOLGEN.EXE" file. However, we are not quite there yet.
  6. The final step is renaming 3 files:
    "SPDTFRES.DLL" to "Microsoft.SharePoint.Tools.FileResources.DLL"
    "SPDTRES.DLL_1033" to "Microsoft.SharePoint.Tools.Resources.DLL"

There you go! now you are ready to double click on "SPSOLGEN.EXE" and roll with it. You may want to copy the files to a reasonable named folder first though...

Oh, as I mentioned, this will not work on windows 2008 64bit, not because of the 64bit (I suspect) but because of permissions issues. If anyone has win2008 32bit, can you check and let me know if it works there? and if anyone knows a workaround - let me know!
Just for the record, the error I get on 2008 is "No SharePoint Site exists at the specified URL." when I start the generation.

One last note - the project file generated is for visual studio 2005. If you are like me, and are using vs2008, then instead of using the project file it generates, create a new project, and import the files that were generated. Preferably, a WSPBuilder project...


Jeremy Thake said...

Thanks, you're a life saver! Saves me rebuilding a heap of VMs as 32 bit! ;-)
As I said in ozmoss forum I typically use this for reverse engineering list template schemas.

Gavin said...

If you want a VS2008 project extract SPSOLGEN.EXE etc fromm the v1.2 edition of VSeWSS as this is for VS2008

Zac Boyles said...

These steps got the 1.2 working for me on server 2008. I noticed you said at the bottom you use vs 2008 so this might help you.
These steps are thanks to:

No x64 support again!? Time to hack the installer with Orca.

1. Run VSeWSSv12.exe

2. Copy C:\Program Files (x86)\MSECache\vsewssv12.en-us to a temp folder

3. Open Orca (from the platform SDK) and load VSeWSSv12.msi

3. Cut out InstallExecuteSequence>X64System, InstallUISequence>X64System, InstallExecuteSequence>WSSNotInstalled, and InstallUISequence>WSSNotInstalled.

4. Run edited MSI

5. Use at own risk! (you will not be able to deploy/debug automatically)

Alain Picard said...

Thanks so much for the great tip.