Runtime: Unable to build

Created on 11 Jan 2018  路  7Comments  路  Source: dotnet/runtime

@weitzhandler commented on Wed Jan 10 2018

Hi,

I followed the instructions in this article.

After syncing, running the build command fails with the following errors:

...
  Microsoft.Private.CoreFx.NETCoreApp -> D:\Users\Shimmy\Source\Repos\corefx\bin/packages/Debug/specs/Microsoft.Private.CoreFx.NETCoreApp.nuspec
  Verifying closure of Microsoft.Private.CoreFx.NETCoreApp reference assemblies
  Verifying no duplicate types in Microsoft.Private.CoreFx.NETCoreApp reference assemblies
D:\Users\Shimmy\Source\Repos\corefx\Tools\Packaging.targets(1068,5): error : Files D:\Users\Shimmy\Source\Repos\corefx\bin\AnyOS.AnyCPU.Debug\mscorlib\netcoreapp\mscorlib.dll and D:\Users\Shimmy\Source\Repo
s\corefx\bin\obj\shims\netcoreapp\facades\mscorlib.dll have the same TargetPath runtime.win-x64.Microsoft.Private.CoreFx.NETCoreApp/runtimes/win-x64/lib/netcoreapp2.1/mscorlib.dll. [D:\Users\Shimmy\Source\R
epos\corefx\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
D:\Users\Shimmy\Source\Repos\corefx\Tools\Packaging.targets(1068,5): error : Files D:\Users\Shimmy\Source\Repos\corefx\bin\obj\shims\netcoreapp\facades\System.dll and D:\Users\Shimmy\Source\Repos\corefx\bin
\AnyOS.AnyCPU.Debug\System\netcoreapp\System.dll have the same TargetPath runtime.win-x64.Microsoft.Private.CoreFx.NETCoreApp/runtimes/win-x64/lib/netcoreapp2.1/System.dll. [D:\Users\Shimmy\Source\Repos\cor
efx\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj]

Build FAILED.

D:\Users\Shimmy\Source\Repos\corefx\Tools\Packaging.targets(1068,5): error : Files D:\Users\Shimmy\Source\Repos\corefx\bin\AnyOS.AnyCPU.Debug\mscorlib\netcoreapp\mscorlib.dll and D:\Users\Shimmy\Source\Repo
s\corefx\bin\obj\shims\netcoreapp\facades\mscorlib.dll have the same TargetPath runtime.win-x64.Microsoft.Private.CoreFx.NETCoreApp/runtimes/win-x64/lib/netcoreapp2.1/mscorlib.dll. [D:\Users\Shimmy\Source\R
epos\corefx\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
D:\Users\Shimmy\Source\Repos\corefx\Tools\Packaging.targets(1068,5): error : Files D:\Users\Shimmy\Source\Repos\corefx\bin\obj\shims\netcoreapp\facades\System.dll and D:\Users\Shimmy\Source\Repos\corefx\bin
\AnyOS.AnyCPU.Debug\System\netcoreapp\System.dll have the same TargetPath runtime.win-x64.Microsoft.Private.CoreFx.NETCoreApp/runtimes/win-x64/lib/netcoreapp2.1/System.dll. [D:\Users\Shimmy\Source\Repos\cor
efx\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:01:11.43
Command execution failed with exit code 1.

[EDIT] Reformatted logs based on later reply by @karelz

area-Infrastructure-libraries bug

All 7 comments

@weitzhandler I would recommend to use code quotes for logs - it is extremely hard to read in this form.

@weshaggard any idea?

Same as https://github.com/dotnet/corefx/issues/25750.

@weitzhandler try running a clean.cmd -all from the root and then building again.

@karelz
I would recommend to use code quotes for logs - it is extremely hard to read in this form.

I'm unable to edit the first post, so I'm gonna paste the error in again.

@weshaggard
try running a clean.cmd -all from the root and then building again.

I tried that but the same issue still persists.

  Microsoft.Private.CoreFx.NETCoreApp -> D:\Users\Shimmy\Source\Repos\corefx\bin/packages/Debug/specs/Microsoft.Private.CoreFx.NETCoreApp.nuspec
  Verifying closure of Microsoft.Private.CoreFx.NETCoreApp reference assemblies
  Verifying no duplicate types in Microsoft.Private.CoreFx.NETCoreApp reference assemblies
D:\Users\Shimmy\Source\Repos\corefx\Tools\Packaging.targets(1068,5): error : Files D:\Users\Shimmy\Source\Repos\corefx\bin\AnyOS.AnyCPU.Debug\mscorlib\netcoreapp\mscorlib.dll and D:\Users\Shimmy\Source\Repos\corefx\bin\obj\shims\netcoreapp\facades\mscorlib.dll have the same TargetPath runtime.win-x64.Microsoft.Private.CoreFx.NETCoreApp/runtimes/win-x64/lib/netcoreapp2.1/mscorlib.dll. [D:\Users\Shimmy\Source\Repos\corefx\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
D:\Users\Shimmy\Source\Repos\corefx\Tools\Packaging.targets(1068,5): error : Files D:\Users\Shimmy\Source\Repos\corefx\bin\obj\shims\netcoreapp\facades\System.dll and D:\Users\Shimmy\Source\Repos\corefx\bin\AnyOS.AnyCPU.Debug\System\netcoreapp\System.dll have the same TargetPath runtime.win-x64.Microsoft.Private.CoreFx.NETCoreApp/runtimes/win-x64/lib/netcoreapp2.1/System.dll. [D:\Users\Shimmy\Source\Repos\corefx\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj]

Build FAILED.

D:\Users\Shimmy\Source\Repos\corefx\Tools\Packaging.targets(1068,5): error : Files D:\Users\Shimmy\Source\Repos\corefx\bin\AnyOS.AnyCPU.Debug\mscorlib\netcoreapp\mscorlib.dll and D:\Users\Shimmy\Source\Repos\corefx\bin\obj\shims\netcoreapp\facades\mscorlib.dll have the same TargetPath runtime.win-x64.Microsoft.Private.CoreFx.NETCoreApp/runtimes/win-x64/lib/netcoreapp2.1/mscorlib.dll. [D:\Users\Shimmy\Source\Repos\corefx\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
D:\Users\Shimmy\Source\Repos\corefx\Tools\Packaging.targets(1068,5): error : Files D:\Users\Shimmy\Source\Repos\corefx\bin\obj\shims\netcoreapp\facades\System.dll and D:\Users\Shimmy\Source\Repos\corefx\bin\AnyOS.AnyCPU.Debug\System\netcoreapp\System.dll have the same TargetPath runtime.win-x64.Microsoft.Private.CoreFx.NETCoreApp/runtimes/win-x64/lib/netcoreapp2.1/System.dll. [D:\Users\Shimmy\Source\Repos\corefx\pkg\Microsoft.Private.CoreFx.NETCoreApp\Microsoft.Private.CoreFx.NETCoreApp.pkgproj]
    0 Warning(s)
    2 Error(s)

Time Elapsed 00:01:11.43
Command execution failed with exit code 1.

@weitzhandler did you get any errors after running the clean?

Can you also try git clean -xdf? Also can I ask what commit your branch is currently at?

@weshaggard
did you get any errors after running the clean?

As mentioned above, I did and the error persists.

Can you also try git clean -xdf

What does it do?
Before doing things I might regret...

git clean -xdf from the root of your corefx repo will delete any files under the repo that git doesn't know about. This is a way to help ensure there aren't any stale files causing problems.

I'm also still interested in knowing what commit sha you are building from as well. Please try to move to the tip of master if you aren't already there.

At first I didn't manage to complete git clean -xdf, but after closing the IDE it worked well, after which it builds successfully.
@maririos @karelz @weshaggard, I'm unable to close the issue but you're welcome to do so as far as I'm concerned.
Thanks for your help!

Was this page helpful?
0 / 5 - 0 ratings