ngm / Pickles.NetCore

Proof-of-concept port of Pickles (https://github.com/picklesdoc/pickles) to .NET Core
0 stars 0 forks source link

Use of Assembly.GetExecutingAssembly() #5

Open ngm opened 7 years ago

ngm commented 7 years ago

Assembly.GetExecutingAssembly() is used in quite a few places. This API has been changed in .NET Core (although may be returning: https://blogs.msdn.microsoft.com/dotnet/2016/05/27/making-it-easier-to-port-to-net-core/)

The new API uses typeof and GetTypeInfo(), e.g.

typeof(PicklesModule).GetTypeInfo().Assembly.GetName().Version);

Need to investigate what is the recommended API going forward.