Repository navigation
Closed
Description
- .NET Core Version: 3.0 Preview 8
- Have you experienced this same bug with .NET Framework?: No
Problem description:
.resx files using System.Resources.ResXNullRef or System.Resources.ResXFileRef cannot be loaded.
Actual behavior:
System.NotSupportedException
HResult=0x80131515
Message=TypeConverter cannot convert from System.String.
Source=System.ComponentModel.TypeConverter
StackTrace:
at System.ComponentModel.TypeConverter.GetConvertFromException(Object value)
at System.ComponentModel.TypeConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.ComponentModel.TypeConverter.ConvertFromInvariantString(String text)
at System.Resources.Extensions.DeserializingResourceReader.DeserializeObject(Int32 typeIndex)
at System.Resources.Extensions.DeserializingResourceReader._LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
at System.Resources.Extensions.DeserializingResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
at System.Resources.Extensions.DeserializingResourceReader.ResourceEnumerator.get_Entry()
at System.Resources.Extensions.DeserializingResourceReader.ResourceEnumerator.get_Current()
at System.ComponentModel.ComponentResourceManager.FillResources(CultureInfo culture, ResourceSet& resourceSet)
at System.ComponentModel.ComponentResourceManager.FillResources(CultureInfo culture, ResourceSet& resourceSet)
at System.ComponentModel.ComponentResourceManager.FillResources(CultureInfo culture, ResourceSet& resourceSet)
at System.ComponentModel.ComponentResourceManager.ApplyResources(Object value, String objectName, CultureInfo culture)
at System.ComponentModel.ComponentResourceManager.ApplyResources(Object value, String objectName)
at WindowsFormsApp1.Form1.InitializeComponent() in C:\Users\Filip Navara\Source\Repos\WindowsFormsApp1\WindowsFormsApp1\Form1.Designer.cs:line 36
at WindowsFormsApp1.Form1..ctor() in C:\Users\Filip Navara\Source\Repos\WindowsFormsApp1\WindowsFormsApp1\Form1.cs:line 17
at WindowsFormsApp1.Program.Main() in C:\Users\Filip Navara\Source\Repos\WindowsFormsApp1\WindowsFormsApp1\Program.cs:line 19
Expected behavior:
No crash.
Minimal repro:
Details:
This is new behavior with .NET Core Preview 8 and VS 2019 Preview 16.3.0 Preview 2. With earlier VS previews the resources were compiled using NetFX msbuild. Now a new flow in msbuild is used that avoids the deserialization and serialization of binary resources. The new resource compilation process in msbuild and CoreFX seems to be broken for ResXNullRef and ResXFileRef at least. It is not immediately obvious whether it is bug in WinForms, CoreFX or msbuild but it certainly is broken now. /cc @rainersigwald
Metadata
Metadata
Assignees
Labels
No labels
Activity
rainersigwald commentedon Aug 19, 2019
ResXNullRefprobably needs special handling in MSBuild. I'll duplicate this bug over there and look into that.Can you share a repro for your problems with
ResXFileRef? I have a fix almost ready for byte arrays and memory streams, but I'm not sure that's your case: dotnet/msbuild#4607.rainersigwald commentedon Aug 19, 2019
This issue was moved to dotnet/msbuild#4634