Browse Source

Fixed the auto-compilation in the C# end by adding a reference to System.Core.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/496/merge
Dimitar Dobrev 10 years ago
parent
commit
c0fbdcbb0a
  1. 5
      src/Generator/Driver.cs

5
src/Generator/Driver.cs

@ -358,7 +358,10 @@ namespace CppSharp @@ -358,7 +358,10 @@ namespace CppSharp
CompilerOptions = compilerOptions.ToString()
};
compilerParameters.ReferencedAssemblies.Add(typeof (object).Assembly.Location);
// add references to System and System.Core
compilerParameters.ReferencedAssemblies.Add(typeof(object).Assembly.Location);
compilerParameters.ReferencedAssemblies.Add(typeof(Enumerable).Assembly.Location);
var location = Assembly.GetExecutingAssembly().Location;
var outputDir = Path.GetDirectoryName(location);
var locationRuntime = Path.Combine(outputDir, "CppSharp.Runtime.dll");

Loading…
Cancel
Save