rsdn / CodeJam

Set of handy reusable .NET components that can simplify your daily work and save your time when you copy and paste your favorite helper methods and classes from one project to another
MIT License
259 stars 35 forks source link

Using method GetValueOrDefault in NetStandard 2.0 library causes MissingMethodException in netcoreapp2.2 console app when referencing NetStandard library #83

Closed Advitalitum closed 4 years ago

Advitalitum commented 5 years ago

Using method in NetStandard 2.0 library causes MissingMethodException in netcoreapp2.2 when referencing NetStandard library

public static TValue GetValueOrDefault<TKey, TValue>(
      [NotNull] this Dictionary<TKey, TValue> dictionary,
      [NotNull] TKey key,
      TValue defaultValue)

System.MissingMethodException HResult=0x80131513 Message=Method not found: '!!1 CodeJam.Collections.DictionaryExtensions.GetValueOrDefault(System.Collections.Generic.Dictionary`2<!!0,!!1>, !!0, !!1)'. Source=NetStandardLib StackTrace: at NetStandardLib.NetStandardLibClass.SomeMethod() in C:\dev\CodeJamExceptionRepro\NetStandardLib\NetStandardLibClass.cs:line 10 at ConsoleApp4.Program.Main(String[] args) in C:\dev\CodeJamExceptionRepro\ConsoleApp4\Program.cs:line 8

Reporo here: https://github.com/Advitalitum/CodeJamExceptionRepro OS: Windows 10

andrewvk commented 4 years ago

Fixed in #86

NN--- commented 4 years ago

Shouldn't this issue be closed ?