fsprojects / FSharp.Configuration

The FSharp.Configuration project contains type providers for the configuration of .NET projects.
http://fsprojects.github.io/FSharp.Configuration/
Other
114 stars 63 forks source link

ResX Type Provider (.NET Core version) #156

Open sergey-tihon opened 4 years ago

sergey-tihon commented 4 years ago

Unit tests for ResX type provider temporary ignored because provided code failed to load actual value in runtime

[23:17:19 ERR] ResX Provider tests/Can return an image from the resource file errored in 00:00:00.0100000 <Expecto>
System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "Resource1.resources" was correctly embedded or linked into assembly "FSharp.Configuration.Tests" at compile time, or that allthe satellite assemblies required are loadable and fully signed.
  at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing (System.String fileName) [0x000bf] in <e22c1963d07746cd9708456620d50e1a>:0
  at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet (System.Globalization.CultureInfo culture, System.Collections.Generic.Dictionary`2[TKey,TValue] localResourceSets, System.Boolean tryParents, System.Boolean createIfNotExists, System.Threading.StackCrawlMark& stackMark) [0x000d9] in <e22c1963d07746cd9708456620d50e1a>:0
  at System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo requestedCulture, System.Boolean createIfNotExists, System.Boolean tryParents, System.Threading.StackCrawlMark& stackMark) [0x00099] in <e22c1963d07746cd9708456620d50e1a>:0
  at System.Resources.ResourceManager.InternalGetResourceSet (System.Globalization.CultureInfo culture, System.Boolean createIfNotExists, System.Boolean tryParents) [0x00002] in <e22c1963d07746cd9708456620d50e1a>:0
  at System.Resources.ResourceManager.GetObject (System.String name, System.Globalization.CultureInfo culture, System.Boolean wrapUnmanagedMemStream) [0x00071] in <e22c1963d07746cd9708456620d50e1a>:0
  at System.Resources.ResourceManager.GetObject (System.String name) [0x00000] in <e22c1963d07746cd9708456620d50e1a>:0
  at FSharp.Configuration.ResXProvider.readValue[a] (System.String resourceName, System.Reflection.Assembly assembly, System.String key) [0x00024] in <5adcedc545d3202aa7450383c5eddc5a>:0
  at FSharp.Configuration.Tests.ResXTests+tests@15-256.Invoke (Microsoft.FSharp.Core.Unit _arg2) [0x0000b] in <5adcedcdb7adfc68a7450383cdeddc5a>:0
  at Expecto.Impl+execTestAsync@888-1.Invoke (Microsoft.FSharp.Core.Unit unitVar) [0x00027] in <5ac8c052822f8511a745038352c0c85a>:0
  at Microsoft.FSharp.Control.AsyncBuilderImpl+callA@522[b,a].Invoke (Microsoft.FSharp.Control.AsyncParams`1[T] args) [0x00051] in <5a7d678a904cf4daa74503838a677d5a>:0

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 - https://github.com/Microsoft/msbuild/issues/2221

https://docs.microsoft.com/en-US/aspnet/core/fundamentals/localization?view=aspnetcore-2.0#view-localization

abelbraaksma commented 4 years ago

As of today .net core has the very limited support for resource files - microsoft/msbuild#2221

At the bottom of that thread it says it's fixed for Core 3.0.