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

Disasmo window shows build errors #19

Closed kunalspathak closed 3 years ago

kunalspathak commented 3 years ago

I tried disasmo but I get following failure in the disasmo window. Any idea?

Microsoft (R) Build Engine version 16.9.0-preview-20611-06+5abf1ff7b for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\5.0.200-preview.20614.14\Current\SolutionFile\ImportAfter\Microsoft.NET.Sdk.Solution.targets(27,5): error NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. [e:\ConsoleApp1.sln]

Build FAILED.

C:\Program Files\dotnet\sdk\5.0.200-preview.20614.14\Current\SolutionFile\ImportAfter\Microsoft.NET.Sdk.Solution.targets(27,5): error NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. [e:\ConsoleApp1.sln]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.13

Here is the output of dotnet --info

dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.200-preview.20614.14
 Commit:    863605c8c3

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19042
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\5.0.200-preview.20614.14\

Host (useful for support):
  Version: 5.0.1
  Commit:  b02e13abab

.NET SDKs installed:
  3.1.400-preview-015151 [C:\Program Files\dotnet\sdk]
  5.0.101 [C:\Program Files\dotnet\sdk]
  5.0.200-preview.20614.14 [C:\Program Files\dotnet\sdk]

My Console1.csproj looks like:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>

</Project>

I noticed the RID is win-x64 and not sure if that is accurate.

image

EgorBo commented 3 years ago

@kunalspathak (also @SingleAccretion) it looks like it used to be possible to do dotnet build -r RID in order to basically "publish" but no more with the next version of .NET 5 (see https://github.com/dotnet/sdk/issues/14281)

I'll change the behavior back to dotnet publish in a moment.

SingleAccretion commented 3 years ago

Please note that if you also use --self-contained true, this should fix #17 (this is what my workaround'y target does today).

EgorBo commented 3 years ago

Fixed, thanks!

kunalspathak commented 3 years ago

Thanks for the quick fix. Can I update the extension right away or do I need to wait till the latest version is published?

EgorBo commented 3 years ago

Thanks for the quick fix. Can I update the extension right away or do I need to wait till the latest version is published?

The update should be already available but I usually just uninstall the current version, close all instances of VS (an uninstall wizzard should appear) then install once again (new version this time) and close all instances again to let it install it.

The workflow can be improved I guess 🤔

kunalspathak commented 3 years ago

Perfect, I verified the fix works. Thank you @EgorBo !