#18619: Removing Compiler option for Medium Trust

Work Item: 18619

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-05-02 10:32:11 -07:00
parent 75ab94816d
commit 01caf36547

View File

@@ -10,10 +10,10 @@ namespace Orchard.Environment.Extensions.Compilers {
_codeCompilerType = GetDefaultCompilerTypeForLanguage("C#");
// define a precompilation flag so that module can adapt for older version
var orchardVersion = new AssemblyName(typeof (IDependency).Assembly.FullName).Version;
_codeCompilerType.CompilerParameters.CompilerOptions += string.Format("/define:ORCHARD_{0}_{1}", orchardVersion.Major, orchardVersion.Minor) ;
// NOTE: This code could be used to define a compilation flag with the current Orchar version
// but it's not compatible with Medium Trust
// var orchardVersion = new AssemblyName(typeof(IDependency).Assembly.FullName).Version;
// _codeCompilerType.CompilerParameters.CompilerOptions += string.Format("/define:ORCHARD_{0}_{1}", orchardVersion.Major, orchardVersion.Minor);
}
public IOrchardHostContainer HostContainer { get; set; }