diff --git a/.gitignore b/.gitignore
index ac252c9..eeda78e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,4 +19,6 @@ obj.Net4/
*.pdb
*.xml
-*.zip
\ No newline at end of file
+*.zip
+
+publish/
\ No newline at end of file
diff --git a/DependencyWalker.Net.Cli/DependencyWalker.Net5.Cli.csproj b/DependencyWalker.Net.Cli/DependencyWalker.Cli.csproj
similarity index 64%
rename from DependencyWalker.Net.Cli/DependencyWalker.Net5.Cli.csproj
rename to DependencyWalker.Net.Cli/DependencyWalker.Cli.csproj
index 2c6c4e4..d3772f4 100644
--- a/DependencyWalker.Net.Cli/DependencyWalker.Net5.Cli.csproj
+++ b/DependencyWalker.Net.Cli/DependencyWalker.Cli.csproj
@@ -1,17 +1,18 @@
-
-
-
- Exe
- net5.0
- DependencyWalker.Cli
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ Exe
+ net472;net7.0
+ win10-x64
+ LatestMajor
+
+
+
+
+
+
+
+
+
+
+
diff --git a/DependencyWalker.Net.Cli/DependencyWalker.Net.Cli.csproj b/DependencyWalker.Net.Cli/DependencyWalker.Net.Cli.csproj
deleted file mode 100644
index 44de4b5..0000000
--- a/DependencyWalker.Net.Cli/DependencyWalker.Net.Cli.csproj
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {8AAE0BB7-BD7C-46A3-977D-D4964271DC32}
- Exe
- Properties
- SindaSoft.DependencyWalker
- DependencyWalker.Cli
- v4.0
-
-
- 512
- False
- False
- False
- obj.Net4\$(Configuration)\
-
-
- x86
- true
- Full
- False
- bin.Net4\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- x86
- PdbOnly
- True
- bin.Net4\Release\
- TRACE
- prompt
- 4
-
-
- False
- obj.Net4\
-
-
- 4194304
- False
- Auto
-
-
- False
- obj.Net4\
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DependencyWalker.Net.Cli/Worker.cs.bak b/DependencyWalker.Net.Cli/Worker.cs.bak
deleted file mode 100644
index a7209e0..0000000
--- a/DependencyWalker.Net.Cli/Worker.cs.bak
+++ /dev/null
@@ -1,406 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Reflection;
-using System.IO;
-using System.Diagnostics;
-
-namespace SindaSoft.DependencyWalker
-{
- public class Worker : IDisposable
- {
- public bool json = false;
- public bool gac = false;
-
- public Worker()
- {
- AppDomain currentDomain = AppDomain.CurrentDomain;
- currentDomain.AssemblyResolve += new ResolveEventHandler(currentDomain_AssemblyResolve);
- }
-
- #region IDisposable Members
-
- public void Dispose()
- {
- AppDomain currentDomain = AppDomain.CurrentDomain;
- currentDomain.AssemblyResolve -= new ResolveEventHandler(currentDomain_AssemblyResolve);
- }
-
- #endregion
-
- public string currentFilenameWeCheck = null;
-
- Assembly currentDomain_AssemblyResolve(object sender, ResolveEventArgs e)
- {
- string assemblyPath;
- if (currentFilenameWeCheck != null)
- assemblyPath = Path.Combine(Path.GetDirectoryName(currentFilenameWeCheck), new AssemblyName(e.Name).Name + ".dll");
- else
- assemblyPath = new AssemblyName(e.Name).Name + ".dll";
-
- if (!File.Exists(assemblyPath))
- return null;
- Assembly assembly = Assembly.LoadFrom(assemblyPath);
- return assembly;
- }
-
- public void Start(string[] args)
- {
- if (args.Length == 1)
- {
- string path = args[0];
-
- if (File.Exists(path)) // Is it a file ??!
- this.StartWithFile(path);
- else if (Directory.Exists(path)) // Is it a directory ??!
- this.StartWithDirectory(path);
- }
- else if (args.Length == 0)
- {
- string path = Directory.GetCurrentDirectory();
- this.StartWithDirectory(path);
- }
- }
-
- public void StartWithDirectory(string path)
- {
- List files = Directory.GetFiles(path, "*.dll").ToList();
- files.AddRange(Directory.GetFiles(path, "*.exe").ToList());
- files.Sort();
-
- if (this.json)
- {
- List ais = new List();
- foreach (string fn in files)
- ais.Add(inspectAssembly(fn));
-
- Console.WriteLine(QuickJsonSerializer.Serialize(ais));
- }
- else
- {
- foreach (string fn in files)
- {
- AssemblyInfo ai = inspectAssembly(fn);
- string line = ai.ToString();
- Console.WriteLine(line);
- }
- }
- }
-
- public void StartWithFile(string filename)
- {
- AssemblyInfo ai = inspectAssembly(filename);
-
- if (this.json)
- Console.WriteLine( QuickJsonSerializer.Serialize(ai) );
- else
- Console.WriteLine(ai.ToString());
-
- }
-
-#if false
- public string GetLine4Print(string filename)
- {
- string retval = null;
- currentFilenameWeCheck = filename;
- try
- {
- Assembly a = Assembly.LoadFile(filename);
- AssemblyName an = a.GetName();
-
-
- FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(a.Location);
- string file_version = fvi.FileVersion;
-
- string net_version = ".NET CLR " + a.ImageRuntimeVersion;
- string architecture = an.ProcessorArchitecture.ToString();
- string expNrOfTypes = "";
- string expError = "";
- List expTypes = null;
-
- try
- {
- Type[] ttt = a.GetExportedTypes().OrderBy(x => x.Name).ToArray();
- expNrOfTypes = ttt.Length.ToString();
- expTypes = ttt.Select(x => x.Name).ToList();
- }
- catch (Exception ex)
- {
- expNrOfTypes = null;
- expError = ex.Message;
- }
-
- try
- {
- // This work only for .NET > 4
- var attribute = a.GetCustomAttributes(true)
- .OfType()
- .First();
- net_version = attribute.FrameworkDisplayName.Trim();
- }
- catch
- {
- }
-
- retval = String.Format("{0, -40} {1,-10} {2,-20}", an.Name, architecture, net_version);
- //retval += String.Format(" {0,-20}", file_version);
- if (fullInfo == 1)
- {
- retval += String.Format(" {0}", expNrOfTypes ?? expError);
- }
- else if (fullInfo == 2)
- {
- if (expTypes != null)
- {
- retval += "\n";
- foreach (string t in expTypes)
- retval += "\t" + t + "\n";
- retval = retval.TrimEnd();
- }
- else
- retval += String.Format(" {0}", expError);
- }
- }
- catch (BadImageFormatException ex)
- {
- retval = null;
- }
- catch (Exception ex)
- {
- retval = String.Format("{0, -40} {1}", Path.GetFileName(filename), "Error loading - " + ex.Message);
- }
- return retval;
- }
-#endif
-
- private List alreadyProcessed;
- ///
- /// Load assembly specified with filename and
- /// walk through its dependencies
- ///
- ///
- private AssemblyInfo inspectAssembly(string aname)
- {
- string name = aname;
- AssemblyInfo retval = new AssemblyInfo();
- alreadyProcessed = new List();
- try
- {
- Assembly a = Assembly.LoadFrom(aname);
- name = a.GetName().Name;
- retval.FillData(a);
-
- AssemblyName[] anames = a.GetReferencedAssemblies();
- foreach (AssemblyName an in anames)
- {
- if (!shouldWeIncludeIt(an))
- continue;
-
- AssemblyInfo ai = new AssemblyInfo();
- ai.Name = an.Name;
- retval.References.Add(ai);
-
- if (!alreadyProcessed.Contains(an.Name))
- {
- alreadyProcessed.Add(an.Name);
- inspectAssembly(ai, an);
- }
- else
- {
- //if (!isItInGlobalAssemblyCache(an))
- // CloneNodes(ref2node[an.Name], tn2);
- }
- }
- return retval;
- }
- catch (Exception ex)
- {
- AssemblyInfo ai = new AssemblyInfo();
- ai.Name = name;
- ai.Error = ex.Message;
- return ai;
- }
- }
-
- ///
- /// Load assembly specified with assembly name and
- /// walk through its dependencies
- ///
- ///
- ///
- private void inspectAssembly(AssemblyInfo tn, AssemblyName anr)
- {
- string name = "";
- try
- {
- name = anr.Name;
- Assembly a = Assembly.Load(anr.FullName);
- tn.FillData(a);
-
- //refass2filename[anr.Name] = a.CodeBase; // Save assembly file location...
- //refass2isGAC[anr.Name] = a.GlobalAssemblyCache; // Is it GAC ?
- //refass2dotnetversion[anr.Name] = ".NET CLR " + a.ImageRuntimeVersion;
- /*
- try
- {
- // This work only for .NET > 4
- var attribute = a.GetCustomAttributes(true)
- .OfType()
- .First();
-
- refass2dotnetversion[anr.Name] = attribute.FrameworkDisplayName;
- }
- catch
- {
- }
- */
- AssemblyName[] anames = a.GetReferencedAssemblies();
- foreach (AssemblyName an in anames)
- {
- if (!shouldWeIncludeIt(an))
- continue;
-
- AssemblyInfo tn2 = new AssemblyInfo();
- tn2.Name = an.Name;
-
- if (!alreadyProcessed.Contains(an.Name))
- {
- alreadyProcessed.Add(an.Name);
- inspectAssembly(tn2, an); // Go deeply ....
- }
- }
- }
- catch (Exception ex)
- {
- AssemblyInfo ai = new AssemblyInfo();
- ai.Name = name;
- ai.Error = ex.Message;
- }
- }
-
- private bool shouldWeIncludeIt(AssemblyName an)
- {
- if (this.gac)
- return true;
- else
- return !isItInGlobalAssemblyCache(an);
- }
-
- private bool isItInGlobalAssemblyCache(AssemblyName an)
- {
-#if NETCOREAPP
- return true; // No GAC in .NET Core
-#else
- try
- {
- Assembly a = Assembly.Load(an.FullName);
-
- System.Diagnostics.Debug.WriteLine(an.Name + " ---> " + (a.GlobalAssemblyCache ? "GAC" : ""));
- return a.GlobalAssemblyCache;
- }
- catch
- {
- return false; // Error ?! .. pass it ..
- }
-#endif
- }
- }
-
- public class AssemblyInfo
- {
- public string Name { get; set; }
- public string Version { get; set; }
- public string Architecture { get; set; }
- public string DotNetVersion { get; set; }
-
- public bool IsGAC { get; set; }
-
- public string FileUri { get; set; }
- public List References { get; set; }
-
- public string Error { get; set; }
-
- public AssemblyInfo()
- {
- References = new List();
- }
-
- public AssemblyInfo(Assembly a) : this()
- {
- this.FillData(a);
- }
-
- public void FillData(Assembly a)
- {
- FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(a.Location);
- this.Version = fvi.FileVersion;
- this.DotNetVersion = ".NET CLR " + a.ImageRuntimeVersion;
- this.Architecture = a.GetName().ProcessorArchitecture.ToString();
- this.Name = a.GetName().Name;
-
- this.FileUri = a.CodeBase; // Save assembly file location...
- this.IsGAC = a.GlobalAssemblyCache; // Is it GAC ?
-
- try
- {
- // This work only for .NET > 4 .. Try it...
- var attribute = a.GetCustomAttributes(true)
- .OfType()
- .First();
- this.DotNetVersion = attribute.FrameworkDisplayName.Trim();
- }
- catch
- {
- }
- }
-
-
- public string ToString(int ident)
- {
- string retval = null;
- string identS = new string(' ', ident * 25);
-
- if (String.IsNullOrEmpty(this.Error))
- {
- retval = identS + String.Format("{0, -10}\n", this.Name);
- retval += identS + String.Format("{0, -10} File Version: {1,-10}\n", "", this.Version);
- retval += identS + String.Format("{0, -10} Architecture: {1,-10}\n", "", this.Architecture);
- retval += identS + String.Format("{0, -10} Built for: {1,-10}\n", "", this.DotNetVersion);
-#if false
- retval += String.Format("{0, -30} [\n", "");
- List refs = new List();
- foreach (AssemblyInfo ai in this.References)
- refs.Add(ai.ToString());
-
- string s = String.Join(",\n", refs.ToArray());
- string[] lines = s.Split('\n');
- lines = lines.Select(x => (new String(' ', 30)) + x).ToArray();
- retval += String.Join("\n", lines) + "\n";
- retval += String.Format("{0, -30} ]\n", "");
-#else
- retval += identS + String.Format("{0, -10} References: [ ", "");
- List refs = new List();
- foreach (AssemblyInfo ai in this.References)
- refs.Add(ai.Name);
- retval += String.Join(",", refs.ToArray());
- retval += String.Format(" ]\n");
-
- foreach (AssemblyInfo ai in this.References)
- retval += ai.ToString(ident + 1);
-
-#endif
- }
- else
- retval = identS + String.Format("{0, -10}\n{1, -10} Error: {2}\n", this.Name, "", this.Error);
- return retval;
- }
-
- public override string ToString()
- {
- return this.ToString(0);
- }
-
-
- }
-}
diff --git a/DependencyWalker.Net.sln b/DependencyWalker.Net.sln
index 57ad72b..994c5f7 100644
--- a/DependencyWalker.Net.sln
+++ b/DependencyWalker.Net.sln
@@ -1,9 +1,11 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DependencyWalker.Net", "DependencyWalker\DependencyWalker.Net.csproj", "{2249E403-BFED-4144-8196-6E833B81BC7A}"
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31903.59
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependencyWalker", "DependencyWalker\DependencyWalker.csproj", "{EFBC4A3F-5FA8-45A8-91C3-EC836C9F49AD}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DependencyWalker.Net.Cli", "DependencyWalker.Net.Cli\DependencyWalker.Net.Cli.csproj", "{8AAE0BB7-BD7C-46A3-977D-D4964271DC32}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependencyWalker.Cli", "DependencyWalker.Net.Cli\DependencyWalker.Cli.csproj", "{4194628B-B3C2-4DC7-B686-2F23FB8A4C20}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,16 +13,19 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2249E403-BFED-4144-8196-6E833B81BC7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2249E403-BFED-4144-8196-6E833B81BC7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2249E403-BFED-4144-8196-6E833B81BC7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2249E403-BFED-4144-8196-6E833B81BC7A}.Release|Any CPU.Build.0 = Release|Any CPU
- {8AAE0BB7-BD7C-46A3-977D-D4964271DC32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8AAE0BB7-BD7C-46A3-977D-D4964271DC32}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8AAE0BB7-BD7C-46A3-977D-D4964271DC32}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8AAE0BB7-BD7C-46A3-977D-D4964271DC32}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EFBC4A3F-5FA8-45A8-91C3-EC836C9F49AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EFBC4A3F-5FA8-45A8-91C3-EC836C9F49AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EFBC4A3F-5FA8-45A8-91C3-EC836C9F49AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EFBC4A3F-5FA8-45A8-91C3-EC836C9F49AD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4194628B-B3C2-4DC7-B686-2F23FB8A4C20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4194628B-B3C2-4DC7-B686-2F23FB8A4C20}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4194628B-B3C2-4DC7-B686-2F23FB8A4C20}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4194628B-B3C2-4DC7-B686-2F23FB8A4C20}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {1A01B617-FBCD-48E0-9F59-F02E2557AAB7}
+ EndGlobalSection
EndGlobal
diff --git a/DependencyWalker.Net5.sln b/DependencyWalker.Net5.sln
deleted file mode 100644
index f15a8fd..0000000
--- a/DependencyWalker.Net5.sln
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30804.86
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependencyWalker.Net5", "DependencyWalker\DependencyWalker.Net5.csproj", "{846ED2DD-88A4-4DD6-926A-C0263E35A4A6}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DependencyWalker.Net5.Cli", "DependencyWalker.Net.Cli\DependencyWalker.Net5.Cli.csproj", "{4BFCCAE9-0F7D-4AC5-956D-57346837B415}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {846ED2DD-88A4-4DD6-926A-C0263E35A4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {846ED2DD-88A4-4DD6-926A-C0263E35A4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {846ED2DD-88A4-4DD6-926A-C0263E35A4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {846ED2DD-88A4-4DD6-926A-C0263E35A4A6}.Release|Any CPU.Build.0 = Release|Any CPU
- {4BFCCAE9-0F7D-4AC5-956D-57346837B415}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4BFCCAE9-0F7D-4AC5-956D-57346837B415}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4BFCCAE9-0F7D-4AC5-956D-57346837B415}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4BFCCAE9-0F7D-4AC5-956D-57346837B415}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {77C8F706-092E-4113-80D7-F11EF8310563}
- EndGlobalSection
-EndGlobal
diff --git a/DependencyWalker/DependencyWalker.Net.csproj b/DependencyWalker/DependencyWalker.Net.csproj
deleted file mode 100644
index 064705d..0000000
--- a/DependencyWalker/DependencyWalker.Net.csproj
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {2249E403-BFED-4144-8196-6E833B81BC7A}
- WinExe
- Properties
- SindaSoft.DependencyWalker
- DependencyWalker
- v4.0
-
-
- 512
- False
- False
- False
- Full
- obj.Net4\$(Configuration)\
- 4
-
-
- true
- prompt
- bin.Net4\Debug\
- AnyCPU
-
-
- prompt
- bin.Net4\Release\
-
-
- dw.ico
-
-
- TRACE
- True
- False
- obj.Net4\
-
-
- False
- False
- obj.Net4\
-
-
- 4194304
- AnyCPU
- False
- Auto
-
-
- x86
-
-
- bin.Net4\Debug\
-
-
- bin.Net4\Release\
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Form
-
-
- MainWindow.cs
-
-
-
-
-
- MainWindow.cs
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
- Designer
-
-
- True
- Resources.resx
- True
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
- True
- Settings.settings
- True
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/DependencyWalker/DependencyWalker.Net.sln b/DependencyWalker/DependencyWalker.Net.sln
deleted file mode 100644
index 7fb8b08..0000000
--- a/DependencyWalker/DependencyWalker.Net.sln
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-# SharpDevelop 5.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DependencyWalker.Net", "DependencyWalker.Net.csproj", "{2249E403-BFED-4144-8196-6E833B81BC7A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2249E403-BFED-4144-8196-6E833B81BC7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2249E403-BFED-4144-8196-6E833B81BC7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2249E403-BFED-4144-8196-6E833B81BC7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2249E403-BFED-4144-8196-6E833B81BC7A}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
-EndGlobal
diff --git a/DependencyWalker/DependencyWalker.Net5.csproj b/DependencyWalker/DependencyWalker.csproj
similarity index 84%
rename from DependencyWalker/DependencyWalker.Net5.csproj
rename to DependencyWalker/DependencyWalker.csproj
index 94b20af..1aad708 100644
--- a/DependencyWalker/DependencyWalker.Net5.csproj
+++ b/DependencyWalker/DependencyWalker.csproj
@@ -1,17 +1,17 @@
- net5.0-windows
- x86
+ net472;net7.0-windows
+ win10-x64
WinExe
SindaSoft.DependencyWalker
- DependencyWalker
false
true
+ LatestMajor
dw.ico
-
+
@@ -51,5 +51,6 @@
+
\ No newline at end of file
diff --git a/DependencyWalker/Properties/Resources.Designer.cs b/DependencyWalker/Properties/Resources.Designer.cs
index 4565e45..b34f71d 100644
--- a/DependencyWalker/Properties/Resources.Designer.cs
+++ b/DependencyWalker/Properties/Resources.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.34209
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -19,7 +19,7 @@ namespace SindaSoft.DependencyWalker.Properties {
// 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", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
diff --git a/DependencyWalker/Properties/Settings.Designer.cs b/DependencyWalker/Properties/Settings.Designer.cs
index 58755b3..4cdefcc 100644
--- a/DependencyWalker/Properties/Settings.Designer.cs
+++ b/DependencyWalker/Properties/Settings.Designer.cs
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.34209
+// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,7 +12,7 @@ namespace SindaSoft.DependencyWalker.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
diff --git a/global.json b/global.json
new file mode 100644
index 0000000..8f34166
--- /dev/null
+++ b/global.json
@@ -0,0 +1,6 @@
+{
+ "sdk": {
+ "rollForward": "latestMinor",
+ "version": "7.0.100"
+ }
+}
\ No newline at end of file
diff --git a/publishScript.ps1 b/publishScript.ps1
new file mode 100644
index 0000000..243a242
--- /dev/null
+++ b/publishScript.ps1
@@ -0,0 +1,31 @@
+$errorActionPreference = 'Stop'
+
+Get-ChildItem $PSScriptRoot -Recurse -Force
+| Where-Object { $_.FullName -like "*\bin\*" }
+| Remove-Item -Recurse -Force
+
+Get-Item -ErrorAction Ignore $PSScriptRoot\publish
+| Remove-Item -Recurse -Force
+
+
+dotnet publish ./DependencyWalker --framework net7.0-windows --configuration Release --self-contained false
+if (0 -ne $LASTEXITCODE) { throw "Publish failed." }
+
+dotnet publish ./DependencyWalker.Net.Cli --framework net7.0 --configuration Release --self-contained false
+if (0 -ne $LASTEXITCODE) { throw "Publish failed." }
+
+dotnet publish ./DependencyWalker --framework net472 --configuration Release /p:GenerateResourceUsePreserializedResources=true
+if (0 -ne $LASTEXITCODE) { throw "Publish failed." }
+
+dotnet publish ./DependencyWalker.Net.Cli --framework net472 --configuration Release
+if (0 -ne $LASTEXITCODE) { throw "Publish failed." }
+
+# Include CLI in the app package, so user gets both.
+Copy-Item $PSScriptRoot\DependencyWalker.Net.Cli\bin\Release\net7.0\win10-x64\publish\ $PSScriptRoot\DependencyWalker\bin\Release\net7.0-windows\win10-x64\publish\
+Copy-Item $PSScriptRoot\DependencyWalker.Net.Cli\bin\Release\net472\win10-x64\publish\ $PSScriptRoot\DependencyWalker\bin\Release\net472\win10-x64\publish\
+
+New-Item -ItemType Directory -Path $PSScriptRoot\publish\ | Out-Null
+Compress-Archive -Path $PSScriptRoot\DependencyWalker\bin\Release\net7.0-windows\win10-x64\publish\* -DestinationPath $PSScriptRoot\publish\DependencyWalker.NetCore.zip
+Compress-Archive -Path $PSScriptRoot\DependencyWalker.Net.Cli\bin\Release\net7.0\win10-x64\publish\* -DestinationPath $PSScriptRoot\publish\DependencyWalker.Cli.NetCore.zip
+Compress-Archive -Path $PSScriptRoot\DependencyWalker\bin\Release\net472\win10-x64\publish\* -DestinationPath $PSScriptRoot\publish\DependencyWalker.zip
+Compress-Archive -Path $PSScriptRoot\DependencyWalker.Net.Cli\bin\Release\net472\win10-x64\publish\* -DestinationPath $PSScriptRoot\publish\DependencyWalker.Cli.zip
\ No newline at end of file