VSTA 2.0: ProxyGen does not work

Last post 06-19-2008, 1:17 PM by Melody. 7 replies.
Sort Posts: Previous Next
  •  06-16-2008, 8:49 AM 1147

    VSTA 2.0: ProxyGen does not work

    Hi,

    I'm testing VSTA 2.0 but I have the problem that the proxygen shows the following error, regardless which assembly or Exe I use (I tried ShapeAppCSharp.Exe):

    An unrecoverable error was encountered during processing.
    Ein Aufrufziel hat einen Ausnahmefehler verursacht.
    This may have been caused by earlier errors.

    ProxyGen.exe Information: 0 : Finished

    I have Windows XP SP2 with .Net framework 3.5 installed. VSTA 1 is also installed.

    Any idea how to solve the issue or to get more information?
  •  06-16-2008, 9:38 AM 1148 in reply to 1147

    Re: VSTA 2.0: ProxyGen does not work

    Thorsten,

                ProxyGen will have an unrecoverable error if there are irresolvable assemblies referenced.  For instance, exposing a the exe from ShapeAppAdvancedCSharp (VSTA v 1 sample) to VSTA v 2 ProxyGen without having VSTA v 1 installed or exposing a VSTA v 2 sample to ProxyGen v 1 without having VSTA v 2 installed.  Aside from those scenarios we haven’t seen ProxyGen v 2 have an unrecoverable error when creating files for ShapeApp samples.

     Since you have both VSTA v 1 and v 2 installed, perhaps there is some mix up.  Try this:

    1)      Do a clean rebuild of the sample you wish to expose to ProxyGen.  Try using a non-integrated sample.

    2)      If you have any environmental path variables to ProxyGen (either version) setup remove them.  I believe you will have to close and re-open any command prompt windows for this to take affect.

    3)      Explicitly change directories ProxyGen.

    4)      Expose the exe of a non-integrated sample to ProxyGen to create a descriptor file.

    Commands:

    cd "%ProgramFiles%\Visual Studio Tools for Applications 2.0 SDK\2008.02\Visual Studio Tools For Applications\Tools\ProxyGen"

    ProxyGen /l:"C:\ShapeAppSamples\ShapeAppCSharp\core\bin\Debug\ShapeAppCSharp.exe" /o:"C:\ShapeAppSamples\ShapeAppCSharp\OM.xml" /f


    Hope this helps, please let me know if you are still getting the error.
    Thanks,
    -Melody

    Filed under: ,
  •  06-16-2008, 11:23 AM 1149 in reply to 1148

    Re: VSTA 2.0: ProxyGen does not work

    Hi Melody,

    I installed .Net framework and VSTA 2.0 to a virtual machine and tried to generate a proxy with different assemblies or executables. No success, always the same error. I built a simple class library to rule out any side effects, still no success:

    using System;
    using System.Collections.Generic;
    using System.Text;

    namespace TestLib
    {
        public class Class1
        {
            public string TestMethod1()
            {
                return "Hello world";
            }
        }
    }


    I forgot to mention, I'm working with Visual Studio 2005 (or nothing at the virtual machine except .Net 3.5 and VSTA 2.0), are there any assemblies from Studio 2008 needed?
  •  06-16-2008, 4:28 PM 1150 in reply to 1149

    Re: VSTA 2.0: ProxyGen does not work

    Thorsten,

    It’s ok to use VSTA v 2 with VS 2005.  There are some special considerations, one of which has to do with changing the proxy file so that it can compile in VS 2005.  Here’s a link to a blog about using VSTA v 2 with VS 2005 (here’s a quick tip for the proxy indentation).

    As to the unrecoverable error with ProxyGen, is any descriptor file output? 

    Did you get any indication that the VSTA v 2 installation was not successful?  If you don’t have Visual Studio (2005 or 2008) installed on the VPC, try installing that.  After confirming that the installs for VS, .Net 3.5, and VSTA v 2 are all good, if you are still getting the error please send a log of the commands and output.   Please use a clean compile of the ShapeAppCSharp v 1 sample with no integration.

    Can you confirm your configuration (use the VPC since it’s clean):

    OS:  XP SP2
    VS:  2005- any service packs?
    VSTA:  v 2 only
    .Net:  3.5
    Language- if the VPC isn’t defaulting to English what language is it using?

     

     

    Thanks,
    -Melody

  •  06-19-2008, 6:10 AM 1154 in reply to 1150

    Re: VSTA 2.0: ProxyGen does not work

    Hi Melody,

    as you proposed, I did the following:

    Clean Windows XP SP2 (english)
    - Installed Visual Studio 2005, then SP1
    - Installed .Net 3.5
    - Installed VSTA SDK 2.0 Beta

    No errors or warnings during installation

    I compiled the ShapeAppCSharp v 1 sample -> Proxygen fails with above error
    I compiled the test mini example from above -> Proxygen fails with known error

    I used the following command line:
    ProxyGen.exe /v /l ShapeAppCSharp\core\base\bin\Debug\ShapeAppCSharp.exe /o Proxy_Descriptor.xml

    Output:

    C:\Program Files\Visual Studio Tools for Applications 2.0 SDK\2008.02\Visual Stu
    dio Tools For Applications\Tools\ProxyGen>ProxyGen.exe /v /l ShapeAppCSharp\core
    \base\bin\Debug\ShapeAppCSharp.exe /o Proxy_Descriptor.xml
    An unrecoverable error was encountered during processing.
    Exception has been thrown by the target of an invocation.
    This may have been caused by earlier errors.

    ProxyGen.exe Information: 0 : Finished

    C:\Program Files\Visual Studio Tools for Applications 2.0 SDK\2008.02\Visual Stu
    dio Tools For Applications\Tools\ProxyGen>pause
    Press any key to continue . . .

    No descriptor file is written...
  •  06-19-2008, 10:05 AM 1157 in reply to 1154

    Re: VSTA 2.0: ProxyGen does not work

    Thorsten,
    I was able to reproduce this.  The problem is not following the command switch with a colon and not using full paths. 

    Try using this command with colons and full paths:
    ProxyGen /v /l:C:\ShapeAppSamples\ShapeAppCSharp\core\base\bin\Debug\ShapeAppCSharp.exe /o:C:\ShapeAppSamples\Proxy_Descriptor.xml

    Here is the output showing the repro and work around:
    Setting environment for using Microsoft Visual Studio 2005 x86 tools.

    c:\Program Files\Microsoft Visual Studio 8\VC>cd "C:\Program Files\Visual Studio

     Tools for Applications 2.0 SDK\2008.02\Visual Studio Tools For Applications\Too

    ls\ProxyGen"

     

    C:\Program Files\Visual Studio Tools for Applications 2.0 SDK\2008.02\Visual Stu

    dio Tools For Applications\Tools\ProxyGen>ProxyGen /v /l ShapeAppCSharp\core\bas

    e\bin\Debug\ShapeAppCSharp.exe /o Proxy_Descriptor.xml

    An unrecoverable error was encountered during processing.

    Exception has been thrown by the target of an invocation.

    This may have been caused by earlier errors.

     

    ProxyGen.exe Information: 0 : Finished

     

    C:\Program Files\Visual Studio Tools for Applications 2.0 SDK\2008.02\Visual Stu

    dio Tools For Applications\Tools\ProxyGen>ProxyGen /v /l:C:\ShapeAppSamples\Shap

    eAppCSharp\core\base\bin\Debug\ShapeAppCSharp.exe /o:C:\ShapeAppSamples\Proxy_De

    scriptor.xml /f

    ProxyGen.exe : ProxyGen.exe [Version 9.0.30227.0]

    c Microsoft Corporation. All rights reserved.

     

    ProxyGen.exe Information: 0 : Note: All assemblies written in Visual Basic conta

    in automatically generated types that use generics and types that derive from ty

    pes in external assemblies. ProxyGen.exe does not support using these features i

    n an object model. You can ignore warnings that ProxyGen.exe displays about thes

    e unsupported features if the warnings refer to automatically generated types, r

    ather than types in your object model.

     

     

    ProxyGen.exe Information: 0 : Finished

     

    C:\Program Files\Visual Studio Tools for Applications 2.0 SDK\2008.02\Visual Stu

    dio Tools For Applications\Tools\ProxyGen>

     

    Filed under: ,
  •  06-19-2008, 10:43 AM 1158 in reply to 1157

    Re: VSTA 2.0: ProxyGen does not work

    Hi Melody,

    sometimes a solution can be very simple. I added the colons in the command line and now the proxygen works.

    Maybe you could send the Microsoft team a note that they add a check for the command line options and generate a useful error message?

    Thanks a lot for your help

      Thorsten
  •  06-19-2008, 1:17 PM 1160 in reply to 1158

    Re: VSTA 2.0: ProxyGen does not work

    Thorsten,
    No problem- that's what we're here for.  We have already submitted a bug requesting more informative feedback from ProxyGen especially in unrecoverable error cases- maybe we'll see them in RTM or vNext.

    Please let me know if you have any more questions.
    Thanks,
    -Melody
View as RSS news feed in XML