diff --git a/ILRepack.IntegrationTests/ILRepack.IntegrationTests.csproj b/ILRepack.IntegrationTests/ILRepack.IntegrationTests.csproj
index 200dea07..5103d288 100644
--- a/ILRepack.IntegrationTests/ILRepack.IntegrationTests.csproj
+++ b/ILRepack.IntegrationTests/ILRepack.IntegrationTests.csproj
@@ -9,8 +9,9 @@
Properties
ILRepack.IntegrationTests
ILRepack.IntegrationTests
- v4.0
+ v4.7.2
512
+
true
@@ -20,6 +21,7 @@
DEBUG;TRACE
prompt
4
+ false
pdbonly
@@ -28,6 +30,7 @@
TRACE
prompt
4
+ false
@@ -83,6 +86,15 @@
2.6.4
+
+ 2.6.4
+
+
+ 2.3.0
+
+
+ 2.0.0
+
2.2.5
diff --git a/ILRepack.IntegrationTests/NuGet/NuGetHelpers.cs b/ILRepack.IntegrationTests/NuGet/NuGetHelpers.cs
index 4368877b..f81e047d 100644
--- a/ILRepack.IntegrationTests/NuGet/NuGetHelpers.cs
+++ b/ILRepack.IntegrationTests/NuGet/NuGetHelpers.cs
@@ -60,6 +60,8 @@ public static IObservable>> GetNupkgAssembliesAsync(P
public static IObservable>> GetNupkgContentAsync(Package package)
{
+ // can't download from nuget.org without Tls12 anymore, net472 is needed for Tls12
+ ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var o = CreateDownloadObservable(new Uri($"https://www.nuget.org/api/v2/package/{package.Name}/{package.Version}"));
return o.SelectMany(input => {
return Observable.Create>(observer => {
diff --git a/ILRepack.IntegrationTests/Scenarios.cs b/ILRepack.IntegrationTests/Scenarios.cs
index 76335a42..e52b1a5f 100644
--- a/ILRepack.IntegrationTests/Scenarios.cs
+++ b/ILRepack.IntegrationTests/Scenarios.cs
@@ -53,6 +53,18 @@ public void GivenDotNet462AppUsingNetStandard2LibrarySetAndReflection_MergedAppl
RunScenario("DotNet462NetStandard2");
}
+ [Test]
+ public void GivenNetCore3WinFormsAppUsesImageResources_MergedCore3WinFormsApplicationRunsSuccessfully()
+ {
+ RunScenario("WindowsFormsTestNetCoreApp");
+ }
+
+ [Test]
+ public void GivenNetCore3WpfAppUsesImageResources_MergedCore3WpfApplicationRunsSuccessfully()
+ {
+ RunScenario("WPFSampleApplicationCore");
+ }
+
private void RunScenario(string scenarioName)
{
string scenarioExecutable = GetScenarioExecutable(scenarioName);
diff --git a/ILRepack.IntegrationTests/Scenarios/ClassLibrary/packages.config b/ILRepack.IntegrationTests/Scenarios/ClassLibrary/packages.config
new file mode 100644
index 00000000..7547653d
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/ClassLibrary/packages.config
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/ClassLibraryCore.csproj b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/ClassLibraryCore.csproj
new file mode 100644
index 00000000..ee177907
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/ClassLibraryCore.csproj
@@ -0,0 +1,33 @@
+
+
+
+ netcoreapp3.1
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+
+
diff --git a/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/DummyUserControl.xaml b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/DummyUserControl.xaml
new file mode 100644
index 00000000..37172f95
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/DummyUserControl.xaml
@@ -0,0 +1,14 @@
+
+
+ /ClassLibraryCore;component/Resources/image.png
+
+
+
+
+
+
+
+
diff --git a/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/DummyUserControl.xaml.cs b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/DummyUserControl.xaml.cs
new file mode 100644
index 00000000..d32e3fa2
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/DummyUserControl.xaml.cs
@@ -0,0 +1,31 @@
+
+using System;
+using System.Windows;
+
+namespace ClassLibraryCore
+{
+ public partial class DummyUserControl
+ {
+ public DummyUserControl()
+ {
+ InitializeComponent();
+
+ Loaded += OnLoaded;
+
+ if (Properties.Resources.image.Size.Width <= 0)
+ {
+ throw new Exception("Image from resource doesn't seem to be loaded! :(");
+ }
+ }
+
+ private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
+ {
+ /*
+ if (TheImage.ActualWidth <= 0)
+ {
+ throw new Exception("Image doesn't seem to be loaded! :(");
+ }
+ */
+ }
+ }
+}
diff --git a/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/Properties/Resources.Designer.cs b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/Properties/Resources.Designer.cs
new file mode 100644
index 00000000..0281d64f
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/Properties/Resources.Designer.cs
@@ -0,0 +1,73 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace ClassLibraryCore.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ClassLibraryCore.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap image {
+ get {
+ object obj = ResourceManager.GetObject("image", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/Properties/Resources.resx b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/Properties/Resources.resx
new file mode 100644
index 00000000..99f83cee
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/Properties/Resources.resx
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+ ..\Resources\image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
\ No newline at end of file
diff --git a/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/Resources/image.png b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/Resources/image.png
new file mode 100644
index 00000000..7eb2b9ad
Binary files /dev/null and b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/Resources/image.png differ
diff --git a/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/TextBlockStyles.xaml b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/TextBlockStyles.xaml
new file mode 100644
index 00000000..5c0a3270
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/ClassLibraryCore/TextBlockStyles.xaml
@@ -0,0 +1,8 @@
+
+
+
+
diff --git a/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/.vs/WPFSampleApplicationCore/DesignTimeBuild/.dtbcache.v2 b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/.vs/WPFSampleApplicationCore/DesignTimeBuild/.dtbcache.v2
new file mode 100644
index 00000000..1708aa10
Binary files /dev/null and b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/.vs/WPFSampleApplicationCore/DesignTimeBuild/.dtbcache.v2 differ
diff --git a/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/AssemblyInfo.cs b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/AssemblyInfo.cs
new file mode 100644
index 00000000..8b5504ec
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/AssemblyInfo.cs
@@ -0,0 +1,10 @@
+using System.Windows;
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
diff --git a/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/MainWindow.xaml b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/MainWindow.xaml
new file mode 100644
index 00000000..87ccb4ec
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/MainWindow.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
diff --git a/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/MainWindow.xaml.cs b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/MainWindow.xaml.cs
new file mode 100644
index 00000000..292bd10a
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/MainWindow.xaml.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Threading;
+using System.Windows;
+using System.Windows.Threading;
+
+namespace WPFSampleApplicationCore
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+
+ private void MainWindow_Loaded(object sender, RoutedEventArgs e)
+ {
+ Dispatcher.CurrentDispatcher.BeginInvoke((Action)delegate
+ {
+ Thread.Sleep(100);
+ Close();
+ });
+ }
+ }
+}
diff --git a/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/Program.cs b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/Program.cs
new file mode 100644
index 00000000..d6309bd0
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/Program.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Windows;
+
+namespace WPFSampleApplicationCore
+{
+ public class Program
+ {
+ [STAThread]
+ public static int Main()
+ {
+ try
+ {
+ new Application().Run(new MainWindow());
+ return 0;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ return 1;
+ }
+ }
+ }
+}
diff --git a/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/WPFSampleApplicationCore.csproj b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/WPFSampleApplicationCore.csproj
new file mode 100644
index 00000000..68656a74
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/WPFSampleApplicationCore.csproj
@@ -0,0 +1,21 @@
+
+
+
+ WinExe
+ netcoreapp3.1
+ true
+ true
+ false
+ true
+ test_sign_key.snk
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/test_sign_key.snk b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/test_sign_key.snk
new file mode 100644
index 00000000..781163bd
Binary files /dev/null and b/ILRepack.IntegrationTests/Scenarios/WPFSampleApplicationCore/test_sign_key.snk differ
diff --git a/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Form1.Designer.cs b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Form1.Designer.cs
new file mode 100644
index 00000000..c1c6b13f
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Form1.Designer.cs
@@ -0,0 +1,60 @@
+namespace WindowsFormsTestNetCoreApp
+{
+ partial class Form1
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ this.button1 = new System.Windows.Forms.Button();
+ this.SuspendLayout();
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(172, 108);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 0;
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(800, 450);
+ this.Controls.Add(this.button1);
+ this.Name = "Form1";
+ this.Text = "Form1";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button button1;
+ }
+}
+
diff --git a/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Form1.cs b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Form1.cs
new file mode 100644
index 00000000..795eac97
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Form1.cs
@@ -0,0 +1,33 @@
+using ClassLibrary;
+using System;
+using System.Windows.Forms;
+
+namespace WindowsFormsTestNetCoreApp
+{
+ public partial class Form1 : Form
+ {
+ public Form1()
+ {
+ InitializeComponent();
+
+ this.Load += Form_OnLoad;
+
+ button1.Image = Properties.Resources.checkbox_checked;
+ new DummyConverter();
+ }
+
+ private void Form_OnLoad(object sender, EventArgs e)
+ {
+ var timer = new Timer() { Enabled = true, Interval = 300 };
+ timer.Tick += delegate
+ {
+ this.Close();
+ };
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
diff --git a/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Form1.resx b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Form1.resx
new file mode 100644
index 00000000..f298a7be
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Form1.resx
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Program.cs b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Program.cs
new file mode 100644
index 00000000..3afbb10f
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Program.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Windows.Forms;
+
+namespace WindowsFormsTestNetCoreApp
+{
+ static class Program
+ {
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static int Main()
+ {
+ try
+ {
+ ///Application.SetHighDpiMode(HighDpiMode.SystemAware);
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Form1());
+ return 0;
+ }
+ catch (Exception)
+ {
+ return 1;
+ }
+ }
+ }
+}
diff --git a/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Properties/Resources.Designer.cs b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Properties/Resources.Designer.cs
new file mode 100644
index 00000000..0aae2a42
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Properties/Resources.Designer.cs
@@ -0,0 +1,73 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WindowsFormsTestNetCoreApp.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsFormsTestNetCoreApp.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap checkbox_checked {
+ get {
+ object obj = ResourceManager.GetObject("checkbox_checked", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Properties/Resources.resx b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Properties/Resources.resx
new file mode 100644
index 00000000..1f7a8c21
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Properties/Resources.resx
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+
+ ..\checkbox_checked.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
\ No newline at end of file
diff --git a/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Properties/launchSettings.json b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Properties/launchSettings.json
new file mode 100644
index 00000000..a0949f4e
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/Properties/launchSettings.json
@@ -0,0 +1,7 @@
+{
+ "profiles": {
+ "WindowsFormsTestNetApp": {
+ "commandName": "Project"
+ }
+ }
+}
\ No newline at end of file
diff --git a/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/WindowsFormsTestNetCoreApp.csproj b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/WindowsFormsTestNetCoreApp.csproj
new file mode 100644
index 00000000..541274b3
--- /dev/null
+++ b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/WindowsFormsTestNetCoreApp.csproj
@@ -0,0 +1,34 @@
+
+
+
+ WinExe
+ netcoreapp3.1
+ true
+ false
+ WindowsFormsTestNetCoreApp
+
+
+
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/checkbox_checked.png b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/checkbox_checked.png
new file mode 100644
index 00000000..7e94a586
Binary files /dev/null and b/ILRepack.IntegrationTests/Scenarios/WindowsFormsTestNetCoreApp/checkbox_checked.png differ
diff --git a/ILRepack.Tests/ILRepack.Tests.csproj b/ILRepack.Tests/ILRepack.Tests.csproj
index 0b279575..a46ec345 100644
--- a/ILRepack.Tests/ILRepack.Tests.csproj
+++ b/ILRepack.Tests/ILRepack.Tests.csproj
@@ -129,6 +129,15 @@
2.6.4
+
+ 2.6.4
+
+
+ 2.3.0
+
+
+ 2.0.0
+
\ No newline at end of file
diff --git a/ILRepack.sln b/ILRepack.sln
index 90d3b5b1..e62789bf 100755
--- a/ILRepack.sln
+++ b/ILRepack.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.27130.2036
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30611.23
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4547EE79-6D49-4318-B473-B5BBF73B434C}"
ProjectSection(SolutionItems) = preProject
@@ -48,6 +48,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNet462NetStandard2", "IL
{4A253A60-D998-4CA2-B9D5-46567A2FBF80} = {4A253A60-D998-4CA2-B9D5-46567A2FBF80}
EndProjectSection
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsFormsTestNetCoreApp", "ILRepack.IntegrationTests\Scenarios\WindowsFormsTestNetCoreApp\WindowsFormsTestNetCoreApp.csproj", "{87B1E249-BCFA-46DD-B4A1-39196A8594CF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibraryCore", "ILRepack.IntegrationTests\Scenarios\ClassLibraryCore\ClassLibraryCore.csproj", "{DE44D3FF-04A5-45DB-B562-CEA6901486DE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WPFSampleApplicationCore", "ILRepack.IntegrationTests\Scenarios\WPFSampleApplicationCore\WPFSampleApplicationCore.csproj", "{6851A974-AF84-4D10-B719-C4648BB50691}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_unix|Any CPU = Debug_unix|Any CPU
@@ -136,6 +142,24 @@ Global
{90F1C943-3C23-4091-B07F-0B34748AE056}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90F1C943-3C23-4091-B07F-0B34748AE056}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90F1C943-3C23-4091-B07F-0B34748AE056}.Release|Any CPU.Build.0 = Release|Any CPU
+ {87B1E249-BCFA-46DD-B4A1-39196A8594CF}.Debug_unix|Any CPU.ActiveCfg = Debug|Any CPU
+ {87B1E249-BCFA-46DD-B4A1-39196A8594CF}.Debug_unix|Any CPU.Build.0 = Debug|Any CPU
+ {87B1E249-BCFA-46DD-B4A1-39196A8594CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {87B1E249-BCFA-46DD-B4A1-39196A8594CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {87B1E249-BCFA-46DD-B4A1-39196A8594CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {87B1E249-BCFA-46DD-B4A1-39196A8594CF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DE44D3FF-04A5-45DB-B562-CEA6901486DE}.Debug_unix|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE44D3FF-04A5-45DB-B562-CEA6901486DE}.Debug_unix|Any CPU.Build.0 = Debug|Any CPU
+ {DE44D3FF-04A5-45DB-B562-CEA6901486DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE44D3FF-04A5-45DB-B562-CEA6901486DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DE44D3FF-04A5-45DB-B562-CEA6901486DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DE44D3FF-04A5-45DB-B562-CEA6901486DE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6851A974-AF84-4D10-B719-C4648BB50691}.Debug_unix|Any CPU.ActiveCfg = Debug|Any CPU
+ {6851A974-AF84-4D10-B719-C4648BB50691}.Debug_unix|Any CPU.Build.0 = Debug|Any CPU
+ {6851A974-AF84-4D10-B719-C4648BB50691}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6851A974-AF84-4D10-B719-C4648BB50691}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6851A974-AF84-4D10-B719-C4648BB50691}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6851A974-AF84-4D10-B719-C4648BB50691}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -150,6 +174,9 @@ Global
{6A827942-BEEF-4E49-A3A4-306E21428E85} = {04819B25-ABEA-46F7-90D5-149C8304F67F}
{EECC6459-78C6-4A08-9039-DE37E75866E6} = {04819B25-ABEA-46F7-90D5-149C8304F67F}
{90F1C943-3C23-4091-B07F-0B34748AE056} = {04819B25-ABEA-46F7-90D5-149C8304F67F}
+ {87B1E249-BCFA-46DD-B4A1-39196A8594CF} = {04819B25-ABEA-46F7-90D5-149C8304F67F}
+ {DE44D3FF-04A5-45DB-B562-CEA6901486DE} = {04819B25-ABEA-46F7-90D5-149C8304F67F}
+ {6851A974-AF84-4D10-B719-C4648BB50691} = {04819B25-ABEA-46F7-90D5-149C8304F67F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {54C7CB02-6231-428F-BBD0-113CC9852908}
diff --git a/ILRepack/ResReader.cs b/ILRepack/ResReader.cs
index bf06efcb..8471ef4d 100644
--- a/ILRepack/ResReader.cs
+++ b/ILRepack/ResReader.cs
@@ -187,6 +187,7 @@ public bool IsString
internal sealed class ResReader : IEnumerable, IDisposable
{
+ public string ReaderType { get; private set; }
private BinaryReader _store; // backing store we're reading from.
private readonly long _nameSectionOffset; // Offset to name section of file.
private readonly long _dataSectionOffset; // Offset to Data section of file.
@@ -226,7 +227,7 @@ public ResReader(Stream stream)
// Read in type name for a suitable ResourceReader
// Note ResourceWriter & InternalResGen use different Strings.
- String readerType = _store.ReadString();
+ ReaderType = _store.ReadString();
// Skip over type name for a suitable ResourceSet
SkipString();
diff --git a/ILRepack/Steps/ResourcesRepackStep.cs b/ILRepack/Steps/ResourcesRepackStep.cs
index 4331f772..f92f910d 100644
--- a/ILRepack/Steps/ResourcesRepackStep.cs
+++ b/ILRepack/Steps/ResourcesRepackStep.cs
@@ -257,9 +257,12 @@ private Resource FixResxResource(
MemoryStream stream = (MemoryStream)er.GetResourceStream();
var output = new MemoryStream((int)stream.Length);
var rw = new ResourceWriter(output);
+ var resourceBytes = stream.ToArray();
+ string readerType;
using (var rr = new ResReader(stream))
{
+ readerType = rr.ReaderType;
foreach (var res in rr)
{
foreach (var processor in resourcePrcessors)
@@ -275,6 +278,18 @@ private Resource FixResxResource(
rw.Generate();
output.Position = 0;
+
+ if (readerType.StartsWith("System.Resources.Extensions.DeserializingResourceReader"))
+ {
+ // Bugfix#277
+ // Default ResourceWriter creates incompatible resourses for NET Core WindowsForms applications
+ // because the new deserializer of type "System.Resources.Extensions.DeserializingResourceReader" is used there.
+ // Therefore unchanged original resourceBytes must be passed in EmbeddedResource constructor for an NET Core WindowsForms applications
+ // if the readerType is the new type "System.Resources.Extensions.DeserializingResourceReader"
+
+ return new EmbeddedResource(er.Name, er.Attributes, new MemoryStream(resourceBytes));
+ }
+
return new EmbeddedResource(er.Name, er.Attributes, output);
}