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.

CLI uses typeof(object).GetTypeInfo().Assembly.Location to determine FX location

See original GitHub issue

If CoreCLR gets serviced, mscorlib’s path will be in the servicing root and not the actual FX location.

Steps to reproduce

copy /y %USERPROFILE%\.nuget\packages\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\[Matching CLI Version]\ "C:\Program Files (x86)\dotnetextensions\pkgs\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\[Matching CLI Version]\"

dotnet publish

Expected behavior

FX dir determination should be derived from property APP_CONTEXT_DEPS_FILES and path containing Microsoft.NETCore.App.deps.json. See:

https://github.com/dotnet/cli/blob/803fef6a8b4838afd0e5f77e9e342d3e616d6c96/src/Microsoft.Extensions.DependencyModel/DependencyContextLoader.cs#L156

Actual behavior

https://github.com/dotnet/cli/blob/ac4c6702d5d345dc9c397f80290f105fedebe98b/src/Microsoft.DotNet.Cli.Utils/Muxer.cs#L38

Environment data

dotnet --info output:

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
schellapcommented, Apr 18, 2016

No issues guys, I’ll make the fix.

0reactions
TheRealPiotrPcommented, Apr 21, 2016

Fixed by dotnet/cli#2617

Read more comments on GitHub >

github_iconTop Results From Across the Web

CLI uses typeof(object).GetTypeInfo().Assembly.Location to ...
If CoreCLR gets serviced, mscorlib's path will be in the servicing root and not the actual FX location. Steps to reproduce.
Read more >
GetTypeInfo().Assembly.Location .net core
var z = typeof(object).GetTypeInfo().Assembly.Location;. to compile if it is in my application project using the Microsoft.NetCore.App SDK.
Read more >
Assembly.GetAssembly(Type) Method (System.Reflection)
An object representing a type in the assembly that will be returned. Returns. Assembly. The assembly in which the specified type is defined....
Read more >
Assembly.Location Property (System.Reflection)
Gets the full path or UNC location of the loaded file that contains the manifest. ... If the assembly is loaded from a...
Read more >
NET - Danyl Novhorodov - WordPress.com
Having built-in REPL allows you to use NuGet packages, load files with F# code, reference managed assemblies and execute selected parts of the...
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