locked
failed to generate project CSharp\Test\TestProject.zip

    Question

  • I am attempting to use Pex for the 1st time
    I installed the academic version without a problem
    When I right click on my project in VS2008, I get the following failure message:

    An unexpected error occured while trying to apply the following steps. Review the failures by clicking on the failed items.

    Step 1: Create a new Project or Assembly xxx

    Update result:
    failed to generate project CSharp\Test\TestProject.zip


        Add or update project XXX Project.Tests


    Any ideas?  I searched this forum and the help documentation and this error was not mentioned.

    Thanks in advance

    Wednesday, February 25, 2009 8:25 PM

Answers

  • Turns out it was a file path issue - if the path is too long, it fails silently.  Just point to a shorter path and you will be all set
    Wednesday, March 25, 2009 2:25 PM

All replies

  • The current implementation of Pex expects that you have Visual Studio Unit Test installed on the machine (it comes with pro). You probably do not have it on your installation. The workaround would be to create a test project Pex manually: new project, add Microsoft.Pex.Framework.dll, write parameterized unit tests.

    Are you using any test framework?
    Jonathan de Halleux
    Thursday, February 26, 2009 12:54 AM
    Owner
  • I have this installed:

    Microsoft Visual Studio 2008
    Version 9.0.30729.1 SP
    Microsoft .NET Framework
    Version 3.5 SP1

    Installed Edition: Enterprise

    Microsoft Visual C# 2008   91899-270-5845042-60055
    Microsoft Visual C# 2008

    Microsoft Visual Studio Team System 2008 Architecture Edition   91899-270-5845042-60055
    Microsoft Visual Studio Team System 2008 Architecture Edition

    Microsoft Visual Studio Team System 2008 Database Edition   91899-270-5845042-60055
    Microsoft Visual Studio Team System 2008 Database Edition

    Microsoft Visual Studio Team System 2008 Development Edition   91899-270-5845042-60055
    Microsoft Visual Studio Team System 2008 Development Edition

    Microsoft Visual Studio Team System 2008 Test Edition   91899-270-5845042-60055
    Microsoft Visual Studio Team System 2008 Test Edition

    Microsoft Visual Web Developer 2008   91899-270-5845042-60055
    Microsoft Visual Web Developer 2008

    Crystal Reports    AAJ60-G0MSA4K-68000CF
    Crystal Reports Basic for Visual Studio 2008

    Enterprise Library Configuration Editor   4.0
    Microsoft patterns & practices Enterprise Library Configuration Editor

    Microsoft Pex   0.9.40114.0
    Microsoft Pex Visual Studio Extensions

    Microsoft Stubs   1.0.0.0
    Stubs generator for Visual Studio


    Due to space limitations, I had to install VS on drive E while my projects are stored on drive C.  Could that be it?

    Thursday, February 26, 2009 1:57 AM
  • Can you check that this file exists? this is the file expanded by the template:

       %program files%\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\Test\1033\TestProject.zip
    Jonathan de Halleux
    Thursday, February 26, 2009 5:19 AM
    Owner
  • It's there on the E Drive
    I copied the file to the same path on the C drive and got the same result

    Thursday, February 26, 2009 10:35 AM
  • Could you try to create the test projet manually, i.e. throuig the Add New Projet -> Visual C# -> Test -> Test Project
    Jonathan de Halleux
    Saturday, February 28, 2009 2:57 PM
    Owner
  • Yes, I can create a test project manually


    I can also go my menu bar and select TEST -> New Test -> Unit Test Wizard and select the project I want to add tests to and I get all of the stubs created for me

    I am happy to do a live meeting if you want
    Saturday, February 28, 2009 3:28 PM
  •   I'd happy to. I am leaving on a trip to europe for the next 2 weeks so it will need to wait a bit.

    Contact me at jhalleux at microsoft dot com
    Jonathan de Halleux
    Monday, March 02, 2009 5:35 AM
    Owner
  • Turns out it was a file path issue - if the path is too long, it fails silently.  Just point to a shorter path and you will be all set
    Wednesday, March 25, 2009 2:25 PM
  • So, will a more detailed error be added to PEX in some future version so people encountering this error won't have to search the internet and hopefully run across this post to find a workaround?

     


    <href a="http://www.peterRitchie.com/blog">http://www.peterRitchie.com/blog</a
    Thursday, August 19, 2010 4:16 PM