Skip to content

Commit 235a156

Browse files
committed
Fix compiler not being checked for on Linux
1 parent ec6b328 commit 235a156

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/CSharpExtension.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,11 @@ public CSharpExtension(ExtensionManager manager) : base(manager)
8080

8181
string extDir = Interface.Oxide.ExtensionDirectory;
8282
string configPath = Path.Combine(extDir, "Oxide.References.dll.config");
83-
if (File.Exists(configPath) && !(new[] { "target=\"x64", "target=\"./x64" }.Any(File.ReadAllText(configPath).Contains)))
83+
if (!File.Exists(configPath) || (new[] { "target=\"x64", "target=\"./x64" }.Any(File.ReadAllText(configPath).Contains)))
8484
{
85-
return;
85+
File.WriteAllText(configPath, $"<configuration>\n<dllmap dll=\"MonoPosixHelper\" target=\"{extDir}/x86/libMonoPosixHelper.so\" os=\"!windows,osx\" wordsize=\"32\" />\n" +
86+
$"<dllmap dll=\"MonoPosixHelper\" target=\"{extDir}/x64/libMonoPosixHelper.so\" os=\"!windows,osx\" wordsize=\"64\" />\n</configuration>");
8687
}
87-
88-
File.WriteAllText(configPath, $"<configuration>\n<dllmap dll=\"MonoPosixHelper\" target=\"{extDir}/x86/libMonoPosixHelper.so\" os=\"!windows,osx\" wordsize=\"32\" />\n" +
89-
$"<dllmap dll=\"MonoPosixHelper\" target=\"{extDir}/x64/libMonoPosixHelper.so\" os=\"!windows,osx\" wordsize=\"64\" />\n</configuration>");
9088
}
9189
else
9290
{

0 commit comments

Comments
 (0)