mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.84k stars 1.02k forks source link

cannot resolve mscorlib types which are referenced by netstandard2.0 libraries in net461 apps #5033

Open atsushieno opened 6 years ago

atsushieno commented 6 years ago

Steps to repro:

result:

screenshot from 2018-06-12 03-01-31

environment:

MonoDevelop
Version 7.6 Preview (7.6 build 1542)
Installation UUID: 5c0e0cb6-8574-4b67-9624-cfb2e33a0596
Runtime:
    Mono 5.14.0 (2018-04/47fe82d812c 2018年  6月 11日 月曜日 19:46:23 JST) (64-bit)
    GTK+ 2.24.31 (Adwaita-dark theme)

NuGet
Version: 4.3.1.4445

.NET Core
Runtime: /usr/share/dotnet/dotnet
Runtime Versions:
    2.1.0-rc1
    2.0.5
SDK: /usr/share/dotnet/sdk/2.1.300-rc1-008673/Sdks
SDK Versions:
    2.1.300-rc1-008673
    2.1.4
MSBuild SDKs: /devel/lib/mono/msbuild/15.0/bin/Sdks

Build Information
Release ID: 706001542
Git revision: dff6c0d26853d96ceb6ba3fb7b62e2193ba5efca
Build date: 2018-06-11 15:49:37+09

Operating System
Linux
Linux 4.13.0-43-generic #48-Ubuntu SMP Wed May 16 12:18:48 UTC 2018 x86_64

Enabled user installed extensions
EditorConfig 1.0
AddinMaker 1.4.2

VS bug #632381

knocte commented 6 years ago

I think this is a duplicate of https://github.com/mono/monodevelop/issues/3688

knocte commented 6 years ago

Mmm, not sure if a recent commit (6535850d61af276c8d85ff814207979e7f4173b9) fixed this, but looks related.

Therzok commented 6 years ago

Yeah, shoudl be fixed by that. cc @mrward

mrward commented 6 years ago

I am not sure if this is the same problem as that fixed with 6535850. It depends on if the net461 project directly references the .NET Standard assembly or not. If it references the project, which seems likely since it is in the same solution, then the fix in 6535850 has no affect, the facade assemblies should be used in this case anyway.

mrward commented 6 years ago

With VS Mac 7.6.0.1600 (master wrench build) which does not include the 6535850 fix then I do not see any problem in the text editor when the net461 app references the netstandard 2.0 library project.

The problem does occur in VS Mac 7.5.2 stable and with an older VS Mac 7.6.0.1544 (master) wrench build. So it seems as though it is fixed somewhere but is unrelated to the fix in 6535850.

atsushieno commented 6 years ago

I tried with the latest master (eea3c1f) and the problem is still there.

atsushieno commented 6 years ago

This also affects debugging experience. I am 1) unable to set breakpoint to Xwt Button event handler, or even 2) such code hangs up even without breakpoints. For 2) I'm not sure if it is monodevelop issue or debugger-libs issue, though. Running the same program without debugger just works.

If I alter any netstandard library with desktop library, then my breakpoints work and code just runs without problem on debugger.

atsushieno commented 6 years ago

Umm, nevermind. It is always difficult to precisely replicate a project with the same content in different framework :-( I only had slightly different set of files that resulted in difference. Desktop debugger is not functional in the same way as those netstandard2 references. Maybe it is another bug but it's overly complicated to find out repro condition...