diff --git a/src/Compilers/Core/MSBuildTask/Shared/Csc.cs b/src/Compilers/Core/MSBuildTask/Shared/Csc.cs index 9b88d80b3328da57e2e3850dac8a6c5b259d323d..044148f6bcbf42121ebcb622593f9906f848c56e 100644 --- a/src/Compilers/Core/MSBuildTask/Shared/Csc.cs +++ b/src/Compilers/Core/MSBuildTask/Shared/Csc.cs @@ -486,14 +486,7 @@ private bool InitializeHostCompiler(ICscHostObject cscHostObject) } catch (Exception e) { - if (HostCompilerSupportsAllParameters) - { - // If the host compiler doesn't support everything we need, we're going to end up - // shelling out to the command-line compiler anyway. That means the command-line - // compiler will log the error. So here, we only log the error if we would've - // tried to use the host compiler. - Log.LogErrorWithCodeFromResources("General_CouldNotSetHostObjectParameter", param, e.Message); - } + Log.LogErrorWithCodeFromResources("General_CouldNotSetHostObjectParameter", param, e.Message); return false; } @@ -620,14 +613,7 @@ private bool InitializeHostCompiler(ICscHostObject cscHostObject) } catch (Exception e) { - if (HostCompilerSupportsAllParameters) - { - // If the host compiler doesn't support everything we need, we're going to end up - // shelling out to the command-line compiler anyway. That means the command-line - // compiler will log the error. So here, we only log the error if we would've - // tried to use the host compiler. - Log.LogErrorWithCodeFromResources("General_CouldNotSetHostObjectParameter", param, e.Message); - } + Log.LogErrorWithCodeFromResources("General_CouldNotSetHostObjectParameter", param, e.Message); return false; } finally @@ -748,4 +734,4 @@ protected override bool CallHostObjectToExecute() return cscHostObject.Compile(); } } -} \ No newline at end of file +} diff --git a/src/Compilers/Core/MSBuildTask/Shared/Vbc.cs b/src/Compilers/Core/MSBuildTask/Shared/Vbc.cs index 9ef6f4a09883f2ddd978d2a764a4c8fd3f22f5eb..baef7a75eb012cdad1cfb83a021f0e3da693b386 100644 --- a/src/Compilers/Core/MSBuildTask/Shared/Vbc.cs +++ b/src/Compilers/Core/MSBuildTask/Shared/Vbc.cs @@ -967,15 +967,7 @@ private bool InitializeHostCompiler(IVbcHostObject vbcHostObject) } catch (Exception e) { - if (this.HostCompilerSupportsAllParameters) - { - // If the host compiler doesn't support everything we need, we're going to end up - // shelling out to the command-line compiler anyway. That means the command-line - // compiler will log the error. So here, we only log the error if we would've - // tried to use the host compiler. - Log.LogErrorWithCodeFromResources("General_CouldNotSetHostObjectParameter", param, e.Message); - } - + Log.LogErrorWithCodeFromResources("General_CouldNotSetHostObjectParameter", param, e.Message); return false; } finally @@ -1113,4 +1105,4 @@ public VBError(string message, MessageImportance importance) } } } -} \ No newline at end of file +}