Browse Source

Fix symbol file & exceptions on startup in CLI

Starbeamrainbowlabs 1 year ago
parent
commit
e587075ea8

+ 2
- 2
SpritePacker-CLI/SpritePacker-CLI.csproj View File

@@ -6,8 +6,8 @@
6 6
     <ProjectGuid>{6EF47B64-1920-4827-BEEF-B262D5A2D214}</ProjectGuid>
7 7
     <OutputType>Exe</OutputType>
8 8
     <RootNamespace>SpritePacker</RootNamespace>
9
-    <AssemblyName>SpritePacker</AssemblyName>
10
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
9
+    <AssemblyName>SpritePackerCLI</AssemblyName>
10
+    <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
11 11
   </PropertyGroup>
12 12
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
13 13
     <DebugSymbols>true</DebugSymbols>

+ 1
- 1
SpritePacker-GUI/SpritePacker-GUI.csproj View File

@@ -7,7 +7,7 @@
7 7
     <OutputType>Exe</OutputType>
8 8
     <RootNamespace>SpritePacker.GUI</RootNamespace>
9 9
     <AssemblyName>SpritePacker-GUI</AssemblyName>
10
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
10
+    <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
11 11
   </PropertyGroup>
12 12
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
13 13
     <DebugSymbols>true</DebugSymbols>

+ 1
- 1
SpritePacker/SpritePacker.csproj View File

@@ -7,7 +7,7 @@
7 7
     <OutputType>Library</OutputType>
8 8
     <RootNamespace>SpritePacker</RootNamespace>
9 9
     <AssemblyName>SpritePacker</AssemblyName>
10
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
10
+    <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
11 11
   </PropertyGroup>
12 12
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
13 13
     <DebugSymbols>true</DebugSymbols>

+ 3
- 1
SpritePacker/Utilities.cs View File

@@ -21,8 +21,10 @@ namespace SpritePacker
21 21
 
22 22
 		public static string GetEmbeddedResourceContent(string resourceName)
23 23
 		{
24
-			Assembly asm = Assembly.GetExecutingAssembly();
24
+			Assembly asm = Assembly.GetCallingAssembly();
25 25
 			Stream stream = asm.GetManifestResourceStream(resourceName);
26
+			if(stream == null)
27
+				throw new FileNotFoundException($"Error: The embedded resource with the name {resourceName} does not appear to exist.");
26 28
 			StreamReader source = new StreamReader(stream);
27 29
 			string fileContent = source.ReadToEnd();
28 30
 			source.Dispose();

Loading…
Cancel
Save