Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Core App: It always open reference assembly #1720

Closed
wiz0u opened this issue Sep 27, 2019 · 5 comments
Closed

.NET Core App: It always open reference assembly #1720

wiz0u opened this issue Sep 27, 2019 · 5 comments
Assignees
Milestone

Comments

@wiz0u
Copy link

wiz0u commented Sep 27, 2019

When writing a .NET Core application, ILSpyAddIn seems to direct to 'reference assemblies' most of the time, which makes it kind of useless because these assemblies don't contain the code of the methods.

Step to reproduce:

  • Under VS2019, create a new project "Windows Forms App (.NET Core)"
  • In Program.Main(), type var folder = Environment.CurrentDirectory;
  • Right-click on CurrentDirectory > "Open code in ILSpy"
  • You land on the method with a warning "This assembly is marked as 'reference assembly'

ILSpy/ILSpyAddIn 5.0.0.5124

@Rpinski
Copy link
Member

Rpinski commented Sep 28, 2019

Tried exactly the same like you did with VS 16.3.1 (.NET Core 3.0 final) and it worked correctly with CurrentDirectory. I've found another problem with unresolved assemblies, which occurred specifically with Windows Forms framework assemblies (should be fixed with c12b5d6 now), but it doesn't look exactly like your problem.

@wiz0u
Copy link
Author

wiz0u commented Sep 28, 2019

What can i do to provide more details?

(note also that if ILSpy is not already open, it will open but stay on the previously navigated node -in last usage- instead of the symbol under Visual Studio's caret, it's another problem I have, but not related to the 'reference assembly' issue)

@Rpinski
Copy link
Member

Rpinski commented Sep 28, 2019

Ah, sorry, now I see the issue with reference assemblies is occurring here, too. There seems to be an issue with resolving the correct assembly between .NET Core and .NET Framework.

@Rpinski Rpinski self-assigned this Sep 29, 2019
@Rpinski Rpinski added this to the v5.0.1 milestone Sep 29, 2019
@Rpinski Rpinski closed this as completed Sep 29, 2019
@daniel-liuzzi
Copy link

daniel-liuzzi commented Jul 22, 2020

This issue seems to have come back as of ILSpy/ILSpyAddIn 6.0.0.5836.

Following the steps described in the original post results in the same This assembly is marked as 'reference assembly' behavior:

image

In case it helps, the assembly in question shows the following header:

// C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Extensions.dll
// System.Runtime.Extensions, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// Global type: <Module>
// Architecture: AnyCPU (64-bit preferred)
// Runtime: v4.0.30319
// This assembly is signed with a strong name key.
// Hash algorithm: SHA1
// Public key: 002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293

@christophwille
Copy link
Member

Please open a new issue

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants