Fix symbol file & exceptions on startup in CLI

This commit is contained in:
Starbeamrainbowlabs 2017-10-22 11:31:43 +01:00
부모 a8e4ee02f6
커밋 e587075ea8
4개의 변경된 파일7개의 추가작업 그리고 5개의 파일을 삭제

파일 보기

@ -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>

파일 보기

@ -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>

파일 보기

@ -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>

파일 보기

@ -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();