@@ -26,11 +26,11 @@ public class WizardImplementation : IWizard
2626 private const string RuntimeRelease = "$rtrelease$" ;
2727 private const string RunSilent = "$runsilent$" ;
2828 private const string ARM64DebugPlatform = "$arm64debugplatform$" ;
29- private string arm64DebugXMLChunk = " <ItemDefinitionGroup Condition=\" '$(Configuration)|$(Platform)'=='Debug|ARM64'\" > <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>ARM64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>$rtdebug$</RuntimeLibrary> <WarningLevel>Level3</WarningLevel> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> </Link> </ItemDefinitionGroup>" ;
3029 private const string ARM64ReleasePlatform = "$arm64releaseplatform$" ;
31- private string arm64ReleaseXMLChunk = " <ItemDefinitionGroup Condition=\" '$(Configuration)|$(Platform)'=='Release|ARM64'\" > <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PreprocessorDefinitions>ARM64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>$rtrelease$</RuntimeLibrary> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> </Link> </ItemDefinitionGroup>" ;
3230 private const string ARM64Config = "$arm64config$" ;
3331 private string arm64ConfigXML = "<ProjectConfiguration Include=\" Debug|ARM64\" > <Configuration>Debug</Configuration> <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include=\" Release|ARM64\" > <Configuration>Release</Configuration> <Platform>ARM64</Platform> </ProjectConfiguration>" ;
32+ private const string ARM64Pch = "$arm64Pch$" ;
33+ private string arm64PchXML = "<PrecompiledHeader Condition=\" '$(Configuration)|$(Platform)'=='Debug|ARM64'\" >Create</PrecompiledHeader> <PrecompiledHeader Condition=\" '$(Configuration)|$(Platform)'=='Release|ARM64'\" >Create</PrecompiledHeader>" ;
3434 private List < Project > projects = new List < Project > ( ) ;
3535 private int selectedProjectIndex ;
3636 private IWizard nugetWizard ;
@@ -151,17 +151,24 @@ public void RunStarted(object automationObject,
151151 throw ;
152152 }
153153
154+ string RuntimeDebugValue = "MultiThreadedDebugDLL" ;
155+ string RuntimeReleaseValue = "MultiThreadedDLL" ;
154156 if ( configurationData . IsRuntimeStatic )
155157 {
156- replacementsDictionary [ RuntimeRelease ] = "MultiThreaded " ;
157- replacementsDictionary [ RuntimeDebug ] = "MultiThreadedDebug " ;
158+ RuntimeDebugValue = "MultiThreadedDebug " ;
159+ RuntimeReleaseValue = "MultiThreaded " ;
158160 }
159161 else
160162 {
161- replacementsDictionary [ RuntimeRelease ] = "MultiThreadedDLL ";
162- replacementsDictionary [ RuntimeDebug ] = "MultiThreadedDebugDLL " ;
163+ RuntimeDebugValue = "MultiThreadedDebugDLL ";
164+ RuntimeReleaseValue = "MultiThreadedDLL " ;
163165 }
164166
167+ string arm64DebugXMLChunk = $ " <ItemDefinitionGroup Condition=\" '$(Configuration)|$(Platform)'=='Debug|ARM64'\" > <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>ARM64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>{ RuntimeDebugValue } </RuntimeLibrary> <WarningLevel>Level3</WarningLevel> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> </Link> </ItemDefinitionGroup>";
168+ string arm64ReleaseXMLChunk = $ " <ItemDefinitionGroup Condition=\" '$(Configuration)|$(Platform)'=='Release|ARM64'\" > <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PreprocessorDefinitions>ARM64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>{ RuntimeReleaseValue } </RuntimeLibrary> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> </Link> </ItemDefinitionGroup>";
169+ replacementsDictionary [ RuntimeDebug ] = RuntimeDebugValue ;
170+ replacementsDictionary [ RuntimeRelease ] = RuntimeReleaseValue ;
171+
165172 if ( ! isPlatformSet )
166173 {
167174 IEnumerable < TargetPlatformSDK > platformSdks = ToolLocationHelper . GetTargetPlatformSdks ( ) ;
@@ -184,11 +191,13 @@ public void RunStarted(object automationObject,
184191 . OrderByDescending ( p => p . Version ) . ToList ( ) ;
185192
186193 if ( ! this . IsARM64 ( ) ) {
194+ arm64ConfigXML = "" ;
195+ arm64PchXML = "" ;
187196 arm64DebugXMLChunk = "" ;
188197 arm64ReleaseXMLChunk = "" ;
189- arm64ConfigXML = "" ;
190198 }
191199 replacementsDictionary [ ARM64Config ] = arm64ConfigXML ;
200+ replacementsDictionary [ ARM64Pch ] = arm64PchXML ;
192201 replacementsDictionary [ ARM64DebugPlatform ] = arm64DebugXMLChunk ;
193202 replacementsDictionary [ ARM64ReleasePlatform ] = arm64ReleaseXMLChunk ;
194203
0 commit comments