Monday, June 23, 2008

Running wsewsdl3.exe in Vista 64 with VS2008.

Hi,

I ported a VS2005 project from my old XP machine to my new Vista 64 machine running VS2008.

In my project I was using Wsewsdl3.exe to generate c# code from wsdl definitions.

Wsewsdl3 refused to run with the error:

"Could not get the install directory for .NET Framework v2.0 SDK. Please install the .NET Framework v2.0 SDK."

I know that Wsewsdl3 is a pre-processor for Wsdl.exe and also knew that Wsdl.exe had changed paths between VS versions.

Luckily Wsewsdl3.exe is written in .Net and I was able to use Reflector to disassemble the source and find where it was looking for Wsdl.exe.

Here are the code fragments:

Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\.NETFramework");

key.GetValue("sdkInstallRootv2.0")

When I looked in the registry of the old machine I saw this key.

At this point I installed the .Net 2/0 SDK 

http://www.microsoft.com/downloads/details.aspx?FamilyID=fe6f2099-b7b4-4f47-a244-c96d69c35dec&displaylang=en

This installed itself at:

C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0

Now I opened the registry editor RegEdit.exe, moved to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework and added a new string value with name

"sdkInstallRootv2.0" and value "C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0"

Wsewsdl3.exe now runs.

I hope this has not screwed anything else!

Hope this helps someone.

Andy

4 comments:

David said...

Thanks for the post, it is helpful. You can use this path as well so you don't have to explicitly install the .net 2.0sdk

C:\Program Files\Microsoft SDKs\Windows\v6.0A

Unknown said...

I can confirm that adding a string key named "sdkInstallRootv2.0" at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\ with the value "C:\Program Files\Microsoft SDKs\Windows\v6.0A" works for me as well...


Thanks,
Christian Haugan

Ravi Aakula said...

Thank you a lot for the post.
Instead of installing 2.0 SDk, just serach for wsdl.exe, usually we can find in C:\Program Files(x86)\Microsoft SDKs\Windows\v7.0A for Windows 7 machines and add this value with name sdkInstallRootv2.0 as the registry key.

Ravi.

Hemant Sharma said...

Putting entry in Registry was was helpful...
It workd for me...