Visual Studio 2008 Beta 2: svcutil.exe crashes with WCF Test Client
I was very excited about the Visual Studio 2008 Beta 2 Announcement earlier. After downloading, extracting and installing I started playing with the new release. My first attempt was to check out the new WCF Test Client which is very similar to Cassini Web Server – The file system web server that can host Web Services during development and testing.
I created a new WCF Service library and without changing a thing, ran the project. The WCF Test Client started the service, but when svcutil.exe tried to pull some metadata out of it, it crashed.
I received this exception:
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'svcutil, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
File name: 'svcutil, Version=126.96.36.199, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' —> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)
The Zone of the assembly that failed was:
I recorded myself reproducing the problem so it will be easier to help me. Can someone please help?
[Update July 28th, 2007]: Thanks for everyone who took the time and helped me to diagnose this.
I turns out to be a known issue with the WCF Tools in Visual Studio Beta 2. It was written in the ReadMe file, which out of excitement of the new release I skipped reading:
188.8.131.52 Running some WCF-based project templates results in a crash of svcutil.exe crashing due to a signing issue
Running some WCF-based project templates starts the service in WCF Service Host and opens a test form to debug operations on the service. Because of a signing problem, this results in a crash of svcutil.exe and the test form does not work.
To resolve this issue:
Disable strong name signing for svcutil.exe by opening a Visual Studio Command Prompt. At the command prompt run: sn -Vr "<program files>\Microsoft SDKs\Windows\v6.0A\Bin\SvcUtil.exe" (replace <program files> with your program files path – ex: c:\Program Files)
So this is what I did.