- Timestamp:
- 10/19/08 02:11:33 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.Operators.Programmable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Programmable/HeuristicLab.Operators.Programmable.csproj
r582 r694 3 3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> 4 4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> 5 <ProductVersion>9.0. 30729</ProductVersion>5 <ProductVersion>9.0.21022</ProductVersion> 6 6 <SchemaVersion>2.0</SchemaVersion> 7 7 <ProjectGuid>{E3CCBFC6-900C-41B6-AFB8-6646DB097435}</ProjectGuid> … … 17 17 <UpgradeBackupLocation> 18 18 </UpgradeBackupLocation> 19 <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> 19 20 </PropertyGroup> 20 21 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> … … 55 56 <ItemGroup> 56 57 <Reference Include="System" /> 58 <Reference Include="System.Core"> 59 <RequiredTargetFramework>3.5</RequiredTargetFramework> 60 </Reference> 57 61 <Reference Include="System.Data" /> 62 <Reference Include="System.Data.Linq"> 63 <RequiredTargetFramework>3.5</RequiredTargetFramework> 64 </Reference> 58 65 <Reference Include="System.Drawing" /> 59 66 <Reference Include="System.Windows.Forms" /> -
trunk/sources/HeuristicLab.Operators.Programmable/ProgrammableOperator.cs
r679 r694 25 25 using System.Xml; 26 26 using System.IO; 27 using System.Linq; 27 28 using System.Reflection; 28 29 using System.CodeDom; … … 32 33 using HeuristicLab.Core; 33 34 using HeuristicLab.Data; 35 using System.Data.Linq; 34 36 35 37 namespace HeuristicLab.Operators.Programmable { … … 56 58 myCode = "Result.Data = true;"; 57 59 myDescription = "An operator that can be programmed for arbitrary needs."; 58 59 60 AddVariableInfo(new VariableInfo("Result", "A computed variable", typeof(BoolData), VariableKind.New | VariableKind.Out)); 60 61 executeMethod = null; … … 94 95 ns.Imports.Add(new CodeNamespaceImport("System.Text")); 95 96 ns.Imports.Add(new CodeNamespaceImport("System.Linq")); 97 ns.Imports.Add(new CodeNamespaceImport("System.Data.Linq")); 96 98 ns.Imports.Add(new CodeNamespaceImport("HeuristicLab.Core")); 97 99 foreach (IVariableInfo variableInfo in VariableInfos) … … 107 109 foreach (Assembly loadedAssembly in loadedAssemblies) 108 110 parameters.ReferencedAssemblies.Add(loadedAssembly.Location); 109 CodeDomProvider provider = new CSharpCodeProvider(); 111 parameters.ReferencedAssemblies.Add(typeof(Enumerable).Assembly.Location); // add reference to version 3.5 of System.dll 112 parameters.ReferencedAssemblies.Add(typeof(DataContext).Assembly.Location); // add reference System.Data.Linq.Dll 113 CodeDomProvider provider = new CSharpCodeProvider(new Dictionary<string, string>() { { "CompilerVersion", "v3.5" } }); // support C# 3.0 syntax 110 114 CompilerResults results = provider.CompileAssemblyFromDom(parameters, unit); 111 115
Note: See TracChangeset
for help on using the changeset viewer.