Skip to content

Failures building from v6.0.x tags #94541

Open
@Wedgetable

Description

@Wedgetable

Description

I'm trying to build the dotnet/runtime repo from the v6.0.24 release tag. I'm using PowerShell and running .\build.cmd libs -c release -a x64. It always fails with the following error:

C:\Users\<user>\.nuget\packages\microsoft.dotnet.apicompat\6.0.0-beta.23408.5\build\Microsoft.DotNet.ApiCompat.targets(96,5): error : ApiCompat failed for 'C:\dev\dotnet-runtime\artifacts\bin\System.Net.WebClient\net6.0-Release\System.Net.WebClient.dll' [C:\dev\dotnet-runtime\src\libraries\System.Net.WebClient\src\System.Net.WebClient.csproj]

in the following place:

System.Runtime.CompilerServices.Unsafe -> C:\dev\dotnet-runtime\artifacts\bin\System.Runtime.CompilerServices.Unsafe\net6.0-Release\System.Runtime.CompilerServices.Unsafe.dll
'C:\Users\<user>\AppData\Local\Temp\MSBuildTemp<user>\tmp<random 32-char hex>.exec.cmd' is not recognized as an internal or external command, operable program or batch file.
C:\Users\<user>\.nuget\packages\microsoft.dotnet.apicompat\6.0.0-beta.23408.5\build\Microsoft.DotNet.ApiCompat.targets(96,5): error : ApiCompat failed for 'C:\dev\dotnet-runtime\artifacts\bin\System.Net.WebClient\net6.0-Release\System.Net.WebClient.dll' [C:\dev\dotnet-runtime\src\libraries\System.Net.WebClient\src\System.Net.WebClient.csproj]
System.Threading.Tasks.Dataflow -> C:\dev\dotnet-runtime\artifacts\bin\System.Threading.Tasks.Dataflow\net6.0-Release\System.Threading.Tasks.Dataflow.dll

When I try to build main, I have no issues. But if I checkout any of the following tags: v6.0.22, v6.0.23, and v6.0.24, the build fails with the error above (I haven't tried earlier v6.0.x tags).

Additionally, when I try to run .\build.cmd clr -c release -a x64, I get a failure about jitinterface_x64:

ILCompiler.ReadyToRun -> C:\dev\dotnet-runtime\artifacts\bin\ILCompiler.ReadyToRun\x64\Release\ILCompiler.ReadyToRun.dll
C:\dev\dotnet-runtime\.dotnet\sdk\6.0.121\Microsoft.Common.CurrentVersion.targets(5100,5): error MSB3030: Could not copy the file "C:\dev\dotnet-runtime\artifacts\bin\coreclr\windows.x64.Release\jitinterface_x64.dll" because it was not found. [C:\dev\dotnet-runtime\src\coreclr\tools\aot\crossgen2\crossgen2.csproj]

I've tried git clean -fxd, I've tried dotnet nuget locals all --clear. I've tried completely uninstalling/reinstalling .NET versions on my local machine. Nothing seems to help. I'm seeing this exact same problem on a Azure build agent where running the build command worked when we initally upgraded to v6.0.22, but now no longer does.

Reproduction Steps

Stop-Process -Name dotnet -Force
git checkout tags/v6.0.24
git clean -fxd
.\build.cmd libs -c release -a x64

Expected behavior

Build succeeded.
    0 Warning(s)
    0 Error(s)

Actual behavior

Build FAILED.

C:\Users\<user>\.nuget\packages\microsoft.dotnet.apicompat\6.0.0-beta.23408.5\build\Microsoft.DotNet.ApiCompat.targets(96,5): error : ApiCompat failed for 'C:\dev\dotnet-runtime\artifacts\bin\System.Net.WebClient\net6.0-Release\System.Net.WebClient.dll' [C:\dev\dotnet-runtime\src\libraries\System.Net.WebClient\src\System.Net.WebClient.csproj]
    0 Warning(s)
    1 Error(s)

Regression?

Building from the v6.0.22 tag used to work. I only noticed it was broken when I tried to update a local fork of the dotnet-runtime repository from v6.0.22 to v6.0.24, and realized it fails to build for the last 3 tags.

Known Workarounds

No response

Configuration

Which version of .NET is the code running on?
For v6.0.22, the build is showing "SDK Version: 6.0.121", though I think it installed the corresponding SDK for 6.0.24 when I tried to build that runtime.

What OS and version, and what distro if applicable?
Windows 10 Enterprise

What is the architecture (x64, x86, ARM, ARM64)?
x64

Do you know whether it is specific to that configuration?
No

If you're using Blazor, which web browser(s) do you see this issue in?
n/a

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions