diff --git a/dnSpy/dnSpy-x86/Program.cs b/dnSpy/dnSpy-x86/Program.cs
index c479f84c4f..29cbdb84d1 100644
--- a/dnSpy/dnSpy-x86/Program.cs
+++ b/dnSpy/dnSpy-x86/Program.cs
@@ -23,7 +23,7 @@ namespace dnSpy_x86 {
static class Program {
[STAThread]
static void Main() {
-#if NET
+#if NET && BUILD_SELF_CONTAINED
const string errmsg = "Wrong startup project";
System.Diagnostics.Debug.Fail(errmsg);
throw new InvalidOperationException(errmsg);
diff --git a/dnSpy/dnSpy-x86/dnSpy-x86.csproj b/dnSpy/dnSpy-x86/dnSpy-x86.csproj
index 87287871b4..cc209c5ea7 100644
--- a/dnSpy/dnSpy-x86/dnSpy-x86.csproj
+++ b/dnSpy/dnSpy-x86/dnSpy-x86.csproj
@@ -10,13 +10,17 @@
True
..\..\dnSpy.snk
enable
- ..\dnSpy\bin\$(Configuration)\
+ ..\dnSpy\bin\$(Configuration)\
$(DnSpyRuntimeIdentifiers)
WinExe
true
AnyCPU
PerMonitorV2
+
+ x86
+
+ BUILD_SELF_CONTAINED