我使用時解析引用:Silverlight的4.0版,100%F#的解決方案。我從調試切換目標配置到發佈時,有一個問題。一切都彙集在調試模式下細,然後在釋放我得到如下:的Silverlight無法從調試切換到發佈
C:\ WINDOWS \ Microsoft.NET \框架\ v4.0.30319 \ Microsoft.Common.targets(1360,9): 警告MSB3245 :無法解析此參考 。無法找到 裝配 「System.ComponentModel.DataAnnotations」。 檢查以確保磁盤上的程序集存在 。如果您的代碼需要此參考 ,則可能會收到編譯 錯誤。
C:\ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets(1360,9): 警告MSB3245:無法解析 此引用。無法找到 裝配 「System.Windows.Controls.Data.Input」。 檢查以確保磁盤上的程序集存在 。如果您的代碼需要此參考 ,則可能會收到編譯 錯誤。
在項目文件lokos項目組想:
<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>
Obviuosly,一些元素有HintPaths而有的則沒有,而一些有hintpaths,似乎有絕對和相對路徑...
有人可以幫我嗎?提前致謝。
行,所以我刪除了引用,然後重新添加他們,他們就到項目文件中的格式:
C:\ Program Files文件\微軟 的SDK \ Silverlight的\ V4。 0 \ Libraries \ Client \ System.ComponentModel.DataAnnotations.dll
這兩個引用。它都編譯 - 在兩個版本中。 HintPaths上的任何提示?他們如何使用以及如何和何時生成它們?爲什麼當我試圖手動修改proj文件時,它似乎並不重要(即使VS告訴我它重新加載,仍然沒有編譯)?
THX
關於HintPaths,看看這個問題:http://stackoverflow.com/questions/1882038/hintpath-vs-referencepath-in-visual-studio – herzmeister 2010-10-26 20:58:45