Fix symbol file & exceptions on startup in CLI

This commit is contained in:
Starbeamrainbowlabs 2017-10-22 11:31:43 +01:00
vanhempi a8e4ee02f6
commit e587075ea8
4 muutettua tiedostoa jossa 7 lisäystä ja 5 poistoa

Näytä tiedosto

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

Näytä tiedosto

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

Näytä tiedosto

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

Näytä tiedosto

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