From 889cadb8aa502f1f729b50b4a585a13a35eae2d3 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Tue, 27 Jul 2010 23:21:59 -0500 Subject: [PATCH] Fix mod_managed dynamic compile for V4 Framework --- .../mod_managed/managed/FreeSWITCH.Managed.2010.csproj | 4 ++-- .../languages/mod_managed/managed/ScriptPluginManager.cs | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mod/languages/mod_managed/managed/FreeSWITCH.Managed.2010.csproj b/src/mod/languages/mod_managed/managed/FreeSWITCH.Managed.2010.csproj index 3e9d2519db..740ae04cff 100644 --- a/src/mod/languages/mod_managed/managed/FreeSWITCH.Managed.2010.csproj +++ b/src/mod/languages/mod_managed/managed/FreeSWITCH.Managed.2010.csproj @@ -25,7 +25,7 @@ full false ..\..\..\..\..\managed\debug\ - DEBUG;TRACE + TRACE;DEBUG;CLR_VERSION40 prompt 4 @@ -33,7 +33,7 @@ pdbonly true ..\..\..\..\..\managed\release\ - TRACE + TRACE;CLR_VERSION40 prompt 4 diff --git a/src/mod/languages/mod_managed/managed/ScriptPluginManager.cs b/src/mod/languages/mod_managed/managed/ScriptPluginManager.cs index ad8e3a11e6..754541a8f2 100644 --- a/src/mod/languages/mod_managed/managed/ScriptPluginManager.cs +++ b/src/mod/languages/mod_managed/managed/ScriptPluginManager.cs @@ -110,10 +110,18 @@ namespace FreeSWITCH { cdp = CodeDomProvider.CreateProvider("f#"); break; case ".csx": +#if (CLR_VERSION40) + cdp = new Microsoft.CSharp.CSharpCodeProvider(new Dictionary { { "CompilerVersion", "v4.0" } }); +#else cdp = new Microsoft.CSharp.CSharpCodeProvider(new Dictionary { { "CompilerVersion", "v3.5" } }); +#endif break; case ".vbx": +#if (CLR_VERSION40) + cdp = new Microsoft.VisualBasic.VBCodeProvider(new Dictionary { { "CompilerVersion", "v4.0" } }); +#else cdp = new Microsoft.VisualBasic.VBCodeProvider(new Dictionary { { "CompilerVersion", "v3.5" } }); +#endif break; case ".jsx": // Have to figure out better JS support