views:

26

answers:

1

I have a problem where most of the assemblies I'm referencing in my silverlight application appear to be not found in the xaml, despite the fact that I've added the references to the project using the 'Add Reference' dialog, can see they are present in the specified location, and can browse them using the object browser. I'm using VS 2010 and SL4, and the latest SL toolkit

Here are the references in the fsproj file...

<ItemGroup>
    <Reference Include="FSharp.PowerPack">
      <HintPath>C:\Program Files\FSharpPowerPack-2.0.0.0\Silverlight\v3.0\FSharp.PowerPack.dll</HintPath>
    </Reference>
    <Reference Include="mscorlib" />
    <Reference Include="FSharp.Core">
      <HintPath>$(ProgramFiles)\Microsoft F#\Silverlight\Libraries\Client\$(SilverlightVersion)\FSharp.Core.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.ComponentModel.DataAnnotations" />
    <Reference Include="System.Core" />
    <Reference Include="System.Net" />
    <Reference Include="System.Runtime.Serialization" />
    <Reference Include="System.Windows" />
    <Reference Include="System.Windows.Browser" />
    <Reference Include="System.Windows.Controls">
      <HintPath>bin\Debug\System.Windows.Controls.dll</HintPath>
    </Reference>
    <Reference Include="System.Windows.Controls.Data">
      <HintPath>bin\Debug\System.Windows.Controls.Data.dll</HintPath>
    </Reference>
    <Reference Include="System.Windows.Controls.Data.Input" />
    <Reference Include="System.Windows.Controls.DataVisualization.Toolkit">
      <HintPath>bin\Debug\System.Windows.Controls.DataVisualization.Toolkit.dll</HintPath>
    </Reference>
    <Reference Include="System.Windows.Controls.Input">
      <HintPath>c:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Controls.Input.dll</HintPath>
    </Reference>
    <Reference Include="System.Windows.Controls.Layout.Toolkit">
      <HintPath>bin\Debug\System.Windows.Controls.Layout.Toolkit.dll</HintPath>
    </Reference>
    <Reference Include="System.Windows.Controls.Navigation">
      <HintPath>c:\Program Files\Microsoft SDKs\Silverlight\v4.0\Libraries\Client\System.Windows.Controls.Navigation.dll</HintPath>
    </Reference>
    <Reference Include="System.Windows.Controls.Toolkit">
      <HintPath>bin\Debug\System.Windows.Controls.Toolkit.dll</HintPath>
    </Reference>
    <Reference Include="System.Windows.Data">
      <HintPath>bin\Debug\System.Windows.Data.dll</HintPath>
    </Reference>
    <Reference Include="System.Xml" />
  </ItemGroup>

Some of them have the local path to the assembly that has been copied to the Debug dir. They are definitely there, along with the .xml files with the same name (ie; System.Windows.Controls.Navigation.dll and System.Windows.Controls.Navigation.xml). I get the same problem regardless of where they are being referenced.

Here is how they are referenced in the xaml...

<nav:Page x:Class="Module1.MyIdeas" x:Name="MyIdeas"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    xmlns:nav="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    xmlns:winControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:y="clr-namespace:Module1" NavigationCacheMode="Enabled" >
<some content.../>
</nav:Page>

All the following assemblies have the error: "Error 1 Assembly 'System.Windows.Controls.X' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built."

xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
xmlns:nav="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"

The thing is that the project builds and runs fine, but this behavior appears to break the xaml designer and intellisense.

A: 

My comment above abount creating a new project and reloading the original project seems to work fine.

PhilBrown