diff --git a/examples/il/default.il b/examples/il/default.il index 255791b7d..2e506e2f2 100644 --- a/examples/il/default.il +++ b/examples/il/default.il @@ -1,4 +1,5 @@ .assembly extern System.Console { } +.assembly extern System.Runtime { } .class private auto ansi beforefieldinit Program extends [System.Runtime]System.Object { diff --git a/lib/compilers/dotnet.ts b/lib/compilers/dotnet.ts index a2f62c063..c1cdca0a9 100644 --- a/lib/compilers/dotnet.ts +++ b/lib/compilers/dotnet.ts @@ -164,7 +164,7 @@ class DotNetCompiler extends BaseCompiler { .ver 1:0:0:0 } .module CompilerExplorer.dll - #include "${path.join(programDir, sourceFile)}" + #include "${sourceFile}" `; const ilFilePath = path.join(programDir, `${AssemblyName}.il`); @@ -265,6 +265,7 @@ class DotNetCompiler extends BaseCompiler { options.push( buildToBinary ? '-exe' : '-dll', path.join(programDir, `${AssemblyName}.il`), + `-include:${programDir}`, `-output:${path.join(programOutputPath, 'CompilerExplorer.dll')}`, ); await fs.mkdirs(programOutputPath);