1
0
mirror of synced 2024-11-30 18:24:39 +01:00

Fix build problem

Fix trying to access field in a string.
Changed Toolbox references to automatically build dependencies (Toolbox_Library, File_Format_Library) to resepective output folder
This commit is contained in:
José Guadalupe Nava Zavala 2020-05-02 03:27:08 -05:00
parent 317c18a570
commit dce06db362
3 changed files with 14 additions and 7 deletions

View File

@ -91,8 +91,15 @@ namespace Toolbox.Library
ICollection<IPlugin> plugins = new List<IPlugin>(pluginTypes.Count); ICollection<IPlugin> plugins = new List<IPlugin>(pluginTypes.Count);
foreach (Type type in pluginTypes) foreach (Type type in pluginTypes)
{ {
IPlugin plugin = (IPlugin)Activator.CreateInstance(type); try
plugins.Add(plugin); {
IPlugin plugin = (IPlugin)Activator.CreateInstance(type);
plugins.Add(plugin);
}
catch (Exception ex)
{
Console.Error.WriteLine("Couldn't Load {0} Reason:{1}", type, ex.Message);
}
} }
assemblies.Clear(); assemblies.Clear();
pluginTypes.Clear(); pluginTypes.Clear();

View File

@ -1401,7 +1401,7 @@ namespace Toolbox
} }
catch (Exception ex) catch (Exception ex)
{ {
failedFiles.Add($"{file.Filename} \n Error:\n {ex} \n"); failedFiles.Add($"{file} \n Error:\n {ex} \n");
} }
SearchFileFormat(form.BatchSettings, fileFormat, extension, outputFolder, ExportMode.Models); SearchFileFormat(form.BatchSettings, fileFormat, extension, outputFolder, ExportMode.Models);
@ -1448,7 +1448,7 @@ namespace Toolbox
} }
catch (Exception ex) catch (Exception ex)
{ {
failedFiles.Add($"{file.Filename} \n Error:\n {ex} \n"); failedFiles.Add($"{file} \n Error:\n {ex} \n");
} }
SearchFileFormat(form.BatchSettings, fileFormat, extension, outputFolder, ExportMode.Textures); SearchFileFormat(form.BatchSettings, fileFormat, extension, outputFolder, ExportMode.Textures);

View File

@ -367,9 +367,9 @@
<None Include="App.config" /> <None Include="App.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\BrawlboxHelper\BrawlboxHelper.csproj"> <ProjectReference Include="..\File_Format_Library\File_Format_Library.csproj">
<Project>{fa690685-3370-44d5-b138-f538c8d4c2a3}</Project> <Project>{a11705cf-a6a3-41c3-875a-e1cfd8080f09}</Project>
<Name>BrawlboxHelper</Name> <Name>File_Format_Library</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\Switch_Toolbox_Library\Toolbox_Library.csproj"> <ProjectReference Include="..\Switch_Toolbox_Library\Toolbox_Library.csproj">
<Project>{96820047-2a39-4e5a-bfa4-e84fff5c66cf}</Project> <Project>{96820047-2a39-4e5a-bfa4-e84fff5c66cf}</Project>