Azure automatic build failed

后端 未结 2 1883
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-12 10:14

I have recently created project on visualstudio.com, and enabled continuous build on azure. I created web api project, and created some models and api controllers. Then I de

2条回答
  •  没有蜡笔的小新
    2021-01-12 10:44

    This is somewhat of a bug and is logged in several places. Bcl.Build isn't a project required to build on TFS, so you simply need to tell TFS not to include it if it doesn't exist. To do this, open up your .csproj file (for each project that references Bcl.Build) and change the following:

    
    

    to add a condition:

    
    

    Note: If you update Bcl.Build via Nuget, it will also update your project file and the following will need to be done again. Create a second copy of this and comment it out if you don't want to lose it every update/have a reference.

    Related References (same issue, different manifestation):

    http://social.msdn.microsoft.com/Forums/en-US/TFService/thread/7bd2e96b-552a-4897-881c-4b3682ff835e

    https://connect.microsoft.com/VisualStudio/feedback/details/788981/microsoft-bcl-build-targets-causes-project-loading-to-fail

    https://nuget.codeplex.com/workitem/3135

    Update: Microsoft wrote an official blog on this. While the above does work in some situations, its not a guarantee. Microsoft and the NuGet team are working together on a solution, but in the meantime have provided 3 (better?) workaround options:

    http://blogs.msdn.com/b/dotnet/archive/2013/06/12/nuget-package-restore-issues.aspx

    1. Stop using package restore and check-in all package files
    2. Explicitly run package restore before building the project
    3. Check-in the .targets files

提交回复
热议问题