Skip to content

Commit e790785

Browse files
authored
[Identity] Fix Identity UI asset definitions (#59100)
1 parent c3a9589 commit e790785

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

src/Identity/UI/src/Microsoft.AspNetCore.Identity.UI.csproj

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,27 @@
9090
<RelativePath>%(RecursiveDir)%(FileName)%(Extension)</RelativePath>
9191
</V5AssetsCandidates>
9292
</ItemGroup>
93-
94-
<DefineStaticWebAssets Condition="'@(V4AssetsCandidates->Count())' != '0'" CandidateAssets="@(V4AssetsCandidates)" SourceId="$(PackageId)" SourceType="Discovered" AssetKind="All" ContentRoot="assets/V4" BasePath="$(StaticWebAssetBasePath)">
93+
94+
<DefineStaticWebAssets
95+
Condition="'@(V4AssetsCandidates->Count())' != '0'"
96+
CandidateAssets="@(V4AssetsCandidates)" SourceId="$(PackageId)"
97+
SourceType="Package"
98+
AssetKind="All"
99+
ContentRoot="assets/V4"
100+
BasePath="$(StaticWebAssetBasePath)"
101+
>
95102
<Output TaskParameter="Assets" ItemName="V4Assets" />
96103
</DefineStaticWebAssets>
97-
<DefineStaticWebAssets Condition="'@(V5AssetsCandidates->Count())' != '0'" CandidateAssets="@(V5AssetsCandidates)" SourceId="$(PackageId)" SourceType="Discovered" AssetKind="All" ContentRoot="assets/V5" BasePath="$(StaticWebAssetBasePath)">
104+
105+
<DefineStaticWebAssets
106+
Condition="'@(V5AssetsCandidates->Count())' != '0'"
107+
CandidateAssets="@(V5AssetsCandidates)"
108+
SourceId="$(PackageId)"
109+
SourceType="Package"
110+
AssetKind="All"
111+
ContentRoot="assets/V5"
112+
BasePath="$(StaticWebAssetBasePath)"
113+
>
98114
<Output TaskParameter="Assets" ItemName="V5Assets" />
99115
</DefineStaticWebAssets>
100116

@@ -106,7 +122,7 @@
106122
>
107123
<Output TaskParameter="Endpoints" ItemName="V4AssetEndpoints" />
108124
</DefineStaticWebAssetEndpoints>
109-
125+
110126
<DefineStaticWebAssetEndpoints
111127
Condition="'@(V5Assets)' != ''"
112128
CandidateAssets="@(V5Assets)"
@@ -116,23 +132,34 @@
116132
<Output TaskParameter="Endpoints" ItemName="V5AssetEndpoints" />
117133
</DefineStaticWebAssetEndpoints>
118134

119-
<GenerateStaticWebAssetsPropsFile StaticWebAssets="@(V4Assets)" PackagePathPrefix="staticwebassets/V4" TargetPropsFilePath="$(IntermediateOutputPath)IdentityUI.V4.targets" />
120-
<GenerateStaticWebAssetsPropsFile StaticWebAssets="@(V5Assets)" PackagePathPrefix="staticwebassets/V5" TargetPropsFilePath="$(IntermediateOutputPath)IdentityUI.V5.targets" />
135+
<ItemGroup>
136+
<FinalV4Assets Include="@(V4Assets)">
137+
<SourceType>Discovered</SourceType>
138+
</FinalV4Assets>
139+
<FinalV5Assets Include="@(V5Assets)">
140+
<SourceType>Discovered</SourceType>
141+
</FinalV5Assets>
142+
</ItemGroup>
143+
144+
<GenerateStaticWebAssetsPropsFile StaticWebAssets="@(FinalV4Assets)" PackagePathPrefix="staticwebassets/V4" TargetPropsFilePath="$(IntermediateOutputPath)IdentityUI.V4.targets" />
145+
<GenerateStaticWebAssetsPropsFile StaticWebAssets="@(FinalV5Assets)" PackagePathPrefix="staticwebassets/V5" TargetPropsFilePath="$(IntermediateOutputPath)IdentityUI.V5.targets" />
121146

122147
<GenerateStaticWebAssetEndpointsPropsFile
123148
StaticWebAssets="@(V4Assets)"
149+
PackagePathPrefix="staticwebassets/V4"
124150
StaticWebAssetEndpoints="@(V4AssetEndpoints)"
125151
TargetPropsFilePath="$(IntermediateOutputPath)IdentityUI.V4.endpoints.targets" />
126152

127153
<GenerateStaticWebAssetEndpointsPropsFile
128154
StaticWebAssets="@(V5Assets)"
155+
PackagePathPrefix="staticwebassets/V5"
129156
StaticWebAssetEndpoints="@(V5AssetEndpoints)"
130157
TargetPropsFilePath="$(IntermediateOutputPath)IdentityUI.V5.endpoints.targets" />
131158

132-
<ComputeStaticWebAssetsTargetPaths Assets="@(V4Assets)" PathPrefix="staticwebassets/V4" AdjustPathsForPack="true">
159+
<ComputeStaticWebAssetsTargetPaths Assets="@(FinalV4Assets)" PathPrefix="staticwebassets/V4" AdjustPathsForPack="true">
133160
<Output TaskParameter="AssetsWithTargetPath" ItemName="_PackStaticWebAssetWithTargetPath" />
134161
</ComputeStaticWebAssetsTargetPaths>
135-
<ComputeStaticWebAssetsTargetPaths Assets="@(V5Assets)" PathPrefix="staticwebassets/V5" AdjustPathsForPack="true">
162+
<ComputeStaticWebAssetsTargetPaths Assets="@(FinalV5Assets)" PathPrefix="staticwebassets/V5" AdjustPathsForPack="true">
136163
<Output TaskParameter="AssetsWithTargetPath" ItemName="_PackStaticWebAssetWithTargetPath" />
137164
</ComputeStaticWebAssetsTargetPaths>
138165

0 commit comments

Comments
 (0)