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.

.Net 7 preview 7 is broken on linux arm64 via QEMU

See original GitHub issue

Describe the bug

Changing

./dotnet-install.sh -c 6.0

to

./dotnet-install.sh -c 6.0
./dotnet-install.sh -c 7.0

made my test script error out on alpine arm64. Looks like something broke in the SDK for that platform in .Net 7, since it works fine with just .Net 6.

To Reproduce

This error seems to happen on dotnet test.

Exceptions (if any)

1st run

  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018: The "ResolveAppHosts" task failed unexpectedly. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018: System.ArgumentNullException: Value cannot be null. (Parameter 'source') [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolveAppHosts.ExecuteCore() [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018: The "ResolveAppHosts" task failed unexpectedly. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018: System.ArgumentNullException: Value cannot be null. (Parameter 'source') [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolveAppHosts.ExecuteCore() [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(134,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]

2nd run:

  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Microsoft.Common.CurrentVersion.targets(5034,7): error MSB4018: The "CallTarget" task failed unexpectedly. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Microsoft.Common.CurrentVersion.targets(5034,7): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Microsoft.Common.CurrentVersion.targets(5034,7): error MSB4018:    at InvokeStub_CallTarget.get_TargetOutputs(Object, Object, IntPtr*) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Microsoft.Common.CurrentVersion.targets(5034,7): error MSB4018:    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Microsoft.Common.CurrentVersion.targets(5034,7): error MSB4028: The "CallTarget" task's outputs could not be retrieved from the "TargetOutputs" parameter. Object reference not set to an instance of an object. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Microsoft.Common.CurrentVersion.targets(5477,7): error MSB4018: The "FindUnderPath" task failed unexpectedly. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Microsoft.Common.CurrentVersion.targets(5477,7): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Microsoft.Common.CurrentVersion.targets(5477,7): error MSB4018:    at InvokeStub_FindUnderPath.get_InPath(Object, Object, IntPtr*) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Microsoft.Common.CurrentVersion.targets(5477,7): error MSB4018:    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
  /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Microsoft.Common.CurrentVersion.targets(5477,7): error MSB4028: The "FindUnderPath" task's outputs could not be retrieved from the "InPath" parameter. Object reference not set to an instance of an object. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]

Further technical details

   Version:   7.0.100-preview.7.22377.5
   Commit:    ba310d9309
  Runtime Environment:
   OS Name:     alpine
   OS Version:  3.16
   OS Platform: Linux
   RID:         alpine.3.16-arm64
   Base Path:   /root/.dotnet/sdk/7.0.100-preview.7.22377.5/
  Host:
    Version:      7.0.0-preview.7.22375.6
    Architecture: arm64
    Commit:       eecb028078
  .NET SDKs installed:
    6.0.400 [/root/.dotnet/sdk]
    7.0.100-preview.7.22377.5 [/root/.dotnet/sdk]
  .NET runtimes installed:
    Microsoft.AspNetCore.App 6.0.8 [/root/.dotnet/shared/Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 7.0.0-preview.7.22376.6 [/root/.dotnet/shared/Microsoft.AspNetCore.App]
    Microsoft.NETCore.App 6.0.8 [/root/.dotnet/shared/Microsoft.NETCore.App]
    Microsoft.NETCore.App 7.0.0-preview.7.22375.6 [/root/.dotnet/shared/Microsoft.NETCore.App]
  Other architectures found:
    None
  Environment variables:
    DOTNET_ROOT       [/root/.dotnet]
  global.json file:
    Not found
  Learn more:
    https://aka.ms/dotnet/info
  Download .NET:
    https://aka.ms/dotnet/download

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:14
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
MichalPetrykacommented, Nov 21, 2022

Seems to still be broken:

    Restored /home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj (in 3.69 sec).
  /root/.dotnet/sdk/7.0.100/NuGet.targets(132,5): error : Object reference not set to an instance of an object. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium.sln]

and with export DOTNET_EnableWriteXorExecute=0 it crashed with no message it seems:

2022-11-21T23:34:02.7476875Z Starting test execution, please wait...
2022-11-21T23:34:03.9439680Z A total of 1 test files matched the specified pattern.
2022-11-21T23:34:03.9488413Z /home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium.Tests/bin/Debug/net7.0/BetterCallSodium.Tests.dll

and nothing after that. @marcpopMSFT @janvorli

1reaction
Syzunacommented, Sep 6, 2022

Not sure if this is related but I tried building a .NET 7 container image with QEMU for my ARM64 server with github actions (sadly there still are no native runners) and I ran into the following issue (.NET 6 works perfectly)

#21 [publish 1/1] RUN dotnet publish -c Release --no-build -o /app/publish
#21 11.04 MSBuild version 17.4.0-preview-22368-02+c8492483a for .NET
#21 63.59 /usr/share/dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1103,5): error MSB4018: The "ValidateExecutableReferences" task failed unexpectedly. [/src/EDAPI/SyzunaPrograms.ED.EDAPI/SyzunaPrograms.ED.EDAPI.csproj]
#21 63.59 /usr/share/dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1103,5): error MSB4018: System.InvalidOperationException: Sequence contains no elements [/src/EDAPI/SyzunaPrograms.ED.EDAPI/SyzunaPrograms.ED.EDAPI.csproj]
#21 63.59 /usr/share/dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1103,5): error MSB4018:    at System.Linq.ThrowHelper.ThrowNoElementsException() [/src/EDAPI/SyzunaPrograms.ED.EDAPI/SyzunaPrograms.ED.EDAPI.csproj]
#21 63.59 /usr/share/dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1103,5): error MSB4018:    at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source) [/src/EDAPI/SyzunaPrograms.ED.EDAPI/SyzunaPrograms.ED.EDAPI.csproj]
#21 63.59 /usr/share/dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1103,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ValidateExecutableReferences.ExecuteCore() [/src/EDAPI/SyzunaPrograms.ED.EDAPI/SyzunaPrograms.ED.EDAPI.csproj]
#21 63.59 /usr/share/dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1103,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/src/EDAPI/SyzunaPrograms.ED.EDAPI/SyzunaPrograms.ED.EDAPI.csproj]
#21 63.59 /usr/share/dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1103,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/src/EDAPI/SyzunaPrograms.ED.EDAPI/SyzunaPrograms.ED.EDAPI.csproj]
#21 63.59 /usr/share/dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(1103,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/src/EDAPI/SyzunaPrograms.ED.EDAPI/SyzunaPrograms.ED.EDAPI.csproj]
#21 ERROR: process "/bin/sh -c dotnet publish -c Release --no-build -o /app/publish" did not complete successfully: exit code: 1

EDIT: can confirm this seems to be another issue related to QEMU and .NET 7. I used a self hosted ARM64 runner and it builds perfectly fine but not on a github hosted runner using QEMU

Read more comments on GitHub >

github_iconTop Results From Across the Web

Announcing .NET 7 Release Candidate 1
Announcing .NET 7 Release Candidate 1, the fastest .NET release to date. Learn about its cloud native and multi-platform features.
Read more >
VMware Fusion Apple Silicon guide for Windows 11 ARM
A step-by-step guide for installing Windows 11 for ARM on an M1 or M2 Mac using VMware Fusion Technical Preview.
Read more >
How to Install Windows 11 in UTM (M1 Mac) - YouTube
Install Homebrew using the install command on website: ... 11 11:44 Fixing Resolution 12:40 Scaling Fixes 12:52 Testing Internet 13:12 Eject ...
Read more >
The requested image's platform (linux/amd64) does not ...
When you build the docker image, add the --platform linux/amd64 flag and it will create an amd64 image instead of an arm64 image....
Read more >
Configure hardware acceleration for the Android Emulator
Discover how the Android Emulator can use hardware acceleration features to improve performance.
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