C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9):
warning MSB3245: Could not resolve
this reference. Could not locate the
assembly
“System.ComponentModel.DataAnnotations”.
Check to make sure the assembly exists
on disk. If this reference is required
by your code,you may get compilation
errors.C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9):
warning MSB3245: Could not resolve
this reference. Could not locate the
assembly
“System.Windows.Controls.Data.Input”.
Check to make sure the assembly exists
on disk. If this reference is required
by your code,you may get compilation
errors.
项目文件中的Item组如下:
<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>bin\Debug\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>
显然有些元素有HintPaths,有些则没有,有些有hintpaths,似乎有绝对和相对路径……
有人可以帮帮我吗?提前致谢.
好的,所以我删除了引用然后重新读取它们,它们以下列格式进入项目文件:
c:\Program Files\Microsoft
SDKs\Silverlight\v4.0\Libraries\Client\System.ComponentModel.DataAnnotations.dll
对于这两个参考文献.它都编译 – 在两个版本中. HintPaths的任何暗示?如何使用它们以及如何以及何时生成它们?为什么当我试图手动修改proj文件时它似乎并不重要(即使VS告诉我重新加载仍然没有编译)?
谢谢
解决方法
清理您的解决方案,关闭Visual Studio并安装缺少的内容.