diff --git a/src/Microsoft.Management.Infrastructure.Native/project.json b/src/Microsoft.Management.Infrastructure.Native/project.json index 74588a1a9a..89d1ba364c 100644 --- a/src/Microsoft.Management.Infrastructure.Native/project.json +++ b/src/Microsoft.Management.Infrastructure.Native/project.json @@ -7,6 +7,9 @@ "frameworks": { "netstandard1.5": { "imports": [ "dnxcore50" ], + "compilationOptions": { + "warningsAsErrors": true + }, "dependencies": { "NETStandard.Library": "1.0.0-rc3-23819", "System.Security.SecureString": "1.0.0-*" diff --git a/src/Microsoft.Management.Infrastructure/project.json b/src/Microsoft.Management.Infrastructure/project.json index c063c8ee8c..8b0f14e313 100644 --- a/src/Microsoft.Management.Infrastructure/project.json +++ b/src/Microsoft.Management.Infrastructure/project.json @@ -15,6 +15,7 @@ "netstandard1.5": { "imports": [ "dnxcore50" ], "compilationOptions": { + "warningsAsErrors": true, "define": [ "_CORECLR" ] }, "dependencies": { diff --git a/src/Microsoft.PowerShell.Commands.Management/project.json b/src/Microsoft.PowerShell.Commands.Management/project.json index c5093bf3fd..d3d58b8ceb 100644 --- a/src/Microsoft.PowerShell.Commands.Management/project.json +++ b/src/Microsoft.PowerShell.Commands.Management/project.json @@ -4,6 +4,7 @@ "authors": [ "garretts", "andschwa" ], "compilationOptions": { + "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/src/Microsoft.PowerShell.Commands.Utility/project.json b/src/Microsoft.PowerShell.Commands.Utility/project.json index 5eee156ede..aba0fb0b16 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/project.json +++ b/src/Microsoft.PowerShell.Commands.Utility/project.json @@ -4,6 +4,7 @@ "authors": [ "garretts", "andschwa" ], "compilationOptions": { + "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/src/Microsoft.PowerShell.ConsoleHost/project.json b/src/Microsoft.PowerShell.ConsoleHost/project.json index c558e9eed5..1621db42d8 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/project.json +++ b/src/Microsoft.PowerShell.ConsoleHost/project.json @@ -5,6 +5,7 @@ "authors": [ "sevoroby", "andschwa" ], "compilationOptions": { + "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json b/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json index 53067ff82c..0e9a219401 100644 --- a/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json +++ b/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json @@ -3,6 +3,10 @@ "version": "1.0.0-*", "authors": [ "andschwa" ], + "compilationOptions": { + "warningsAsErrors": true + }, + "configurations": { "Linux": { "compilationOptions": { diff --git a/src/Microsoft.PowerShell.Linux.Host/main.cs b/src/Microsoft.PowerShell.Linux.Host/main.cs index d0f8e0f751..fde1f21928 100644 --- a/src/Microsoft.PowerShell.Linux.Host/main.cs +++ b/src/Microsoft.PowerShell.Linux.Host/main.cs @@ -388,7 +388,7 @@ OPTIONS this.currentPowerShell.Invoke(null, settings); } } - catch (IncompleteParseException e) + catch (IncompleteParseException) { incompleteLine = true; cmd = cmd.Trim(); diff --git a/src/Microsoft.PowerShell.Linux.Host/project.json b/src/Microsoft.PowerShell.Linux.Host/project.json index 6ff86d98a7..3ed353c853 100644 --- a/src/Microsoft.PowerShell.Linux.Host/project.json +++ b/src/Microsoft.PowerShell.Linux.Host/project.json @@ -5,6 +5,7 @@ "authors": [ "andschwa" ], "compilationOptions": { + "warningsAsErrors": true, "emitEntryPoint": true }, diff --git a/src/Microsoft.PowerShell.Security/project.json b/src/Microsoft.PowerShell.Security/project.json index 1da073edc4..28a9afadbe 100644 --- a/src/Microsoft.PowerShell.Security/project.json +++ b/src/Microsoft.PowerShell.Security/project.json @@ -4,6 +4,7 @@ "authors": [ "garretts", "andschwa" ], "compilationOptions": { + "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/src/System.Management.Automation/project.json b/src/System.Management.Automation/project.json index b3225ac216..8abfe1489a 100644 --- a/src/System.Management.Automation/project.json +++ b/src/System.Management.Automation/project.json @@ -4,6 +4,7 @@ "authors": [ "garretts", "andschwa" ], "compilationOptions": { + "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/src/System.Security.SecureString/project.json b/src/System.Security.SecureString/project.json index a940445533..cb5181a4a1 100644 --- a/src/System.Security.SecureString/project.json +++ b/src/System.Security.SecureString/project.json @@ -5,6 +5,7 @@ "authors": [ "garretts" ], "compilationOptions": { + "warningsAsErrors": true, "allowUnsafe": true },