ApplicationEntryPoint

Latest post 03-13-2008 5:17 PM by Gary. 5 replies.
  • 03-04-2008 1:04 PM

    ApplicationEntryPoint

    When I compile the ShapeAppCSharpAppAddIn in the basic shapes sample I'm getting error:

    Error 1 The type or namespace name 'ApplicationEntryPoint' does not exist in the namespace 'Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp' (are you missing an assembly reference?) C:\ShapeAppSamples\ShapeAppBasicCSharp\sample addIns\CSharp\AppLevel\SampleAppAddIn.Designer.cs 16 103 ShapeAppCSharpAppAddIn

    There is similar problem in Dynamic shapes sample ('DocumentEntryPoint')

    Please help.

  • 03-04-2008 1:13 PM In reply to

    • Melody
    • Top 10 Contributor
    • Joined on 04-26-2007
    • Syracuse, NY
    • Posts 244

    Re: ApplicationEntryPoint

    Ernst,
      Do you have a VSTA v 1 ShapeAppCSharpProxy in registered in the GAC?  If so delete it- you only want on eShapeAppCSharpProxy assembly in the GAC (for side by side scenarios it is recommended that you use different names for the proxy assemblies).

    Please let me know if you have any other questions.
    Thanks,
       -Melody
    Filed under: , ,
  • 03-06-2008 11:04 AM In reply to

    Re: ApplicationEntryPoint

    You were right. I tried version 1 earlier and there was that DLL in the GAC. Does that mean that the strong name was the same for the new and the old version?
  • 03-07-2008 9:32 AM In reply to

    • Melody
    • Top 10 Contributor
    • Joined on 04-26-2007
    • Syracuse, NY
    • Posts 244

    Re: ApplicationEntryPoint

    I'm looking into this- I'll let you know what I find.

     

    Thanks,

       -Melody

  • 03-13-2008 9:05 AM In reply to

    • Melody
    • Top 10 Contributor
    • Joined on 04-26-2007
    • Syracuse, NY
    • Posts 244

    Re: ApplicationEntryPoint

    Ernst,

    >Does that mean that the strong name was the same for the new and the old version?
    No. 

    While the assemblies are strongly named they are not being used in that way.  The project templates use the following to identify the proxy reference, this is from the ##proj file references to include item group:
            <Reference
                Include="ShapeAppCSharpProxy" />


    Unfortunately, for project templates there's no way to specify a PublicKeyToken like there is in Item Templates. 



  • 03-13-2008 5:17 PM In reply to

    • Gary
    • Top 10 Contributor
    • Joined on 07-13-2006
    • Posts 307

    Re: ApplicationEntryPoint

    Ernst,

    The assembly references in the project file (ie: .csproj) can be made strong enough so that the proper assembly is loaded in a side by side scenario. 

    This is important because in a future version of your application, you must properly create vNext proxy assemblies and project templates so that the end users of their application/VSTA do not encounter a problem building their add-in projects, new and existing, due to the project referencing the wrong version of a proxy assembly.

    Renaming the proxy assembly for each version is not a desireable solution, from a maintenance perspective, but versioning the assembly is.  Even without a new version number, the ShapeAppCSharpProxy reference can be distinct enough by specifying the unique PublicKeyToken

    <Reference Include="ShapeAppCSharpProxy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3c3c0c46dd27dbcf" />

     
    I think that there are two other attributes that you might use to reference the proper proxy assembly in add-in projects:
     
    1.  If version-specific proxy assemblies are installed SxS in the GAC, you could use the FusionName.

    2.  For a proxy assembly installed to a known Corporate/product location, you can provide a HintPath to the correct assembly.

    Here's an example:

    <Reference Include="ShapeAppCSharpProxy">

      <Name>ShapeAppCSharpProxy</Name>

      <Aliases>ShapeApp Automation Library</Aliases>

      <HintPath>C:\Program Files\ISVName\ShapeAppCSharpProxy\Common\VSTA\ShapeAppCSharpProxy.dll</HintPath>

      <FusionName>ShapeAppCSharpProxy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3c3c0c46dd27dbcf</FusionName>

      <SpecificVersion>True</SpecificVersion>

      <RequiredTargetFramework>3.5</RequiredTargetFramework>

    </Reference>

Page 1 of 1 (6 items) | RSS
Copyright Summit Software Company, 2008. All rights reserved.