question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[dotnet build] Build fails for Nuget.Core solution, test projects fail to find src binaries

See original GitHub issue

Steps to reproduce

  1. Get Nuget.Core enlistment https://github.com/NuGet/NuGet.Client
  2. Open NuGet.Core.sln and wait for restore to complete
  3. Right click on NuGet.Client.Test project and select “Rebuild”

Expected behavior

Everything to build fine

Actual behavior

All src projects build fine, but NuGet.Core.Tests fails to find dependent projects binaries:

C:\Program Files\dotnet\dotnet.exe build “D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test” --configuration Debug --no-dependencies --build-base-path “D:\git\ms\nuget\NuGet.Client\artifacts” --no-incremental 12> Compiling NuGet.Client.Test for .NETCoreApp,Version=v1.0 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : C:\Program Files\dotnet\dotnet.exe compile-csc @D:\git\ms\nuget\NuGet.Client\artifacts\NuGet.Client.Test\obj\Debug\netcoreapp1.0\dotnet-compile.rsp returned Exit Code 1 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.Client\bin\Debug\netstandard1.5\NuGet.Client.dll’ could not be found 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.Common\bin\Debug\netstandard1.5\NuGet.Common.dll’ could not be found 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.ContentModel\bin\Debug\netstandard1.5\NuGet.ContentModel.dll’ could not be found 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\bin\Debug\netstandard1.5\NuGet.Frameworks.dll’ could not be found 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.Packaging\bin\Debug\netstandard1.5\NuGet.Packaging.dll’ could not be found 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.Packaging.Core\bin\Debug\netstandard1.5\NuGet.Packaging.Core.dll’ could not be found 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.Packaging.Core.Types\bin\Debug\netstandard1.5\NuGet.Packaging.Core.Types.dll’ could not be found 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.Repositories\bin\Debug\netstandard1.5\NuGet.Repositories.dll’ could not be found 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.RuntimeModel\bin\Debug\netstandard1.5\NuGet.RuntimeModel.dll’ could not be found 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.Test.Utility\bin\Debug\netstandard1.5\NuGet.Test.Utility.dll’ could not be found 12>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(241,5): error : D:\git\ms\nuget\NuGet.Client\test\NuGet.Core.Tests\NuGet.Client.Test\error CS0006: Metadata file ‘D:\git\ms\nuget\NuGet.Client\src\NuGet.Core\NuGet.Versioning\bin\Debug\netstandard1.5\NuGet.Versioning.dll’ could not be found 12> Compilation failed. 12> 0 Warning(s) 12> 11 Error(s) 12> Time elapsed 00:00:01.7895584

Environment data

dotnet --info output:

D:\git\ms\nuget\NuGet.Client>dotnet --info .NET Command Line Tools (1.0.0-rc2-002392)

Product Information: Version: 1.0.0-rc2-002392 Commit Sha: 880dcf2fc8

Runtime Environment: OS Name: Windows OS Version: 10.0.10586 OS Platform: Windows RID: win10-x64

D:\git\ms\nuget\NuGet.Client>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
DovydasNavickascommented, Jul 23, 2016

Hmm… guys? Still having these errors on a large project. Also, rc1 version with DNX works perfectly fine.

0reactions
TheRealPiotrPcommented, Jan 19, 2017

This is a project.json-specific bug. We don’t have plans to ship additional project.json updates now that we’ve transitioned to msbuild. Closing the issue, therefore.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'dotnet build' command not finding NuGet packages (they ...
I'm trying to build my .NET Core 2.1 application from the command-line on my Jenkins server. It builds fine on my local machine...
Read more >
Building using dotnet build fails for .NET Standard library ...
I'm using the latest pre-release of GitVersionTask (4.0.0-beta0011) on a .NET standard library project and it seems to work from Visual ...
Read more >
NuGet Package Restore
If restore fails, NuGet doesn't indicate the failure until after it checks all sources. NuGet then reports a failure for only the last...
Read more >
Troubleshoot .NET tool usage issues
Discover the common issues when running .NET tools and possible solutions.
Read more >
Projects fail to build in 15.8.0 due to errors from Microsoft. ...
I have several projects that are now failing to build in 15.8. Both were building in 15.7. These projects don't have any NuGet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found