VSTA SDK incomplete?

Joined
Jan 10, 2007
Messages
43,898
Location
In The Machine
p.MsoNormal, li.MsoNormal, div.MsoNormal{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman';}@page Section1{size:8.5in 11.0in;}div.Section1{page:Section1;}@page Section2{size:8.5in 11.0in;}div.Section2{page:Section2;}ol{margin-bottom:0in;}ul{margin-bottom:0in;}After hearing about it on thelatest .NET Rocks! podcast, I set out to try the new VSTA SDK, and much to mysurprise everything works up to one point: generating the projecttemplates.* I followed the instruction inthe MSDN Library addition it installed, and came up with the followinginstructions for how (I thought) to get the most basic sample, ShapeAppCSharp,to function with VSTA:
*
  1. Install VSTA to default location* (C:\Program Files\Visual Studio 2005 Tools for Applications SDK)
  2. Start - >Run -> msiexec /i "D:\Program Files\Visual Studio 2005 Tools for Applications SDK07.02\VisualStudioToolsForApplications\SetupPackage\vsta_aide.msi" VSTAINVS=1
  3. Extract: D:\Program Files\Visual Studio 2005 Tools for Applications SDK07.02\VisualStudioToolsForApplications\Samples\ShapeAppCSharp.zip to: C:\ShapeAppSamples
  4. Open C:\ShapeAppSamples\ShapeAppCSharp\ShapeAppCSharp.sln
  5. Add a new C# Class Library project to the solution named ShapeAppCSharpProxy
  6. Add a new set of references to the new project (All under the “.NET” tab):
    1. System.Drawing
    2. System.Windows.Forms
    3. System.AddIn
    4. Microsoft.VisualStudio.Tools.Applications.Adapter
    5. Microsoft.VisualStudio.Tools.Applications.Contract
*
  1. Open Project Properties for project ShapeAppCSharp
  2. Paste the following text into the “Post-build event command-line” box on the “Build Events” tab:
set proxygen="D:\Program Files\Visual Studio 2005 Tools forApplicationsSDK07.02\VisualStudioToolsForApplications\Tools\ProxyGen\x86\ProxyGen.exe"
set ProxyClass="$(SolutionDir)$(TargetName)Proxy\Proxy.cs"
set objPath="$(ProjectDir)obj\$(ConfigurationName)\$(TargetFileName)"
setproxyPath="$(SolutionDir)$(TargetName)Proxy\$(TargetName)OM.xml"

%proxygen% /l:%objPath% /c:%ProxyClass% /o:%proxyPath% /f
%proxygen% /l:%objPath% /c:%ProxyClass% /i:%proxyPath% /f
*
  1. Open Project Properties for project ShapeAppCSharpProxy
  2. Sign the assembly with a new key named “key” (remember to uncheck the “Protect my key file with a password” checkbox)
  3. Paste the following text into the “Post-build event command-line” box on the “Build Events” tab:
"%ProgramFiles%\Microsoft Visual Studio8\SDK\v2.0\Bin\gacutil.exe" /i $(TargetPath)
  1. Right click the solution and click “Rebuild Solution”.
  2. Right-click the ShapeAppCSharpProxy project, click “Add Existing Item…” and add the newly created Proxy.cs and ShapeAppCSharpOM.xml files to the project.
  3. Right click the solution and click “Rebuild Solution” (to ensure everything is forced to rebuild anew.)
  4. Check %windir%\assembly for the ShapeAppCSharpProxy assembly.
  5. Create a .reg file with the following content:
*
WindowsRegistry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSTAHostConfig\ShapeAppCSharp]
"AppName"="ShapeAppCSharp"
"ProjectTemplatesLocation"="C:\ProgramFiles\Microsoft\ShapeAppCSharp\\ProjectTemplates"
"VSCSProjectTemplatesLocation"="C:\ProgramFiles\Microsoft\ShapeAppCSharp\\ProjectTemplates\CSharp"
"VSVBProjectTemplatesLocation"="C:\ProgramFiles\Microsoft\ShapeAppCSharp\\ProjectTemplates\VisualBasic"
*
  1. Run the new .reg script
  2. Navigate to D:\Program Files\Visual Studio 2005 Tools for Applications SDK07.02\VisualStudioToolsForApplications\Tools\ProjectGen\x86\ and run ProjectGen.exe
  3. Select ShapeAppCSharp from the dropdown at the bottom and fill every other box with “ShapeAppCSharp” (with the exception of the icon field, which we will leave blank).* Click “Next”.
  4. On the next page, Click the “…” button and navigate to the C:\ShapeAppSamples\ShapeAppCSharp\ShapeAppCSharpProxy\bin\Debug directory and select ShapeAppCSharpProxy.dll
  5. Sigh with remorse at the message you see, as you have now followed the directions in the MSDN articles verbatim, but to no avail.
*
Am I missing anything?
The installer for ShapeAppAdvancedCSharp works fine, so for the time being I can still get a feel for how the thing works, but I'd like to step through the whole process myself to get a feel for how the migration process would be for one of my own applications.




More...

View All Our Microsft Related Feeds
 
Back
Top