aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs
index 75b7244..713b280 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs
@@ -49,6 +49,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
49 private CSharpCodeProvider m_CSCodeProvider; 49 private CSharpCodeProvider m_CSCodeProvider;
50 private CompilerParameters m_compilerParameters; 50 private CompilerParameters m_compilerParameters;
51 private CompilerResults m_compilerResults; 51 private CompilerResults m_compilerResults;
52 private ResolveEventHandler m_resolveEventHandler;
52 53
53 /// <summary> 54 /// <summary>
54 /// Creates a temporary directory where build artifacts are stored. 55 /// Creates a temporary directory where build artifacts are stored.
@@ -70,10 +71,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
70 71
71 string rootPath = System.AppDomain.CurrentDomain.BaseDirectory; 72 string rootPath = System.AppDomain.CurrentDomain.BaseDirectory;
72 73
73 System.AppDomain.CurrentDomain.AssemblyResolve += 74 m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve);
74 new ResolveEventHandler(
75 AssemblyResolver.OnAssemblyResolve);
76 75
76 System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler;
77
77 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); 78 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll"));
78 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); 79 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll"));
79 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); 80 m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll"));
@@ -87,6 +88,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests
87 [TestFixtureTearDown] 88 [TestFixtureTearDown]
88 public void CleanUp() 89 public void CleanUp()
89 { 90 {
91 System.AppDomain.CurrentDomain.AssemblyResolve -= m_resolveEventHandler;
92
90 if (Directory.Exists(m_testDir)) 93 if (Directory.Exists(m_testDir))
91 { 94 {
92 // Blow away the temporary directory with artifacts. 95 // Blow away the temporary directory with artifacts.