fsprojects / FSharp.TypeProviders.SDK

The SDK for creating F# type providers
https://fsprojects.github.io/FSharp.TypeProviders.SDK/
MIT License
298 stars 94 forks source link

Use of Assembly.CodeBase doesn't work on .NET 5 - it is deprecated #358

Closed cartermp closed 3 years ago

cartermp commented 3 years ago

Assembly.CodeBase is used here:

https://github.com/fsprojects/FSharp.TypeProviders.SDK/blob/master/tests/ProvidedTypesTesting.fs#L596

But it is deprecated:

https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assembly.codebase?view=net-5.0

If you try to build a type provider against .NET 5, this will fail to compile.

We should not use this API somehow. The comment implies that CodeBase provided some utility that Location did not. Is that true? What should we do about it?

cc @dsyme

dsyme commented 3 years ago

It can be switched to Locaton I think. IIRC shadow copying is no longer being used.