引用程序集时忽略HintPath

时间:2016-07-18 13:31:56

标签: .net visual-studio-2015

我从.NET项目引用程序集如下:

<Reference Include="Microsoft.Office.Uc, Version=15.0.4603.1000, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
  <HintPath>C:\Program Files\Microsoft Office\Office15\LyncSDK\Assemblies\Desktop\Microsoft.Office.Uc.dll</HintPath>
  <SpecificVersion>False</SpecificVersion>
  <EmbedInteropTypes>True</EmbedInteropTypes>
</Reference>

项目编制好;但是,在尝试运行应用程序时,我收到以下错误:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Uc, Version=15.0.4603.1000, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.Lync.Model.LyncClient.GetClient(Boolean sideBySideLync)
   at lync_tester.Program.Main(String[] args) in C:\Users\\Work\lync_tester\Program.cs:line 14
Press any key to continue . . .

Process Monitor显示应用程序正在尝试在HintPath指定的之外的任何地方查找程序集:

enter image description here

此外,由于某些原因,该程序集的大部分属性(包括&#34; Copy Local&#34;)都显示为灰色:

enter image description here

这可能是什么原因?

0 个答案:

没有答案