Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Debug_FailFast configuration #3267

Merged
merged 3 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
276 changes: 276 additions & 0 deletions DevHome.sln

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions common/DevHome.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Nullable>enable</Nullable>
<UseWinUI>true</UseWinUI>
<DevHomeSDKVersion Condition="$(DevHomeSDKVersion) == ''">$(DevHomeSDKVersion)</DevHomeSDKVersion>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions extensions/CoreWidgetProvider/CoreWidgetProvider.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<Import Project="$(SolutionDir)ToolingVersions.props" />
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<OutputType>Exe</OutputType>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug_FailFast'">
<OutputType>Exe</OutputType>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' != 'Debug'">
<OutputType>WinExe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<PublishProfile Condition="'$(BuildingInsideVisualStudio)' != 'True'">Properties\PublishProfiles\win-$(Platform).pubxml</PublishProfile>
<SelfContained>true</SelfContained>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
<!-- Debug builds produce a console app; otherwise a Windows app -->
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<OutputType>Exe</OutputType>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug_FailFast'">
<OutputType>Exe</OutputType>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' != 'Debug'">
<OutputType>WinExe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug_FailFast|ARM64">
<Configuration>Debug_FailFast</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_FailFast|Win32">
<Configuration>Debug_FailFast</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_FailFast|x64">
<Configuration>Debug_FailFast</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
Expand Down Expand Up @@ -56,6 +68,10 @@
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug_FailFast'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
Expand All @@ -64,18 +80,27 @@
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|x64'" Label="Configuration">
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|ARM64'" Label="Configuration">
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|Win32'" Label="Configuration">
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<DesktopCompatible>true</DesktopCompatible>
</PropertyGroup>
Expand All @@ -96,6 +121,10 @@
<OutDir>bin\x86\$(Configuration)\</OutDir>
<IntDir>obj\x86\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|Win32'">
<OutDir>bin\x86\$(Configuration)\</OutDir>
<IntDir>obj\x86\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
Expand All @@ -104,6 +133,10 @@
<OutDir>bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|x64'">
<OutDir>bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<OutDir>bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
Expand All @@ -112,6 +145,10 @@
<OutDir>bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|ARM64'">
<OutDir>bin\$(Platform)\$(Configuration)\</OutDir>
<IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
Expand All @@ -132,6 +169,11 @@
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug_FailFast'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<RootNamespace>HyperVExtension.Common</RootNamespace>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<Nullable>enable</Nullable>
<BuildRing Condition="'$(BuildRing)'==''">Dev</BuildRing>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<ItemGroup>
<None Remove="Scripts\DevSetupAgent.ps1" />
Expand Down Expand Up @@ -113,14 +114,26 @@
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|x64'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|x86'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|ARM64'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>portable</DebugType>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
<!-- Debug builds produce a console app; otherwise a Windows app -->
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<OutputType>Exe</OutputType>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug_FailFast'">
<OutputType>Exe</OutputType>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' != 'Debug'">
<OutputType>WinExe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog" Version="3.1.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Platforms>x86;x64;arm64</Platforms>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Platforms>x86;x64;arm64</Platforms>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<UseWinUI>true</UseWinUI>
<ProjectPriFileName>resources.pri</ProjectPriFileName>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
Expand Down
5 changes: 5 additions & 0 deletions settings/DevHome.Settings/DevHome.Settings.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<Nullable>enable</Nullable>
<UseWinUI>true</UseWinUI>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -65,4 +66,8 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug_FailFast'">
<DefineConstants>$(DefineConstants);DEBUG;DEBUG_FAILFAST</DefineConstants>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private static string RemoveComments(string text)
public App()
{
InitializeComponent();
#if DEBUG
#if DEBUG_FAILFAST
DebugSettings.FailFastOnErrors = true;
#endif
_dispatcherQueue = DispatcherQueue.GetForCurrentThread();
Expand Down
5 changes: 5 additions & 0 deletions src/DevHome.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<EnableMsixTooling>true</EnableMsixTooling>
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
<DefineConstants>$(DefineConstants);DISABLE_XAML_GENERATED_MAIN</DefineConstants>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>

<!-- To build with the correct logo assets, only include the ones for the current build ring.
Expand Down Expand Up @@ -160,6 +161,10 @@
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug_FailFast'">
<DefineConstants>$(DefineConstants);DEBUG;DEBUG_FAILFAST</DefineConstants>
</PropertyGroup>

<!-- Third party notice file -->
<ItemGroup>
<Content Include="$(SolutionDir)NOTICE.txt">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<Import Project="$(SolutionDir)ToolingVersions.props" />
<Import Project="$(SolutionDir)Directory.CppBuild.props" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug_FailFast|Win32">
<Configuration>Debug_FailFast</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_FailFast|x64">
<Configuration>Debug_FailFast</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
Expand Down Expand Up @@ -45,6 +53,12 @@
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
Expand All @@ -58,6 +72,12 @@
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
Expand All @@ -73,12 +93,18 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
Expand All @@ -95,6 +121,18 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
Expand Down Expand Up @@ -123,6 +161,18 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
Expand Down
1 change: 1 addition & 0 deletions telemetry/DevHome.Telemetry/DevHome.Telemetry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<UseWinUI>true</UseWinUI>
<!-- DefineConstants is removed in Unstub.ps1-->
<DefineConstants>TELEMETRYEVENTSOURCE_PUBLIC</DefineConstants>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog" Version="3.1.1" />
Expand Down
Loading
Loading