zoukankan      html  css  js  c++  java
  • Microsoft.Bcl.Build.targets" cannot be imported again

     warning MSB4011: "C:workspaceCompanyFinland owdevelopSourcepackagesMicrosoft.Bcl.Build.1.0.14 oolsMicrosoft.Bcl.Build.targets" cannot be imported again. It was already imported at "C:workspaceCompanyFinland owdevelopSourceEdenredFI.WOT.MAP.APIEdenredFI.WOT.MAP.API.csproj (87,3)". This is most likely a build authoring error. This subsequent import will be ignored. 

    The build restored NuGet packages. Build the project again to include these packages in the build. For more information, see http://go.microsoft.com/fwlink/?LinkID=317568.
    ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

    https://devblogs.microsoft.com/dotnet/improved-package-restore/

    NuGet 2.7 makes this a lot easier:

    1. You no longer need to enable package restore explicitly – when building in VS all packages are restored automatically.
    2. Running package restore on a build machine is now super easy. You only need to check-in NuGet.exe (nothing else) and you can put it wherever you want. It can even be in a well-known location on your build server and excluded from every solution if desired. Prior to the build you simply run nuget.exe restore pathtomysolution.sln.

    Also, the NuGet team is talking to all major providers of build/CI servers (incl. TFS) so that at some point the second step can be handled automatically by the build servers. For more details, have a look at the NuGet 2.7 release notes and the new Package Restore documentation.

     

    Summary

    The new version of Microsoft.Bcl.Build will ensure that solutions containing our packages will load successfully even if packages aren’t restored yet. This affects all .NET NuGet packages that depend on it, such as Microsoft.Net.Http, Microsoft.Bcl, and Microsoft.Bcl.Async.

    Microsoft.Bcl.Build will give an actionable error message in cases the package was missing by asking you to build again.

    When coupled with NuGet 2.7 where package restore is automatic in Visual Studio and isn’t implemented through MSBuild, the experience is transparent and smooth. However, this doesn’t address build server scenarios yet so you still need run nuget.exe restore solution.sln prior to build, or check-in the .targets file if preferred.

  • 相关阅读:
    RabbitMQ学习之:(一)初识、概念及心得
    给Eclipse_Android添加智能提示功能
    C#异步编程之:(三)使用TaskScheduler.UnobservedTaskException
    类设计技巧
    初始化块
    子类构造器
    静态域与静态方法
    构造器中调用另一个构造器
    重载
    无参数的构造器
  • 原文地址:https://www.cnblogs.com/chucklu/p/15132875.html
Copyright © 2011-2022 走看看