启用Application Insights后,Visual Studio 2013构建失败

时间:2014-12-09 12:05:14

标签: visual-studio msbuild azure-application-insights

我创建了一个ASP.NET MVC5应用程序(启用了Application Insights),并使用Gi​​t和Visual Studio Online。当我进行构建时,它失败并出现以下错误:

C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (3951): Could not copy the file "C:\a\src\packages\Microsoft.Diagnostics.Instrumentation.Extensions.Intercept.0.12.0-build02810\lib\native\x64\Microsoft.ApplicationInsights.Extensions.Intercept_x64.dll" because it was not found.

2 个答案:

答案 0 :(得分:1)

微软的回复是这个问题应该在下一个版本中修复。或者尝试这种解决方法:将其添加到您的proj文件

<ItemGroup>

    <None Include="[Specify path to get to packages like:..\..\packages]\Microsoft.Diagnostics.Instrumentation.Extensions.Intercept.0.12.0-[SpecifyCorrectBuildNumber]\lib\native\x86\Microsoft.ApplicationInsights.Extensions.Intercept_x86.dll">

     < CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

    </None>

    <None Include="="[Specify path to get to packages like:..\..\packages]\Microsoft.Diagnostics.Instrumentation.Extensions.Intercept.0.12.0-[SpecifyCorrectBuildNumber]\lib\native\x64\Microsoft.ApplicationInsights.Extensions.Intercept_x64.dll">

     < CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>

   </None>

  </ItemGroup>

答案 1 :(得分:0)