Here's what I did to fix:
1) Added the reg key:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{32C73088-76AE-40F7-AC40-81F62CB2C1DA}\InprocServer32
and set the default value to:
C:\Program Files (x86)\Microsoft Silverlight\npctrl.dll
There was no dll with funky Silverlight version numbers.
2) I modded the following XML file:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v9.0\Silverlight\Microsoft.Silverlight.Common.targets.xml
replacing:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Microsoft.VisualStudio.Silverlight.Build.Tasks.GetSilverlightFrameworkPath" AssemblyFile="Microsoft.VisualStudio.Silverlight.Build.Tasks.dll" />
<UsingTask TaskName="Microsoft.VisualStudio.Silverlight.Build.Tasks.CompileXaml" AssemblyFile="Microsoft.VisualStudio.Silverlight.Build.Tasks.dll" />
<!--
Add Silverlight specific Item names to AvailableItemName item, so that they can show up
in a drop-down menu for Build Action field of the properties window in VisualStudio.
-->
<ItemGroup Condition="'$(BuildingInsideVisualStudio)'=='true'">
<AvailableItemName Include="SilverlightPage" />
</ItemGroup>
<!--
================================================================
GetFrameworkPaths
Override GetFrameworkPaths in Microsoft.Common.targets so that
references resolve to the silverlight assemblies rather than the
desktop CLR assemblies
================================================================
-->
<Target
Name="GetFrameworkPaths"
DependsOnTargets="$(GetFrameworkPathsDependsOn)"
>
<GetSilverlightFrameworkPath>
<Output TaskParameter="Path" PropertyName="TargetFrameworkDirectory"/>
<Output TaskParameter="Path" ItemName="TargetFrameworkDirectoryItem"/>
<Output TaskParameter="Path" PropertyName="TargetFrameworkSDKDirectory"/>
<Output TaskParameter="Path" ItemName="TargetFrameworkSDKDirectoryItem"/>
</GetSilverlightFrameworkPath>
<CreateProperty Value="$(TargetFrameworkDirectory)">
<Output TaskParameter="Value" PropertyName="FrameworkPathOverride"/>
</CreateProperty>
<CreateProperty Value="$(TargetFrameworkDirectory)">
<Output TaskParameter="Value" PropertyName="SdkPath"/>
</CreateProperty>
</Target>
with:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="Microsoft.VisualStudio.Silverlight.Build.Tasks.CompileXaml" AssemblyFile="Microsoft.VisualStudio.Silverlight.Build.Tasks.dll" />
<!--
Add Silverlight specific Item names to AvailableItemName item, so that they can show up
in a drop-down menu for Build Action field of the properties window in VisualStudio.
-->
<ItemGroup Condition="'$(BuildingInsideVisualStudio)'=='true'">
<AvailableItemName Include="SilverlightPage" />
</ItemGroup>
<!--
================================================================
GetFrameworkPaths
Override GetFrameworkPaths in Microsoft.Common.targets so that
references resolve to the silverlight assemblies rather than the
desktop CLR assemblies
================================================================
-->
<Target
Name="GetFrameworkPaths"
DependsOnTargets="$(GetFrameworkPathsDependsOn)"
>
<CreateProperty Value="C:\Program Files\Microsoft Silverlight">
<Output TaskParameter="Value" PropertyName="FrameworkPathOverride"/>
</CreateProperty>
<CreateProperty Value="C:\Program Files\Microsoft Silverlight">
<Output TaskParameter="Value" PropertyName="SdkPath"/>
</CreateProperty>
</Target>
---------------------------------------------
3) I loaded Visual Studio, the project was closer to compiling but three DLLs were still badly referenced. I added them manually, compiled and got the "Get Silverlight" message. Closed VS2008.
4) I *deleted* C:\Program Files (x86)\Microsoft Silverlight
5) I installed Silverlight 1.1a
6) Reloaded my project and voila it works!
7) Now I have funky numbered npctrl dll so changed reg entry to:
C:\Program Files (x86)\Microsoft Silverlight\npctrl.1.0.20806.0.dll
New Silverlight projects now still need me to add manual references to:
- agclr.dll
- System.Silverlight.dll
- System.Xml.Core.dll
I also get one "Found conflicts between different versions of the same dependant assembly." warning.
So perhaps all is not *quite* right yet...