Visual Studio 2008 Beta 2: svcutil.exe crashes with WCF Test Client

27 ביולי 2007

4 comments

Visual Studio 2008 Beta 2: svcutil.exe crashes with WCF Test Client

svcutil.exe 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=3.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)
File name: 'svcutil, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' —> System.Security.SecurityException: Strong name validation failed. (Exception from HRESULT: 0x8013141A)
The Zone of the assembly that failed was:
MyComputer
 

I recorded myself reproducing the problem so it will be easier to help me. Can someone please help?

<a href="/files/folders/20875/download.aspx"> <img src="/Themes/default/images/video.gif" border="0" width="300" height="225"> </a><br /><a href="/files/folders/20875/download.aspx">View Video</a><br />Format: aspx<br />Duration: &#8211;:&#8211;

[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:

2.3.7.8 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.

Thanks again!

Add comment
facebook linkedin twitter email

4 comments

  1. Minmin Xue28 ביולי 2007 ב 9:45

    It is possibly caused by a signing problem. Please try the step below:

    Disable strong name signing for svcutil.exe by opening a Visual Studio 2008 Beta2 Command Prompt. At the command prompt run: sn –Vr “\Microsoft SDKs\Windows\v6.0A\Bin\SvcUtil.exe” (replace with your program files path – ex: c:\Program Files)

    Thanks!

  2. SGuy Ge28 ביולי 2007 ב 9:50

    This is a known issue and has been documented in the readme file. Please see the following link for detail and resolution.

    http://download.microsoft.com/download/d/d/1/dd18043a-fe86-4f57-ac22-791b30e6f04b/VSReadme.htm#Windows%20Communication%20Foundation%20(WCF)%20Tools

    2.3.7.8 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 "\Microsoft SDKs\Windows\v6.0A\Bin\SvcUtil.exe" (replace with your program files path – ex: c:\Program Files)

  3. Guy Burstein28 ביולי 2007 ב 9:58

    Thanks guys,

    I really should have read the Readme file more carefully.

  4. Tariq Sheikh20 באוגוסט 2007 ב 15:14

    when i try to run WCF project in VS 2008 beta 2 i get following Error
    —————————
    Microsoft WCF Service Host
    —————————
    The target assembly contains no service types. You may need to adjust the Code Access Security policy of this assembly.
    —————————
    OK
    —————————

Comments are closed.