diff --git a/GoogleTestNuGet/Build.ps1 b/GoogleTestNuGet/Build.ps1 index fbc2c56a..c5bc2398 100644 --- a/GoogleTestNuGet/Build.ps1 +++ b/GoogleTestNuGet/Build.ps1 @@ -134,6 +134,18 @@ function Add-Signing { $MicroBuildProps.SetAttribute("Project", "$microbuild\build\Microsoft.VisualStudioEng.MicroBuild.Core.props") $MicroBuildProps.SetAttribute("Condition", "Exists('$microbuild\build\Microsoft.VisualStudioEng.MicroBuild.Core.props')") + $BuildGroup = $xml.CreateElement("ItemDefinitionGroup", "http://schemas.microsoft.com/developer/msbuild/2003") + $ClCompile = $xml.CreateElement("ClCompile", "http://schemas.microsoft.com/developer/msbuild/2003") + $AdditionalOptions = $xml.CreateElement("Profile", "http://schemas.microsoft.com/developer/msbuild/2003") + $AdditionalOptions.set_InnerXML("/Zi %(AdditionalOptions)"); + $ClCompile.AppendChild($AdditionalOptions) | Out-Null + $Link = $xml.CreateElement("Link", "http://schemas.microsoft.com/developer/msbuild/2003") + $Profile = $xml.CreateElement("Profile", "http://schemas.microsoft.com/developer/msbuild/2003") + $Profile.set_InnerXML("true"); + $Link.AppendChild($Profile) | Out-Null + $BuildGroup.AppendChild($ClCompile) | Out-Null + $BuildGroup.AppendChild($Link) | Out-Null + $RealSignGroup = $xml.CreateElement("PropertyGroup", "http://schemas.microsoft.com/developer/msbuild/2003") $RealSignGroup.SetAttribute("Condition", "'`$(RealSign)' == 'True'") $SignAsm = $xml.CreateElement("SignAssembly", "http://schemas.microsoft.com/developer/msbuild/2003") @@ -170,6 +182,7 @@ function Add-Signing { $MicroBuildTargets.SetAttribute("Condition", "Exists('$microbuild\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets')") $xml.Project.AppendChild($MicroBuildProps) | Out-Null + $xml.Project.AppendChild($BuildGroup) | Out-Null $xml.Project.AppendChild($RealSignGroup) | Out-Null $xml.Project.AppendChild($FileSignGroup) | Out-Null $xml.Project.AppendChild($MicroBuildTargets) | Out-Null