EgorBo / Disasmo

VS2022 Add-in. Click on any method or class to see what .NET Core's JIT generates for them (ASM).
MIT License
638 stars 39 forks source link

Build error in Disasmo window, tries to build on .NET 6 on .NET 5 target #30

Closed uberhalit closed 2 years ago

uberhalit commented 2 years ago

Local version of latest master brach dotNET runtime is built (with both .\build.cmd Clr+Libs -c Release -rc Checked and .\build.cmd Clr -c Checked). Upon start, compilation is done but fails with an error about .NET 6.0 (even though my app is targeting .NET 5.0 and Settings->Reload Strategy is set to dotnet publish):

System.InvalidOperationException: ERROR: 'dotnet build' did not produce expected binaries ('C:\Users\uberhalit\AppData\Local\Temp\DisasmoLoader3\4.0.4_5.0.402\out\DisasmoLoader3.dll' and 'C:\Users\uberhalit\AppData\Local\Temp\DisasmoLoader3\4.0.4_5.0.402\out\DisasmoLoader3.runtimeconfig.json'):
Microsoft (R)-Build-Engine, Version 16.11.1+3e40a09f8 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files\dotnet\sdk\5.0.402\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support .NET 6.0 as target. [C:\Users\uberhalit\AppData\Local\Temp\DisasmoLoader3\4.0.4_5.0.402\DisasmoLoader3.csproj]
    0 Warnings
    1 Error

   at Disasmo.Utils.LoaderAppManager.<InitLoaderAndCopyTo>d__2.MoveNext()
---  ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Disasmo.MainViewModel.<RunFinalExe>d__61.MoveNext()
KingRikkie commented 2 years ago

Same issue here, my app is targeting .NET 5 too. The repo clone git clone git@github.com:dotnet/runtime.git wasn't successful for me so I had to use repo link git clone https://github.com/dotnet/runtime.git. Afterwards I built with .\build.cmd Clr+Libs -c Release -rc Checked and linked that directory in disasmo, AltJit dlls show up normally but it never builds. Windows 10 21H1, Enterprise x64.

EgorBo commented 2 years ago

I decided to migrate Disasmo to VS2022 and .NET 6.0, unfortunately I have no idea how to maintain it for both VS2019 and VS2022 🙁 so if anybody knows PRs are welcomed.

So now requirements are vs2022 (64bit) and .NET 6.0 rc2 (6.0 should be released next week(?))