Skip to content

Commit f742f5e

Browse files
Fixing unintended formatting changes (#5472)
Co-authored-by: Jose Perez Rodriguez <[email protected]>
1 parent a29ea72 commit f742f5e

File tree

1 file changed

+16
-33
lines changed

1 file changed

+16
-33
lines changed

src/Aspire.Hosting.Sdk/SDK/Sdk.targets

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
<Project>
22

33
<!--
4-
A property-based workload cannot import props files (except AutoImport.props, which has very tight
5-
limitations.
4+
A property-based workload cannot import props files (except AutoImport.props, which has very tight limitations.
65
Instead, we copy everything from Aspire.Hosting.AppHost.props into these targets.
7-
This means they cannot be overridden in the csproj, and may cause ordering issues, particularly
8-
StaticWebAssets.
6+
This means they cannot be overridden in the csproj, and may cause ordering issues, particularly StaticWebAssets.
97
-->
108

119
<ItemGroup>
@@ -15,45 +13,34 @@
1513
</ItemGroup>
1614

1715
<PropertyGroup>
18-
<!-- Aspire hosting projects aren't publishable right now until
19-
https://github.com/dotnet/aspire/issues/147 is good -->
16+
<!-- Aspire hosting projects aren't publishable right now until https://github.com/dotnet/aspire/issues/147 is good -->
2017
<IsPublishable Condition="'$(IsPublishable)' == ''">false</IsPublishable>
2118
<IsPackable Condition="'$(IsPackable)' == ''">false</IsPackable>
2219
</PropertyGroup>
2320

2421
<!--
25-
Default AppHost ProjectReference items to not be referenced in the AppHost, unless it is
26-
IsAspireProjectResource=false.
22+
Default AppHost ProjectReference items to not be referenced in the AppHost, unless it is IsAspireProjectResource=false.
2723
This defaulting needs to happen in the SDK targets so this metadata affects NuGet Restore.
2824
-->
2925
<ItemGroup Condition="'$(IsAspireHost)' == 'true'">
30-
26+
3127
<ProjectReference Update="@(ProjectReference)">
3228
<IsAspireProjectResource Condition="'%(IsAspireProjectResource)' != 'false'">true</IsAspireProjectResource>
3329

34-
<ReferenceOutputAssembly
35-
Condition="'%(ReferenceOutputAssembly)' == '' and '%(IsAspireProjectResource)' == 'true'">
36-
false</ReferenceOutputAssembly>
37-
<SkipGetTargetFrameworkProperties
38-
Condition="'%(SkipGetTargetFrameworkProperties)' == '' and '%(IsAspireProjectResource)' == 'true'">
39-
true</SkipGetTargetFrameworkProperties>
40-
<ExcludeAssets Condition="'%(ExcludeAssets)' == '' and '%(IsAspireProjectResource)' == 'true'">
41-
all</ExcludeAssets>
30+
<ReferenceOutputAssembly Condition="'%(ReferenceOutputAssembly)' == '' and '%(IsAspireProjectResource)' == 'true'">false</ReferenceOutputAssembly>
31+
<SkipGetTargetFrameworkProperties Condition="'%(SkipGetTargetFrameworkProperties)' == '' and '%(IsAspireProjectResource)' == 'true'">true</SkipGetTargetFrameworkProperties>
32+
<ExcludeAssets Condition="'%(ExcludeAssets)' == '' and '%(IsAspireProjectResource)' == 'true'">all</ExcludeAssets>
4233
<Private Condition="'%(Private)' == '' and '%(IsAspireProjectResource)' == 'true'">false</Private>
4334
</ProjectReference>
4435

4536
</ItemGroup>
4637

47-
<Target Name="__WarnOnAspireCapabilityMissing" BeforeTargets="PrepareForBuild"
48-
Condition="!@(ProjectCapability->AnyHaveMetadataValue('Identity', 'Aspire'))">
49-
<Warning Code="ASPIRE002"
50-
Text="$(MSBuildProjectName) is an Aspire AppHost project but necessary dependencies aren't present. Are you missing an Aspire.Hosting.AppHost PackageReference?" />
38+
<Target Name="__WarnOnAspireCapabilityMissing" BeforeTargets="PrepareForBuild" Condition="!@(ProjectCapability->AnyHaveMetadataValue('Identity', 'Aspire'))">
39+
<Warning Code="ASPIRE002" Text="$(MSBuildProjectName) is an Aspire AppHost project but necessary dependencies aren't present. Are you missing an Aspire.Hosting.AppHost PackageReference?" />
5140
</Target>
5241

53-
<Target Name="__WarnOnMininumVsVersionMissing" BeforeTargets="PrepareForBuild"
54-
Condition="'$(BuildingInsideVisualStudio)' == 'true' and $([MSBuild]::VersionLessThan('$(MSBuildVersion)', '17.10.0'))">
55-
<Warning Code="ASPIRE003"
56-
Text="$(MSBuildProjectName) is a .NET Aspire AppHost project that requires Visual Studio version 17.10 or above to work correctly. You are using version $(MSBuildVersion)." />
42+
<Target Name="__WarnOnMininumVsVersionMissing" BeforeTargets="PrepareForBuild" Condition="'$(BuildingInsideVisualStudio)' == 'true' and $([MSBuild]::VersionLessThan('$(MSBuildVersion)', '17.10.0'))">
43+
<Warning Code="ASPIRE003" Text="$(MSBuildProjectName) is a .NET Aspire AppHost project that requires Visual Studio version 17.10 or above to work correctly. You are using version $(MSBuildVersion)." />
5744
</Target>
5845

5946
<!-- This target extracts the version of Aspire.Hosting.AppHost referenced by the project, and adds
@@ -65,8 +52,7 @@
6552
<!-- First, we assume project is not using Central Package Management, and we try to extract the version
6653
from PackageReference Items. -->
6754
<ItemGroup>
68-
<_AppHostPackageReference Include="@(PackageReference)" Condition="'%(Identity)' ==
69-
'Aspire.Hosting.AppHost'" />
55+
<_AppHostPackageReference Include="@(PackageReference)" Condition="'%(Identity)' == 'Aspire.Hosting.AppHost'" />
7056
</ItemGroup>
7157

7258
<!-- Extract the Version metadata -->
@@ -78,8 +64,7 @@
7864
and we try to extract the PackageVersion Items. -->
7965
<ItemGroup Condition="'$(_AppHostVersion)' == ''">
8066
<_AppHostPackageReference />
81-
<_AppHostPackageReference Include="@(PackageVersion)" Condition="'%(Identity)' ==
82-
'Aspire.Hosting.AppHost'" />
67+
<_AppHostPackageReference Include="@(PackageVersion)" Condition="'%(Identity)' == 'Aspire.Hosting.AppHost'" />
8368
</ItemGroup>
8469

8570
<PropertyGroup Condition="'$(_AppHostVersion)' == ''">
@@ -96,10 +81,8 @@
9681

9782
<!-- Now that we have the version, we add the package references -->
9883
<ItemGroup>
99-
<PackageReference Include="Aspire.Dashboard.Sdk.$(NETCoreSdkRuntimeIdentifier)"
100-
Version="$(_AppHostVersion)" IsImplicitlyDefined="true" />
101-
<PackageReference Include="Aspire.Hosting.Orchestration.$(NETCoreSdkRuntimeIdentifier)"
102-
Version="$(_AppHostVersion)" IsImplicitlyDefined="true" />
84+
<PackageReference Include="Aspire.Dashboard.Sdk.$(NETCoreSdkRuntimeIdentifier)" Version="$(_AppHostVersion)" IsImplicitlyDefined="true" />
85+
<PackageReference Include="Aspire.Hosting.Orchestration.$(NETCoreSdkRuntimeIdentifier)" Version="$(_AppHostVersion)" IsImplicitlyDefined="true" />
10386
</ItemGroup>
10487
</Target>
10588

0 commit comments

Comments
 (0)