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