Skip to content

Commit 4d84071

Browse files
committed
Fix the error of being unable to open a new google test proj
1 parent 0cf0baa commit 4d84071

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

GoogleTestAdapter/GoogleTestProjectTemplate/GoogleTest.vcxproj

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,7 @@
1717
<Configuration>Release</Configuration>
1818
<Platform>x64</Platform>
1919
</ProjectConfiguration>
20-
<ProjectConfiguration Include="Debug|ARM64">
21-
<Configuration>Debug</Configuration>
22-
<Platform>ARM64</Platform>
23-
</ProjectConfiguration>
24-
<ProjectConfiguration Include="Release|ARM64">
25-
<Configuration>Release</Configuration>
26-
<Platform>ARM64</Platform>
27-
</ProjectConfiguration>
20+
$arm64config$
2821
</ItemGroup>
2922
<PropertyGroup Label="Globals">
3023
<ProjectGuid>{$guid1$}</ProjectGuid>

GoogleTestAdapter/NewProjectWizard/WizardImplementation.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public class WizardImplementation : IWizard
2929
private string arm64DebugXMLChunk = " <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|ARM64'\">\r\n\t<ClCompile>\r\n\t <PrecompiledHeader>Use</PrecompiledHeader>\r\n\t <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n\t <Optimization>Disabled</Optimization>\r\n\t <PreprocessorDefinitions>ARM64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n\t <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r\n\t <RuntimeLibrary>$rtdebug$</RuntimeLibrary>\r\n\t <WarningLevel>Level3</WarningLevel>\r\n\t</ClCompile>\r\n\t<Link>\r\n\t <GenerateDebugInformation>true</GenerateDebugInformation>\r\n\t <SubSystem>Console</SubSystem>\r\n\t</Link>\r\n </ItemDefinitionGroup>";
3030
private const string ARM64ReleasePlatform = "$arm64releaseplatform$";
3131
private string arm64ReleaseXMLChunk = " <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|ARM64'\">\r\n\t<ClCompile>\r\n\t <PrecompiledHeader>Use</PrecompiledHeader>\r\n\t <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>\r\n\t <PreprocessorDefinitions>ARM64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r\n\t <RuntimeLibrary>$rtrelease$</RuntimeLibrary>\r\n\t <WarningLevel>Level3</WarningLevel>\r\n\t <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r\n\t</ClCompile>\r\n\t<Link>\r\n\t <GenerateDebugInformation>true</GenerateDebugInformation>\r\n\t <SubSystem>Console</SubSystem>\r\n\t <OptimizeReferences>true</OptimizeReferences>\r\n\t <EnableCOMDATFolding>true</EnableCOMDATFolding>\r\n\t</Link>\r\n </ItemDefinitionGroup>";
32+
private const string ARM64Config = "$arm64config$";
33+
private string arm64ConfigXML = "\t<ProjectConfiguration Include=\"Debug|ARM64\">\r\n\t <Configuration>Debug</Configuration>\r\n\t <Platform>ARM64</Platform>\r\n\t</ProjectConfiguration>\r\n\t<ProjectConfiguration Include=\"Release|ARM64\">\r\n\t <Configuration>Release</Configuration>\r\n\t <Platform>ARM64</Platform>\r\n\t</ProjectConfiguration>";
3234
private List<Project> projects = new List<Project>();
3335
private int selectedProjectIndex;
3436
private IWizard nugetWizard;
@@ -187,7 +189,9 @@ public void RunStarted(object automationObject,
187189
else {
188190
arm64DebugXMLChunk = "";
189191
arm64ReleaseXMLChunk = "";
192+
arm64ConfigXML = "";
190193
}
194+
replacementsDictionary[ARM64Config] = arm64ConfigXML;
191195
replacementsDictionary[ARM64DebugPlatform] = arm64DebugXMLChunk;
192196
replacementsDictionary[ARM64DebugPlatform] = arm64ReleaseXMLChunk;
193197

0 commit comments

Comments
 (0)