Skip to content

Commit

Permalink
Consolidate ProjectReferences and clean csprojs (#3602)
Browse files Browse the repository at this point in the history
  • Loading branch information
krschau authored Aug 15, 2024
1 parent 5179039 commit c4e8ec9
Show file tree
Hide file tree
Showing 8 changed files with 145 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,4 @@
<ProjectReference Include="..\..\src\HyperVExtension.Common\HyperVExtension.Common.csproj" />
<ProjectReference Include="..\..\src\HyperVExtension\HyperVExtension.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="HyperVExtensionTests\TestArchiveFile\" />
</ItemGroup>
</Project>
170 changes: 85 additions & 85 deletions extensions/WSLExtension/WSLExtension.csproj
Original file line number Diff line number Diff line change
@@ -1,100 +1,100 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)ToolingVersions.props" />
<!-- 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>
</PropertyGroup>
<Import Project="$(SolutionDir)ToolingVersions.props" />
<!-- 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>
</PropertyGroup>

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<StartupObject>WSLExtension.Program</StartupObject>
<AssemblyName>WSLExtensionServer</AssemblyName>
<PublishProfileFullPath Condition="'$(BuildingInsideVisualStudio)' != 'True'">$(SolutionDir)\src\Properties\PublishProfiles\win-$(Platform).pubxml</PublishProfileFullPath>
</PropertyGroup>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<StartupObject>WSLExtension.Program</StartupObject>
<AssemblyName>WSLExtensionServer</AssemblyName>
<PublishProfileFullPath Condition="'$(BuildingInsideVisualStudio)' != 'True'">$(SolutionDir)\src\Properties\PublishProfiles\win-$(Platform).pubxml</PublishProfileFullPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.49-beta">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.700.544" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240311000" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="YamlDotNet" Version="15.1.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="System.Management" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Windows.DevHome.SDK" Version="0.700.544" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.5.240311000" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog" Version="3.1.1" />
<PackageReference Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="YamlDotNet" Version="15.1.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="System.Management" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<Content Include="DistributionDefinitions\DistributionDefinition.yaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="WslTemplates\ReviewFormForWslInstallation.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="WslTemplates\WslInstallationForm.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="DistributionDefinitions\DistributionDefinition.yaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="WslTemplates\ReviewFormForWslInstallation.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="WslTemplates\WslInstallationForm.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<None Update="wsl_appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="wsl_appsettings.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

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

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|x64'">
<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|x86'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|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|ARM64'">
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_FailFast|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>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>portable</DebugType>
</PropertyGroup>

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

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<DebugType>portable</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<DebugType>portable</DebugType>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="System.Management.Automation" Version="7.4.0" />
<PackageReference Include="System.Management.Automation" Version="7.4.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\telemetry\DevHome.Telemetry\DevHome.Telemetry.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)ToolingVersions.props" />
<PropertyGroup>
<RootNamespace>DevHome.Services.DesiredStateConfiguration</RootNamespace>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
</PropertyGroup>
<Import Project="$(SolutionDir)ToolingVersions.props" />
<PropertyGroup>
<RootNamespace>DevHome.Services.DesiredStateConfiguration</RootNamespace>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
</PropertyGroup>

<ItemGroup>
<Content Include="$(TargetDir)\Microsoft.Management.Configuration.dll" Link="Microsoft.Management.Configuration.dll" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(TargetDir)\Microsoft.Management.Configuration.winmd" Link="Microsoft.Management.Configuration.winmd" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<ItemGroup>
<Content Include="$(TargetDir)\Microsoft.Management.Configuration.dll" Link="Microsoft.Management.Configuration.dll" CopyToOutputDirectory="PreserveNewest" />
<Content Include="$(TargetDir)\Microsoft.Management.Configuration.winmd" Link="Microsoft.Management.Configuration.winmd" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.WindowsPackageManager.Configuration.OutOfProc" Version="1.7.10091-preview" GeneratePathProperty="True" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsPackageManager.Configuration.OutOfProc" Version="1.7.10091-preview" GeneratePathProperty="True" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\DevHome.Services.Core\DevHome.Services.Core.csproj" />
</ItemGroup>
<Target Name="CopyWinmdToTargetDir" BeforeTargets="BeforeBuild">
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_Configuration_OutOfProc)\runtimes\win10-$(Platform)\native\Microsoft.Management.Configuration.dll" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_Configuration_OutOfProc)\runtimes\win10-$(Platform)\native\Microsoft.Management.Configuration.winmd" DestinationFolder="$(TargetDir)" />
</Target>
<ItemGroup>
<ProjectReference Include="..\DevHome.Services.Core\DevHome.Services.Core.csproj" />
</ItemGroup>
<Target Name="CopyWinmdToTargetDir" BeforeTargets="BeforeBuild">
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_Configuration_OutOfProc)\runtimes\win10-$(Platform)\native\Microsoft.Management.Configuration.dll" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_Configuration_OutOfProc)\runtimes\win10-$(Platform)\native\Microsoft.Management.Configuration.winmd" DestinationFolder="$(TargetDir)" />
</Target>
</Project>
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$(SolutionDir)ToolingVersions.props" />
<PropertyGroup>
<RootNamespace>DevHome.Services.WindowsPackageManager</RootNamespace>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
</PropertyGroup>
<Import Project="$(SolutionDir)ToolingVersions.props" />
<PropertyGroup>
<RootNamespace>DevHome.Services.WindowsPackageManager</RootNamespace>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
</PropertyGroup>

<!--
<!--
CsWinRT properties:
https://github.com/microsoft/CsWinRT/blob/master/nuget/readme.md
-->
<PropertyGroup>
<CsWinRTWindowsMetadata>10.0.19041.0</CsWinRTWindowsMetadata>
<CsWinRTIncludes>Microsoft.Management.Deployment</CsWinRTIncludes>
</PropertyGroup>
<PropertyGroup>
<CsWinRTWindowsMetadata>10.0.19041.0</CsWinRTWindowsMetadata>
<CsWinRTIncludes>Microsoft.Management.Deployment</CsWinRTIncludes>
</PropertyGroup>

<ItemGroup>
<CsWinRTInputs Include="$(TargetDir)\Microsoft.Management.Deployment.winmd" />
<Content Include="$(TargetDir)\Microsoft.Management.Deployment.winmd" Link="Microsoft.Management.Deployment.winmd" CopyToOutputDirectory="PreserveNewest" />
<ItemGroup>
<CsWinRTInputs Include="$(TargetDir)\Microsoft.Management.Deployment.winmd" />
<Content Include="$(TargetDir)\Microsoft.Management.Deployment.winmd" Link="Microsoft.Management.Deployment.winmd" CopyToOutputDirectory="PreserveNewest" />

<!-- This DLL from the winget COM interop package allows activating the winget server elevated -->
<Content Include="$(TargetDir)\winrtact.dll" Link="winrtact.dll" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<!-- This DLL from the winget COM interop package allows activating the winget server elevated -->
<Content Include="$(TargetDir)\winrtact.dll" Link="winrtact.dll" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<ProjectReference Include="..\DevHome.Services.Core\DevHome.Services.Core.csproj" />
<!--
<ItemGroup>
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<ProjectReference Include="..\DevHome.Services.Core\DevHome.Services.Core.csproj" />
<!--
Microsoft.WindowsPackageManager.ComInterop nuget targets .NET Framework:
https://www.nuget.org/packages/Microsoft.WindowsPackageManager.ComInterop#readme-body-tab
To workaround this issue in this .net project:
Expand All @@ -40,14 +40,14 @@
- Feed the $(TargetDir)\WINMD path to CsWinRT in order to generate the projected classes
NOTE: Suppressing the warning only is not enough as this will cause CoreClrInitFailure (0x80008089) error.
-->
<PackageReference Include="Microsoft.WindowsPackageManager.ComInterop" Version="1.7.10091-preview">
<NoWarn>NU1701</NoWarn>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>none</IncludeAssets>
</PackageReference>
</ItemGroup>
<Target Name="CopyWinmdToTargetDir" BeforeTargets="BeforeBuild">
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\lib\Microsoft.Management.Deployment.winmd" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\runtimes\win10-$(Platform)\native\winrtact.dll" DestinationFolder="$(TargetDir)" />
</Target>
<PackageReference Include="Microsoft.WindowsPackageManager.ComInterop" Version="1.7.10091-preview">
<NoWarn>NU1701</NoWarn>
<GeneratePathProperty>true</GeneratePathProperty>
<IncludeAssets>none</IncludeAssets>
</PackageReference>
</ItemGroup>
<Target Name="CopyWinmdToTargetDir" BeforeTargets="BeforeBuild">
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\lib\Microsoft.Management.Deployment.winmd" DestinationFolder="$(TargetDir)" />
<Copy SourceFiles="$(PkgMicrosoft_WindowsPackageManager_ComInterop)\runtimes\win10-$(Platform)\native\winrtact.dll" DestinationFolder="$(TargetDir)" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,4 @@
<ProjectReference Include="..\..\..\common\DevHome.Common.csproj" />
<ProjectReference Include="..\..\..\settings\DevHome.Settings\DevHome.Settings.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="CustomControls\" />
<Folder Include="Extensions\" />
<Folder Include="Strings\" />
<Folder Include="Views\" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
<UseWinUI>true</UseWinUI>
<Configurations>Debug;Release;Debug_FailFast</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Helpers\**" />
<Content Remove="Helpers\**" />
<EmbeddedResource Remove="Helpers\**" />
<None Remove="Helpers\**" />
<Page Remove="Helpers\**" />
<PRIResource Remove="Helpers\**" />
</ItemGroup>

<ItemGroup>
<None Remove="Views\ExtensionLibraryView.xaml" />
Expand All @@ -39,10 +31,6 @@
</Page>
</ItemGroup>

<ItemGroup>
<Folder Include="Assets\" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions tools/SetupFlow/DevHome.SetupFlow/DevHome.SetupFlow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@
<Content Update="Assets\Setup_EndToEnd.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Assets\Setup_QuickstartPlayground.png">
<Content Update="Assets\Setup_QuickstartPlayground.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</Content>
<Content Update="Assets\Setup_RepoConfig.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down

0 comments on commit c4e8ec9

Please sign in to comment.