Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a netstandard library with a netcoreapp design time assembly #360

Closed
daniellittledev opened this issue Apr 2, 2021 · 1 comment

Comments

@daniellittledev
Copy link

Description

I'm looking for information about creating a netstandard library with a netcoreapp design time assembly. I have type provider using System.Configuration.ConfigurationManager that I'm trying to update for dotnetcore. I initially used netstandard2.0 for both projects however when using the type provider there was an error loading ConfigurationManager because it was loading the reference assembly instead of the implementation assembly.

Then I changed the design time assembly to target netcoreapp2.2 but when loading the type provider it could not find the assembly. Note that the lib assembly was still netstandard2.0.

So I have two questions?

  1. Do the targets of the assemblies need to be the same?
  2. Can you target netcoreapp2.2 for type providers (I assume this then means you can't use it from a netstandard project)?
@dsyme
Copy link
Contributor

dsyme commented Sep 21, 2021

You need to target netcoreapp3.0 or net5.0 and make sure your type provider bits are places into typeproviders/fsharp41/netcoreapp3.0 in your nuget package.

However such type providers won't be usable in tooling that runs .NET Framework (e.g. Visual Studio) so you should in general refrain from doing this unless you make a matching net472 target for your type provider.

@fsprojects fsprojects locked and limited conversation to collaborators Sep 21, 2021
@dsyme dsyme closed this as completed Sep 21, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants