Silverlight 5 - Unresovled assembly reference

Nov 20, 2012 at 10:31 PM

Visual Studio 2012 – Create a new Silverlight 5 class library

Add a reference to the System.Windows.Control.Input.Toolkit from “Silverlight 5 Toolkit December 2011”

Create a class which returns an object from the toolkit. This is my class:

using System.Windows.Controls;

 

namespace SilverlightClassLibrary1

{

   /// <summary>

   /// This is my class.

   /// </summary>

   public class Class1

   {

       /// <summary>

       /// Gets the thing.

       /// </summary>

       /// <value>

       /// The thing.

       /// </value>

       public NumericUpDown Thing

       {

           get

           {

               return new NumericUpDown();

           }

       }

   }

}

 

Create a new SandCastle project, mine was standalone, target it to Silverlight 5 and add a Documentation Source to the csproj file above.

Build it. It fails with the following message:

-------------------------------

Generating reflection information...

[C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe]

MRefBuilder (v2.7.1.0)

Copyright c 2006-2012, Microsoft Corporation, All Rights Reserved

Info: Loaded 1 assemblies for reflection and 1 dependency assemblies.

MREFBUILDER : error : Unresolved assembly reference: System.Windows.Controls.Input.Toolkit (System.Windows.Controls.Input.Toolkit, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) required by SilverlightClassLibrary1 [C:\temp\Help\Working\GenerateRefInfo.proj]

   Last step completed in 00:00:01.7043

 Add a file reference by browsing to the assembly. Mine is C:\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Toolkit\dec11\Bin\System.Windows.Controls.Input.Toolkit.dll.

Build it. It fails with the same message.

What am I doing wrong?

Editor
Nov 21, 2012 at 12:36 AM

The Frameworks.xml file used by Sandcastle is set up to use the Apr 2010 version of the toolkit even for Silverlight 5.0 since I wasn't aware that there was a Dec 2011 version for Silverlight 5.0.  Most likely, you don't have that earlier version installed otherwise it would be using that version.  To work around the problem, you can edit the Frameworks.xml file to update it with the following information.  You'll find it in the C:\Program Files (x86)\Sandcastle\ProductionTools folder.

Open a command prompt with administrative priviliges, change into the folder, and use run "notepad Frameworks.xml".  Find the "<Framework Platform="Silverlight" Version="5.0" Title="Silverlight 5">" element and replace the two Location elements for the "Silverlight\v4.0\Toolkit\Apr10" paths with these three elements:

<Location Path="%ProgramFiles(x86)%\Microsoft SDKs\Silverlight\v5.0\Toolkit\Dec11\Bin">
	<AssemblyDetails Filename="Microsoft.Xna.Framework.Content.dll" Name="Microsoft.Xna.Framework.Content" Version="1.0.0.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="Microsoft.Xna.Framework.Toolkit.dll" Name="Microsoft.Xna.Framework.Toolkit" Version="1.0.0.0" PublicKeyToken="2c5c654d367bf4a7" />
	<AssemblyDetails Filename="System.Windows.Controls.Data.DataForm.Toolkit.dll" Name="System.Windows.Controls.Data.DataForm.Toolkit" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Data.Toolkit.dll" Name="System.Windows.Controls.Data.Toolkit" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.DataVisualization.Toolkit.dll" Name="System.Windows.Controls.DataVisualization.Toolkit" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Input.Toolkit.dll" Name="System.Windows.Controls.Input.Toolkit" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Layout.Toolkit.dll" Name="System.Windows.Controls.Layout.Toolkit" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.Toolkit.dll" Name="System.Windows.Controls.Theming.Toolkit" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Toolkit.dll" Name="System.Windows.Controls.Toolkit" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Toolkit.Internals.dll" Name="System.Windows.Controls.Toolkit.Internals" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
</Location>
<Location Path="%ProgramFiles(x86)%\Microsoft SDKs\Silverlight\v5.0\Toolkit\Dec11\Bin\Design">
	<AssemblyDetails Filename="System.Windows.Controls.Data.DataForm.Toolkit.Design.dll" Name="System.Windows.Controls.Data.DataForm.Toolkit.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Data.DataForm.Toolkit.Expression.Design.dll" Name="System.Windows.Controls.Data.DataForm.Toolkit.Expression.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Data.DataForm.Toolkit.VisualStudio.Design.dll" Name="System.Windows.Controls.Data.DataForm.Toolkit.VisualStudio.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.DataVisualization.Toolkit.Design.dll" Name="System.Windows.Controls.DataVisualization.Toolkit.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.DataVisualization.Toolkit.Expression.Design.dll" Name="System.Windows.Controls.DataVisualization.Toolkit.Expression.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.DataVisualization.Toolkit.VisualStudio.Design.dll" Name="System.Windows.Controls.DataVisualization.Toolkit.VisualStudio.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Input.Toolkit.Design.dll" Name="System.Windows.Controls.Input.Toolkit.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Input.Toolkit.Expression.Design.dll" Name="System.Windows.Controls.Input.Toolkit.Expression.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Input.Toolkit.VisualStudio.Design.dll" Name="System.Windows.Controls.Input.Toolkit.VisualStudio.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Layout.Toolkit.Design.dll" Name="System.Windows.Controls.Layout.Toolkit.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Layout.Toolkit.Expression.Design.dll" Name="System.Windows.Controls.Layout.Toolkit.Expression.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Layout.Toolkit.VisualStudio.Design.dll" Name="System.Windows.Controls.Layout.Toolkit.VisualStudio.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.Toolkit.Design.dll" Name="System.Windows.Controls.Theming.Toolkit.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.Toolkit.Expression.Design.dll" Name="System.Windows.Controls.Theming.Toolkit.Expression.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.Toolkit.VisualStudio.Design.dll" Name="System.Windows.Controls.Theming.Toolkit.VisualStudio.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Toolkit.Design.dll" Name="System.Windows.Controls.Toolkit.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Toolkit.Expression.Design.dll" Name="System.Windows.Controls.Toolkit.Expression.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Toolkit.VisualStudio.Design.dll" Name="System.Windows.Controls.Toolkit.VisualStudio.Design" Version="4.0.5.0" PublicKeyToken="31bf3856ad364e35" />
</Location>
<Location Path="%ProgramFiles(x86)%\Microsoft SDKs\Silverlight\v5.0\Toolkit\Dec11\Themes">
	<AssemblyDetails Filename="System.Windows.Controls.Theming.BubbleCreme.dll" Name="System.Windows.Controls.Theming.BubbleCreme" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.BureauBlack.dll" Name="System.Windows.Controls.Theming.BureauBlack" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.BureauBlue.dll" Name="System.Windows.Controls.Theming.BureauBlue" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.ExpressionDark.dll" Name="System.Windows.Controls.Theming.ExpressionDark" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.ExpressionLight.dll" Name="System.Windows.Controls.Theming.ExpressionLight" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.RainierOrange.dll" Name="System.Windows.Controls.Theming.RainierOrange" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.RainierPurple.dll" Name="System.Windows.Controls.Theming.RainierPurple" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.ShinyBlue.dll" Name="System.Windows.Controls.Theming.ShinyBlue" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.ShinyRed.dll" Name="System.Windows.Controls.Theming.ShinyRed" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.SystemColors.dll" Name="System.Windows.Controls.Theming.SystemColors" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.TwilightBlue.dll" Name="System.Windows.Controls.Theming.TwilightBlue" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
	<AssemblyDetails Filename="System.Windows.Controls.Theming.WhistlerBlue.dll" Name="System.Windows.Controls.Theming.WhistlerBlue" Version="5.0.5.0" PublicKeyToken="31bf3856ad364e35" />
</Location>

Once that's done, the build should work. If you get stuck, I can e-mail the file to you.

Also, please note that this project has been discontinued and may not be monitored as frequently. For future questions concerning Sandcastle, post them over on the Sandcastle Help File Builder project's discussion page. Thanks.

Eric

Nov 21, 2012 at 1:40 AM

That got me going.  Thanks alot Eric.  I really appreciate the rapid response.