Uh oh!
There was an error while loading. Please reload this page.
New project file format + Net Standard 2.0 build - #139
Conversation
baronfel
commented
Apr 22, 2018
It looks like things worked once you set the paths to fsc.exe, but I was under the impression that this was no longer required, per the fsproj files in FSharp.Data: https://github.com/fsharp/FSharp.Data/blob/master/src/FSharp.Data/FSharp.Data.fsproj#L6 I'm not quite sure what's going on with that, but we should be able to build for net45 using the dotnet sdk only, right? |
sergey-tihon
commented
Apr 23, 2018
I do still have ignored tests for ResX provider (the issue looks not related to TP).
Yes, you are right, I also did not use |
at least it works for Linux and macOS =) on windows, MSBuild cannot find assembly because of version mismatch of SharpYaml dependency ...
I am not sure how to pass binding redirect in this case ... Update: |
sergey-tihon
commented
Apr 27, 2018
@baronfel Why |
baronfel
commented
Apr 27, 2018
That's a good question. To be honest I'm still very shaky on it, and we may want to get clarification from @dsyme, but I believe it's because on .net 45+ FSharp.Data provides a net45 TP Design-Time Component. I think the netstandard facade dll would be required if the TP only shipped a netstandard2.0 version of the Design-Time component, and then only in order to make the netstandard2.0 component run on .net461 and greater. |
| nuget SharpYaml | ||
| nuget FSharp.Core ~> 4.0.0 | ||
| nuget YamlDotNet |
There was a problem hiding this comment.
@vasily-kirichenko@object Do you any reason why we should not use YamlDotNet and should keep SharpYaml?
YamlDotNet.dll is easier for net standard TP world, because it does not have external dependencies and should not resolve\redirect them...
There was a problem hiding this comment.
if the tests pass, I’m ok with yamldotnet.
sergey-tihon
commented
Apr 27, 2018
First alpha with 2 TPs for |
vasily-kirichenko
commented
Apr 28, 2018
I tried YamlConfig on Mac, the repo is https://github.com/vasily-kirichenko/ConsoleApp4 It work properly in Rider: but compilation fails: $ dotnet build
Microsoft (R) Build Engine version 15.6.82.30579 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restoring packages for /Users/vaskir/RiderProjects/ConsoleApp4/ConsoleApp4/ConsoleApp4.fsproj...
Generating MSBuild file /Users/vaskir/RiderProjects/ConsoleApp4/ConsoleApp4/obj/ConsoleApp4.fsproj.nuget.g.props.
Restore completed in 192.34 ms for /Users/vaskir/RiderProjects/ConsoleApp4/ConsoleApp4/ConsoleApp4.fsproj.
error FS3053 : The type provider 'FSharp.Configuration.ConfigTypeProvider+FSharpConfigurationProvider' reported an error : The type provider constructor has thrown an exception: Exception has been thrown by the target of an invocation. [/Users/vaskir/RiderProjects/ConsoleApp4/ConsoleApp4/ConsoleApp4.fsproj]
FSC : warning FS3005: Referenced assembly '/Users/vaskir/.nuget/packages/fsharp.configuration/2.0.0-alpha1/lib/netstandard2.0/FSharp.Configuration.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found [/Users/vaskir/RiderProjects/ConsoleApp4/ConsoleApp4/ConsoleApp4.fsproj]
Build FAILED.
FSC : warning FS3005: Referenced assembly '/Users/vaskir/.nuget/packages/fsharp.configuration/2.0.0-alpha1/lib/netstandard2.0/FSharp.Configuration.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found [/Users/vaskir/RiderProjects/ConsoleApp4/ConsoleApp4/ConsoleApp4.fsproj]
error FS3053 : The type provider 'FSharp.Configuration.ConfigTypeProvider+FSharpConfigurationProvider' reported an error : The type provider constructor has thrown an exception: Exception has been thrown by the target of an invocation. [/Users/vaskir/RiderProjects/ConsoleApp4/ConsoleApp4/ConsoleApp4.fsproj]
1 Warning(s)
1 Error(s)
Time Elapsed 00:00:02.95 |
sergey-tihon
commented
Apr 28, 2018
@vasily-kirichenko Yes.... one manual change required in <ProjectSdk="Microsoft.NET.Sdk">
<ImportProject="../../fsc.props" />and
|
@sergey-tihon thanks, it works, but... Is it possible to add the props file into the nuget package and auto modify project file when it's installed? I know this is done by FSharp.Compiler.Tools, for example. |
sergey-tihon
commented
Apr 28, 2018
@vasily-kirichenko hm... interesting idea. as I know other TPs do not do it yet... But what if you use several TPs NuGet packages and each import such but SDK file is still pointing to This probably means that path depends on VS version installed on the end-user machine... and there is no one file that covers all cases at the moment. We could try to invert one and release as a separate NuGet package and add the dependency from all type provider project, but I am not sure how long we need it. I want to believe that that very soon TPs will be able to run inside the .NET Core 2.0 hosted compiler... |
object
commented
May 17, 2018
Finally had some time to test the new package (https://www.nuget.org/packages/FSharp.Configuration/2.0.0-alpha1). Built a project successfully both on Windows and Mac using either Visual Studio or Rider. Will have to run some runtime tests, but looks very promising so far. Great work guys! |
sergey-tihon
commented
May 20, 2018
@baronfel Do you have an idea how Win build could be fixed? |
baronfel
commented
May 21, 2018
No, I was poking around locally this weekend a bit and didn't really get anywhere :( |
# Conflicts: # .github/workflows/dotnetcore.yml
# Conflicts: # src/FSharp.Configuration/TypeProviders.Helper.fs
When the list field is empty when updateList is called, the list is incorrectly inferred as sortable, as Seq.forall is vacuously true. To fix that, we check itemType using reflection instead. - ":? Uri" is done using Type.IsSubclass - ":? IComparable" uses Type.IsAssignable as IComparable is an interface
Slesa
commented
Aug 3, 2021
Any news here? I would like to use it in .NET core... |
sergey-tihon
commented
Aug 6, 2021
@Slesa let's move our conversation from twitter here.
Yes, it is because it still build design time component for net46 Does 2.0.0-alpha3 works for you on .net core? |
Slesa
commented
Aug 6, 2021
Yes, works. Thanks a lot. |
# Conflicts: # .config/dotnet-tools.json # .github/workflows/dotnetcore.yml # build.fsx.lock # global.json # paket.lock # src/FSharp.Configuration.Runtime/paket.template
# Conflicts: # RELEASE_NOTES.md

Status
net45Unit tests for ResX type provider temporary ignored because provided code failed to load actual value in runtime
Here should be some magic that fixes it when we build for full frameworks...
As of today .net core has the very limited support for resource files - dotnet/msbuild#2221
Status
netstandard2.0TPs migrated to
netstandard2.0:Tip for
YamlDotNetserializer customization - https://www.cyotek.com/blog/using-custom-type-converters-with-csharp-and-yamldotnet-part-1