|
40 | 40 | <_BlazorJSFilename Include="blazor.webassembly.js" /> |
41 | 41 |
|
42 | 42 | <_BlazorJSFile Include="@(_BlazorJSFilename->'$(_BlazorJSContentRoot)\%(Identity)')" /> |
| 43 | + <_BlazorJSMapFile Include="@(_BlazorJSFilename->'$(_BlazorJSContentRoot)\%(Identity).map')" /> |
43 | 44 | </ItemGroup> |
44 | 45 |
|
45 | 46 | <Target Name="_CheckBlazorJSPath" AfterTargets="ResolveProjectReferences"> |
46 | 47 |
|
47 | 48 | <ItemGroup> |
48 | 49 | <_MissingBlazorJSFile Include="@(_BlazorJSFile)" Condition="!EXISTS('%(_BlazorJSFile.FullPath)')" /> |
| 50 | + <_MissingBlazorJSMapFile Include="@(_BlazorJSMapFile)" Condition="!EXISTS('%(_BlazorJSMapFile.FullPath)')" /> |
| 51 | + |
| 52 | + <_AllMissingBlazorJSFiles Include="@(_MissingBlazorJSFile)" /> |
| 53 | + <_AllMissingBlazorJSFiles Include="@(_MissingBlazorJSMapFile)" /> |
49 | 54 | </ItemGroup> |
50 | 55 |
|
51 | 56 | <Warning |
52 | | - Condition="'@(_MissingBlazorJSFile)' != ''" |
53 | | - Text="'%(_MissingBlazorJSFile.Identity)' does not exist. Falling back to checked-in copy." /> |
| 57 | + Condition="'@(_AllMissingBlazorJSFiles)' != ''" |
| 58 | + Text="'%(_AllMissingBlazorJSFiles.Identity)' does not exist. Falling back to checked-in copy." /> |
54 | 59 |
|
55 | 60 | <ItemGroup> |
56 | 61 | <_BlazorJSFile Remove="@(_MissingBlazorJSFile)" /> |
57 | 62 | <_BlazorJSFile Include="@(_MissingBlazorJSFile->'..\..\Components\Web.JS\dist\Release\%(Filename)%(Extension)')" /> |
| 63 | + |
| 64 | + <_BlazorJSMapFile Remove="@(_MissingBlazorJSMapFile)" /> |
| 65 | + <_BlazorJSMapFile Include="@(_MissingBlazorJSMapFile->'..\..\Components\Web.JS\dist\Release\%(Filename)%(Extension)')" /> |
58 | 66 | </ItemGroup> |
59 | 67 |
|
60 | 68 | </Target> |
|
63 | 71 |
|
64 | 72 | <ItemGroup> |
65 | 73 | <_ReferenceAssetCandidates Include="@(_BlazorJSFile)" /> |
| 74 | + <_ReferenceAssetCandidates Include="@(_BlazorJSMapFile)" /> |
66 | 75 | <_ReferenceAssetCandidates> |
67 | 76 | <RelativePath>$(StaticWebAssetBasePath)/%(FileName)%(Extension)</RelativePath> |
68 | 77 | <ContentRoot>$([System.IO.Path]::GetFullPath($([System.IO.Path]::GetDirectoryName('%(Identity)'))))</ContentRoot> |
|
94 | 103 | <_AssetCandidates Include="@(_BlazorJSFile)" /> |
95 | 104 | <_AssetCandidates> |
96 | 105 | <RelativePath>%(RecursiveDir)%(FileName)%(Extension)</RelativePath> |
| 106 | + <ContentRoot>$([System.IO.Path]::GetFullPath($([System.IO.Path]::GetDirectoryName('%(Identity)'))))</ContentRoot> |
97 | 107 | </_AssetCandidates> |
| 108 | + |
| 109 | + <_DebugAssetCandidates Include="@(_BlazorJSMapFile)" /> |
| 110 | + <_DebugAssetCandidates> |
| 111 | + <RelativePath>%(RecursiveDir)%(FileName)%(Extension)</RelativePath> |
| 112 | + <ContentRoot>$([System.IO.Path]::GetFullPath($([System.IO.Path]::GetDirectoryName('%(Identity)'))))</ContentRoot> |
| 113 | + </_DebugAssetCandidates> |
98 | 114 | </ItemGroup> |
99 | 115 |
|
100 | 116 | <DefineStaticWebAssets |
101 | 117 | Condition="'@(_AssetCandidates->Count())' != '0'" |
102 | 118 | CandidateAssets="@(_AssetCandidates)" |
103 | | - ContentRoot="_framework" |
104 | 119 | AssetKind="All" |
105 | 120 | SourceId="$(PackageId)" |
106 | 121 | SourceType="Discovered" |
|
110 | 125 | <Output TaskParameter="Assets" ItemName="_FrameworkAssets" /> |
111 | 126 | </DefineStaticWebAssets> |
112 | 127 |
|
| 128 | + <DefineStaticWebAssets |
| 129 | + Condition="'@(_DebugAssetCandidates->Count())' != '0'" |
| 130 | + CandidateAssets="@(_DebugAssetCandidates)" |
| 131 | + AssetKind="All" |
| 132 | + SourceId="$(PackageId)" |
| 133 | + SourceType="Discovered" |
| 134 | + FingerprintCandidates="true" |
| 135 | + BasePath="$(StaticWebAssetBasePath)" |
| 136 | + > |
| 137 | + <Output TaskParameter="Assets" ItemName="_DebugFrameworkAssets" /> |
| 138 | + </DefineStaticWebAssets> |
| 139 | + |
113 | 140 | <DefineStaticWebAssetEndpoints |
114 | 141 | Condition="'@(_FrameworkAssets)' != ''" |
115 | 142 | CandidateAssets="@(_FrameworkAssets)" |
|
118 | 145 | <Output TaskParameter="Endpoints" ItemName="_FrameworkAssetEndpoints" /> |
119 | 146 | </DefineStaticWebAssetEndpoints> |
120 | 147 |
|
| 148 | + <DefineStaticWebAssetEndpoints |
| 149 | + Condition="'@(_DebugFrameworkAssets)' != ''" |
| 150 | + CandidateAssets="@(_DebugFrameworkAssets)" |
| 151 | + ExistingEndpoints="@()" |
| 152 | + ContentTypeMappings="@(StaticWebAssetContentTypeMapping)"> |
| 153 | + <Output TaskParameter="Endpoints" ItemName="_DebugFrameworkAssetEndpoints" /> |
| 154 | + </DefineStaticWebAssetEndpoints> |
| 155 | + |
121 | 156 | <ComputeEndpointsForReferenceStaticWebAssets |
122 | 157 | Assets="@(_FrameworkAssets)" |
123 | 158 | CandidateEndpoints="@(_FrameworkAssetEndpoints)"> |
124 | 159 | <Output TaskParameter="Endpoints" ItemName="_PackFrameworkAssetEndpoints" /> |
125 | 160 | </ComputeEndpointsForReferenceStaticWebAssets> |
126 | 161 |
|
| 162 | + <ComputeEndpointsForReferenceStaticWebAssets |
| 163 | + Assets="@(_DebugFrameworkAssets)" |
| 164 | + CandidateEndpoints="@(_DebugFrameworkAssetEndpoints)"> |
| 165 | + <Output TaskParameter="Endpoints" ItemName="_PackDebugFrameworkAssetEndpoints" /> |
| 166 | + </ComputeEndpointsForReferenceStaticWebAssets> |
| 167 | + |
127 | 168 | <GenerateStaticWebAssetsPropsFile |
128 | 169 | StaticWebAssets="@(_FrameworkAssets)" |
129 | 170 | PackagePathPrefix="staticwebassets" |
130 | | - TargetPropsFilePath="$(IntermediateOutputPath)StaticWebAssets.targets" /> |
| 171 | + TargetPropsFilePath="$(IntermediateOutputPath)Assets.Pack.targets" /> |
| 172 | + |
| 173 | + <GenerateStaticWebAssetsPropsFile |
| 174 | + StaticWebAssets="@(_DebugFrameworkAssets)" |
| 175 | + PackagePathPrefix="staticwebassets" |
| 176 | + TargetPropsFilePath="$(IntermediateOutputPath)Assets.Pack.debug.targets" /> |
131 | 177 |
|
132 | 178 | <GenerateStaticWebAssetEndpointsPropsFile |
133 | 179 | StaticWebAssets="@(_FrameworkAssets)" |
134 | 180 | StaticWebAssetEndpoints="@(_PackFrameworkAssetEndpoints)" |
135 | | - TargetPropsFilePath="$(IntermediateOutputPath)StaticWebAssets.endpoints.targets" /> |
| 181 | + TargetPropsFilePath="$(IntermediateOutputPath)Assets.Pack.endpoints.targets" /> |
| 182 | + |
| 183 | + <GenerateStaticWebAssetEndpointsPropsFile |
| 184 | + StaticWebAssets="@(_DebugFrameworkAssets)" |
| 185 | + StaticWebAssetEndpoints="@(_PackDebugFrameworkAssetEndpoints)" |
| 186 | + TargetPropsFilePath="$(IntermediateOutputPath)Assets.Pack.debug.endpoints.targets" /> |
136 | 187 |
|
137 | 188 | <ComputeStaticWebAssetsTargetPaths Assets="@(_FrameworkAssets)" PathPrefix="staticwebassets" AdjustPathsForPack="true"> |
138 | 189 | <Output TaskParameter="AssetsWithTargetPath" ItemName="_PackStaticWebAssetWithTargetPath" /> |
139 | 190 | </ComputeStaticWebAssetsTargetPaths> |
| 191 | + <ComputeStaticWebAssetsTargetPaths Assets="@(_DebugFrameworkAssets)" PathPrefix="staticwebassets" AdjustPathsForPack="true"> |
| 192 | + <Output TaskParameter="AssetsWithTargetPath" ItemName="_PackStaticWebAssetWithTargetPath" /> |
| 193 | + </ComputeStaticWebAssetsTargetPaths> |
140 | 194 |
|
141 | 195 | <ItemGroup> |
142 | | - <StaticWebAssetPackageFile Include="$(IntermediateOutputPath)StaticWebAssets.targets"> |
| 196 | + <StaticWebAssetPackageFile Include="$(IntermediateOutputPath)Assets.Pack.targets"> |
143 | 197 | <PackagePath>build\Microsoft.AspNetCore.StaticWebAssets.targets</PackagePath> |
144 | 198 | </StaticWebAssetPackageFile> |
145 | | - <StaticWebAssetPackageFile Include="$(IntermediateOutputPath)StaticWebAssets.endpoints.targets"> |
| 199 | + <StaticWebAssetPackageFile Include="$(IntermediateOutputPath)Assets.Pack.endpoints.targets"> |
146 | 200 | <PackagePath>build\Microsoft.AspNetCore.StaticWebAssets.endpoints.targets</PackagePath> |
147 | 201 | </StaticWebAssetPackageFile> |
| 202 | + <StaticWebAssetPackageFile Include="$(IntermediateOutputPath)Assets.Pack.debug.targets"> |
| 203 | + <PackagePath>build\Microsoft.AspNetCore.StaticWebAssets.debug.targets</PackagePath> |
| 204 | + </StaticWebAssetPackageFile> |
| 205 | + <StaticWebAssetPackageFile Include="$(IntermediateOutputPath)Assets.Pack.debug.endpoints.targets"> |
| 206 | + <PackagePath>build\Microsoft.AspNetCore.StaticWebAssets.debug.endpoints.targets</PackagePath> |
| 207 | + </StaticWebAssetPackageFile> |
148 | 208 | </ItemGroup> |
149 | 209 |
|
150 | 210 | </Target> |
|
0 commit comments