From 394ec508f6b0b8c2731448d49cafedaaded273b7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 27 May 2014 18:37:16 +0100 Subject: Make CompilerTest add same AssemblyResolver as XEngine to see if this solves the issue with different AppDomain BaseDirectory in local and Jenkins test runs --- .../Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs index 3647467..75b7244 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.IO; using System.CodeDom.Compiler; using System.Collections.Generic; @@ -67,7 +68,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests m_CSCodeProvider = new CSharpCodeProvider(); m_compilerParameters = new CompilerParameters(); - string rootPath = Path.Combine(Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory)); + string rootPath = System.AppDomain.CurrentDomain.BaseDirectory; + + System.AppDomain.CurrentDomain.AssemblyResolve += + new ResolveEventHandler( + AssemblyResolver.OnAssemblyResolve); + m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); -- cgit v1.1