mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
(CompilePlugins): add referenced assemblies.
This commit is contained in:
parent
cb32888ffd
commit
d33d84ecf9
@ -29,11 +29,11 @@ using System.ComponentModel.Composition;
|
|||||||
using System.ComponentModel.Composition.Hosting;
|
using System.ComponentModel.Composition.Hosting;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using GameRes.Collections;
|
|
||||||
using System.Runtime.Serialization.Formatters.Binary;
|
|
||||||
using Microsoft.CSharp;
|
|
||||||
using System.Text;
|
|
||||||
using System.CodeDom.Compiler;
|
using System.CodeDom.Compiler;
|
||||||
|
using System.Runtime.Serialization.Formatters.Binary;
|
||||||
|
using System.Text;
|
||||||
|
using Microsoft.CSharp;
|
||||||
|
using GameRes.Collections;
|
||||||
|
|
||||||
namespace GameRes
|
namespace GameRes
|
||||||
{
|
{
|
||||||
@ -245,6 +245,12 @@ namespace GameRes
|
|||||||
}
|
}
|
||||||
var provider = new CSharpCodeProvider();
|
var provider = new CSharpCodeProvider();
|
||||||
var parameters = new CompilerParameters { OutputAssembly = target };
|
var parameters = new CompilerParameters { OutputAssembly = target };
|
||||||
|
#if DEBUG
|
||||||
|
parameters.IncludeDebugInformation = true;
|
||||||
|
#endif
|
||||||
|
parameters.ReferencedAssemblies.Add ("System.dll");
|
||||||
|
parameters.ReferencedAssemblies.Add ("System.ComponentModel.Composition.dll");
|
||||||
|
parameters.ReferencedAssemblies.Add (System.Reflection.Assembly.GetExecutingAssembly().Location);
|
||||||
var source = files.Select (f => f.FullName).ToArray();
|
var source = files.Select (f => f.FullName).ToArray();
|
||||||
var results = provider.CompileAssemblyFromFile (parameters, source);
|
var results = provider.CompileAssemblyFromFile (parameters, source);
|
||||||
if (results.Errors.HasErrors)
|
if (results.Errors.HasErrors)
|
||||||
|
Loading…
Reference in New Issue
Block a user