|
1 |
| -<Project Sdk="Microsoft.NET.Sdk.Web" DefaultTargets="Pack"> |
| 1 | +<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="Pack"> |
2 | 2 |
|
3 | 3 | <PropertyGroup>
|
4 | 4 | <TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
|
|
14 | 14 |
|
15 | 15 | <!-- The package doesn't produce any lib or ref assemblies -->
|
16 | 16 | <NoWarn>$(NoWarn);NU5128</NoWarn>
|
17 |
| - |
18 |
| - <StaticWebAssetBasePath>_framework</StaticWebAssetBasePath> |
19 |
| - <DisableStaticWebAssetsBuildPropsFileGeneration>true</DisableStaticWebAssetsBuildPropsFileGeneration> |
20 |
| - <DisableStaticWebAssetEndpointsBuildPropsFileGeneration>true</DisableStaticWebAssetEndpointsBuildPropsFileGeneration> |
21 |
| - <StaticWebAssetsDisableProjectBuildPropsFileGeneration>true</StaticWebAssetsDisableProjectBuildPropsFileGeneration> |
22 |
| - <StaticWebAssetsDisableProjectBuildMultiTargetingPropsFileGeneration>true</StaticWebAssetsDisableProjectBuildMultiTargetingPropsFileGeneration> |
23 |
| - <StaticWebAssetsDisableProjectBuildTransitivePropsFileGeneration>true</StaticWebAssetsDisableProjectBuildTransitivePropsFileGeneration> |
24 |
| - <StaticWebAssetsGetBuildAssetsTargets>_GetFrameworkBuildAssets</StaticWebAssetsGetBuildAssetsTargets> |
25 | 17 | </PropertyGroup>
|
26 | 18 |
|
27 |
| - <ItemGroup> |
28 |
| - <None Include="build\*" Pack="true" PackagePath="%(Identity)" /> |
29 |
| - <None Include="buildMultiTargeting\*" Pack="true" PackagePath="%(Identity)" /> |
30 |
| - <None Include="buildTransitive\*" Pack="true" PackagePath="%(Identity)" /> |
31 |
| - </ItemGroup> |
32 |
| - |
33 | 19 | <PropertyGroup>
|
34 | 20 | <_BlazorJSContentRoot Condition="'$(Configuration)' == 'Debug'">$(RepoRoot)src\Components\Web.JS\dist\Debug</_BlazorJSContentRoot>
|
35 | 21 | <_BlazorJSContentRoot Condition="'$(Configuration)' == 'Release'">$(RepoRoot)src\Components\Web.JS\dist\Release</_BlazorJSContentRoot>
|
|
44 | 30 | <_BlazorJSMapFile Include="@(_BlazorJSFilename->'$(_BlazorJSContentRoot)\%(Identity).map')" />
|
45 | 31 | </ItemGroup>
|
46 | 32 |
|
47 |
| - <Target Name="_CheckBlazorJSPath" AfterTargets="ResolveProjectReferences"> |
| 33 | + <ItemGroup> |
| 34 | + <None Include="build\*" Pack="true" PackagePath="%(Identity)" /> |
| 35 | + <None Include="buildMultiTargeting\*" Pack="true" PackagePath="%(Identity)" /> |
| 36 | + <None Include="buildTransitive\*" Pack="true" PackagePath="%(Identity)" /> |
| 37 | + <None Include="@(_BlazorJSFile)" Pack="true" PackagePath="_framework\%(FileName)%(Extension)" /> |
| 38 | + <None Include="@(_BlazorJSMapFile)" Pack="true" PackagePath="_framework\debug\%(FileName)%(Extension)" /> |
| 39 | + </ItemGroup> |
48 | 40 |
|
| 41 | + <Target Name="_CheckBlazorJSPath" AfterTargets="ResolveProjectReferences"> |
49 | 42 | <ItemGroup>
|
50 | 43 | <_MissingBlazorJSFile Include="@(_BlazorJSFile)" Condition="!EXISTS('%(_BlazorJSFile.FullPath)')" />
|
51 | 44 | <_MissingBlazorJSFile Include="@(_BlazorJSMapFile)" Condition="!EXISTS('%(_BlazorJSMapFile.FullPath)')" />
|
|
54 | 47 | <Error
|
55 | 48 | Condition="'@(_MissingBlazorJSFile)' != ''"
|
56 | 49 | Text="'%(_MissingBlazorJSFile.Identity)' does not exist. Run 'npm run build' in the repo root to generate the file." />
|
57 |
| - |
58 |
| - </Target> |
59 |
| - |
60 |
| - <Target Name="_GetFrameworkBuildAssets" Returns="@(ReferenceAsset)"> |
61 |
| - |
62 |
| - <ItemGroup> |
63 |
| - <_ReferenceAssetCandidates Include="@(_BlazorJSFile)" /> |
64 |
| - <_ReferenceAssetCandidates Include="@(_BlazorJSMapFile)" /> |
65 |
| - <_ReferenceAssetCandidates> |
66 |
| - <RelativePath>$(StaticWebAssetBasePath)\%(FileName)%(Extension)</RelativePath> |
67 |
| - <ContentRoot>$([System.IO.Path]::GetFullPath($([System.IO.Path]::GetDirectoryName('%(Identity)'))))</ContentRoot> |
68 |
| - </_ReferenceAssetCandidates> |
69 |
| - </ItemGroup> |
70 |
| - |
71 |
| - <DefineStaticWebAssets |
72 |
| - Condition="'@(_ReferenceAssetCandidates->Count())' != '0'" |
73 |
| - CandidateAssets="@(_ReferenceAssetCandidates)" |
74 |
| - SourceId="$(PackageId)" |
75 |
| - SourceType="Discovered" |
76 |
| - AssetKind="All" |
77 |
| - FingerprintCandidates="true" |
78 |
| - BasePath="$(StaticWebAssetBasePath)" |
79 |
| - > |
80 |
| - <Output TaskParameter="Assets" ItemName="ReferenceAsset" /> |
81 |
| - </DefineStaticWebAssets> |
82 |
| - |
83 |
| - <ItemGroup> |
84 |
| - <ReferenceAsset> |
85 |
| - <ResultType>StaticWebAsset</ResultType> |
86 |
| - </ReferenceAsset> |
87 |
| - </ItemGroup> |
88 |
| - |
89 |
| - </Target> |
90 |
| - |
91 |
| - <Target Name="_GenerateFrameworkPackItems" BeforeTargets="GenerateStaticWebAssetsPackFiles"> |
92 |
| - <ItemGroup> |
93 |
| - <_AssetCandidates Include="@(_BlazorJSFile)" /> |
94 |
| - <_AssetCandidates> |
95 |
| - <RelativePath>%(RecursiveDir)%(FileName)%(Extension)</RelativePath> |
96 |
| - <ContentRoot>$([System.IO.Path]::GetFullPath($([System.IO.Path]::GetDirectoryName('%(Identity)'))))</ContentRoot> |
97 |
| - </_AssetCandidates> |
98 |
| - |
99 |
| - <_DebugAssetCandidates Include="@(_BlazorJSMapFile)" /> |
100 |
| - <_DebugAssetCandidates> |
101 |
| - <RelativePath>%(RecursiveDir)%(FileName)%(Extension)</RelativePath> |
102 |
| - <ContentRoot>$([System.IO.Path]::GetFullPath($([System.IO.Path]::GetDirectoryName('%(Identity)'))))</ContentRoot> |
103 |
| - </_DebugAssetCandidates> |
104 |
| - </ItemGroup> |
105 |
| - |
106 |
| - <DefineStaticWebAssets |
107 |
| - Condition="'@(_AssetCandidates->Count())' != '0'" |
108 |
| - CandidateAssets="@(_AssetCandidates)" |
109 |
| - AssetKind="All" |
110 |
| - SourceId="$(PackageId)" |
111 |
| - SourceType="Discovered" |
112 |
| - FingerprintCandidates="true" |
113 |
| - BasePath="$(StaticWebAssetBasePath)" |
114 |
| - > |
115 |
| - <Output TaskParameter="Assets" ItemName="_FrameworkAssets" /> |
116 |
| - </DefineStaticWebAssets> |
117 |
| - |
118 |
| - <DefineStaticWebAssets |
119 |
| - Condition="'@(_DebugAssetCandidates->Count())' != '0'" |
120 |
| - CandidateAssets="@(_DebugAssetCandidates)" |
121 |
| - AssetKind="All" |
122 |
| - SourceId="$(PackageId)" |
123 |
| - SourceType="Discovered" |
124 |
| - FingerprintCandidates="true" |
125 |
| - BasePath="$(StaticWebAssetBasePath)" |
126 |
| - > |
127 |
| - <Output TaskParameter="Assets" ItemName="_DebugFrameworkAssets" /> |
128 |
| - </DefineStaticWebAssets> |
129 |
| - |
130 |
| - <DefineStaticWebAssetEndpoints |
131 |
| - Condition="'@(_FrameworkAssets)' != ''" |
132 |
| - CandidateAssets="@(_FrameworkAssets)" |
133 |
| - ExistingEndpoints="@()" |
134 |
| - ContentTypeMappings="@(StaticWebAssetContentTypeMapping)"> |
135 |
| - <Output TaskParameter="Endpoints" ItemName="_FrameworkAssetEndpoints" /> |
136 |
| - </DefineStaticWebAssetEndpoints> |
137 |
| - |
138 |
| - <DefineStaticWebAssetEndpoints |
139 |
| - Condition="'@(_DebugFrameworkAssets)' != ''" |
140 |
| - CandidateAssets="@(_DebugFrameworkAssets)" |
141 |
| - ExistingEndpoints="@()" |
142 |
| - ContentTypeMappings="@(StaticWebAssetContentTypeMapping)"> |
143 |
| - <Output TaskParameter="Endpoints" ItemName="_DebugFrameworkAssetEndpoints" /> |
144 |
| - </DefineStaticWebAssetEndpoints> |
145 |
| - |
146 |
| - <ComputeEndpointsForReferenceStaticWebAssets |
147 |
| - Assets="@(_FrameworkAssets)" |
148 |
| - CandidateEndpoints="@(_FrameworkAssetEndpoints)"> |
149 |
| - <Output TaskParameter="Endpoints" ItemName="_PackFrameworkAssetEndpoints" /> |
150 |
| - </ComputeEndpointsForReferenceStaticWebAssets> |
151 |
| - |
152 |
| - <ComputeEndpointsForReferenceStaticWebAssets |
153 |
| - Assets="@(_DebugFrameworkAssets)" |
154 |
| - CandidateEndpoints="@(_DebugFrameworkAssetEndpoints)"> |
155 |
| - <Output TaskParameter="Endpoints" ItemName="_PackDebugFrameworkAssetEndpoints" /> |
156 |
| - </ComputeEndpointsForReferenceStaticWebAssets> |
157 |
| - |
158 |
| - <GenerateStaticWebAssetsPropsFile |
159 |
| - StaticWebAssets="@(_FrameworkAssets)" |
160 |
| - PackagePathPrefix="staticwebassets" |
161 |
| - TargetPropsFilePath="$(IntermediateOutputPath)Assets.Pack.targets" /> |
162 |
| - |
163 |
| - <GenerateStaticWebAssetsPropsFile |
164 |
| - StaticWebAssets="@(_DebugFrameworkAssets)" |
165 |
| - PackagePathPrefix="staticwebassets" |
166 |
| - TargetPropsFilePath="$(IntermediateOutputPath)Assets.Pack.debug.targets" /> |
167 |
| - |
168 |
| - <GenerateStaticWebAssetEndpointsPropsFile |
169 |
| - StaticWebAssets="@(_FrameworkAssets)" |
170 |
| - StaticWebAssetEndpoints="@(_PackFrameworkAssetEndpoints)" |
171 |
| - TargetPropsFilePath="$(IntermediateOutputPath)Assets.Pack.endpoints.targets" /> |
172 |
| - |
173 |
| - <GenerateStaticWebAssetEndpointsPropsFile |
174 |
| - StaticWebAssets="@(_DebugFrameworkAssets)" |
175 |
| - StaticWebAssetEndpoints="@(_PackDebugFrameworkAssetEndpoints)" |
176 |
| - TargetPropsFilePath="$(IntermediateOutputPath)Assets.Pack.debug.endpoints.targets" /> |
177 |
| - |
178 |
| - <ComputeStaticWebAssetsTargetPaths Assets="@(_FrameworkAssets)" PathPrefix="staticwebassets" AdjustPathsForPack="true"> |
179 |
| - <Output TaskParameter="AssetsWithTargetPath" ItemName="_PackStaticWebAssetWithTargetPath" /> |
180 |
| - </ComputeStaticWebAssetsTargetPaths> |
181 |
| - <ComputeStaticWebAssetsTargetPaths Assets="@(_DebugFrameworkAssets)" PathPrefix="staticwebassets" AdjustPathsForPack="true"> |
182 |
| - <Output TaskParameter="AssetsWithTargetPath" ItemName="_PackStaticWebAssetWithTargetPath" /> |
183 |
| - </ComputeStaticWebAssetsTargetPaths> |
184 |
| - |
185 |
| - <ItemGroup> |
186 |
| - <StaticWebAssetPackageFile Include="$(IntermediateOutputPath)Assets.Pack.targets"> |
187 |
| - <PackagePath>build\Microsoft.AspNetCore.StaticWebAssets.targets</PackagePath> |
188 |
| - </StaticWebAssetPackageFile> |
189 |
| - <StaticWebAssetPackageFile Include="$(IntermediateOutputPath)Assets.Pack.endpoints.targets"> |
190 |
| - <PackagePath>build\Microsoft.AspNetCore.StaticWebAssets.endpoints.targets</PackagePath> |
191 |
| - </StaticWebAssetPackageFile> |
192 |
| - <StaticWebAssetPackageFile Include="$(IntermediateOutputPath)Assets.Pack.debug.targets"> |
193 |
| - <PackagePath>build\Microsoft.AspNetCore.StaticWebAssets.debug.targets</PackagePath> |
194 |
| - </StaticWebAssetPackageFile> |
195 |
| - <StaticWebAssetPackageFile Include="$(IntermediateOutputPath)Assets.Pack.debug.endpoints.targets"> |
196 |
| - <PackagePath>build\Microsoft.AspNetCore.StaticWebAssets.debug.endpoints.targets</PackagePath> |
197 |
| - </StaticWebAssetPackageFile> |
198 |
| - </ItemGroup> |
199 |
| - |
200 | 50 | </Target>
|
201 | 51 |
|
202 | 52 | </Project>
|
0 commit comments