|  | 
| 125 | 125 |       _ReadWasmProps; | 
| 126 | 126 |       _SetWasmBuildNativeDefaults; | 
| 127 | 127 |       _GetDefaultWasmAssembliesToBundle; | 
| 128 |  | -      _WasmGetRuntimeConfigPath; | 
| 129 | 128 |     </PrepareInputsForWasmBuildDependsOn> | 
| 130 | 129 | 
 | 
| 131 | 130 |     <WasmGenerateAppBundleDependsOn> | 
| 132 | 131 |       $(WasmGenerateAppBundleDependsOn); | 
| 133 |  | -      _WasmGenerateRuntimeConfig; | 
| 134 | 132 |     </WasmGenerateAppBundleDependsOn> | 
| 135 | 133 | 
 | 
| 136 | 134 |     <!-- FIXME: TMP: added _PrepareForWasmBuildNative as it used by emsdk cache as beforeTargets --> | 
|  | 
| 152 | 150 |       _WasmSelectRuntimeComponentsForLinking; | 
| 153 | 151 |       _WasmCompileAssemblyBitCodeFilesForAOT; | 
| 154 | 152 |       _WasmCalculateInitialHeapSizeFromBitcodeFiles; | 
| 155 |  | -      _WasmGenerateRuntimeConfig; | 
| 156 | 153 |       _WasmWriteRspForCompilingNativeSourceFiles; | 
| 157 | 154 |       _WasmCompileNativeSourceFiles; | 
| 158 | 155 |       _GenerateObjectFilesForSingleFileBundle; | 
|  | 
| 350 | 347 |     </ItemGroup> | 
| 351 | 348 |   </Target> | 
| 352 | 349 | 
 | 
| 353 |  | -  <Target Name="_WasmGetRuntimeConfigPath"> | 
| 354 |  | -    <PropertyGroup> | 
| 355 |  | -      <_MainAssemblyPath Condition="'%(WasmAssembliesToBundle.FileName)' == '$(AssemblyName)' and '%(WasmAssembliesToBundle.Extension)' == '.dll' and $(WasmGenerateAppBundle) == 'true'">%(WasmAssembliesToBundle.Identity)</_MainAssemblyPath> | 
| 356 |  | -      <_WasmRuntimeConfigFilePath Condition="'$(_WasmRuntimeConfigFilePath)' == '' and $(_MainAssemblyPath) != ''">$([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json'))</_WasmRuntimeConfigFilePath> | 
| 357 |  | -      <_ParsedRuntimeConfigFilePath Condition="'$(_WasmRuntimeConfigFilePath)' != ''">$([System.IO.Path]::GetDirectoryName($(_WasmRuntimeConfigFilePath)))\runtimeconfig.bin</_ParsedRuntimeConfigFilePath> | 
| 358 |  | -    </PropertyGroup> | 
| 359 |  | -  </Target> | 
| 360 |  | - | 
| 361 | 350 |   <Target Name="_WasmResolveReferences" Condition="'$(WasmResolveAssembliesBeforeBuild)' == 'true'" Returns="@(_WasmAssembliesInternal)"> | 
| 362 | 351 |     <WasmLoadAssembliesAndReferences | 
| 363 | 352 |       Assemblies="@(_WasmAssembliesInternal)" | 
|  | 
| 380 | 369 |              Text="Could not find %24(AssemblyName)=$(AssemblyName).dll in the assemblies to be bundled." | 
| 381 | 370 |              Importance="Low" /> | 
| 382 | 371 | 
 | 
| 383 |  | -    <Message Condition="'$(WasmGenerateAppBundle)' == 'true' and $(_WasmRuntimeConfigFilePath) != '' and !Exists($(_WasmRuntimeConfigFilePath))" | 
| 384 |  | -             Text="Could not find $(_WasmRuntimeConfigFilePath) for $(_MainAssemblyPath)." | 
|  | 372 | +    <Message Condition="'$(WasmGenerateAppBundle)' == 'true' and $(ProjectRuntimeConfigFilePath) != '' and !Exists($(ProjectRuntimeConfigFilePath))" | 
|  | 373 | +             Text="Could not find $(ProjectRuntimeConfigFilePath) for $(_MainAssemblyPath)." | 
| 385 | 374 |              Importance="Low" /> | 
| 386 | 375 | 
 | 
| 387 | 376 |     <ItemGroup> | 
|  | 
| 427 | 416 | 
 | 
| 428 | 417 |   <Target Name="WasmGenerateAppBundle" DependsOnTargets="$(WasmGenerateAppBundleDependsOn)" Condition="'$(WasmGenerateAppBundle)' == 'true'" /> | 
| 429 | 418 | 
 | 
| 430 |  | -  <Target Name="_WasmGenerateRuntimeConfig" | 
| 431 |  | -          Inputs="$(_WasmRuntimeConfigFilePath)" | 
| 432 |  | -          Outputs="$(_ParsedRuntimeConfigFilePath)" | 
| 433 |  | -          Condition="Exists('$(_WasmRuntimeConfigFilePath)')"> | 
| 434 |  | -    <ItemGroup> | 
| 435 |  | -      <_RuntimeConfigReservedProperties Include="RUNTIME_IDENTIFIER"/> | 
| 436 |  | -      <_RuntimeConfigReservedProperties Include="APP_CONTEXT_BASE_DIRECTORY"/> | 
| 437 |  | -    </ItemGroup> | 
| 438 |  | - | 
| 439 |  | -    <RuntimeConfigParserTask | 
| 440 |  | -        RuntimeConfigFile="$(_WasmRuntimeConfigFilePath)" | 
| 441 |  | -        OutputFile="$(_ParsedRuntimeConfigFilePath)" | 
| 442 |  | -        RuntimeConfigReservedProperties="@(_RuntimeConfigReservedProperties)"> | 
| 443 |  | -    </RuntimeConfigParserTask> | 
| 444 |  | - | 
| 445 |  | -    <ItemGroup> | 
| 446 |  | -      <WasmFilesToIncludeInFileSystem Condition="'$(WasmSingleFileBundle)' != 'true'" Include="$(_ParsedRuntimeConfigFilePath)" LoadingStage="Core" /> | 
| 447 |  | -    </ItemGroup> | 
| 448 |  | -  </Target> | 
| 449 |  | - | 
| 450 | 419 |   <Target Name="WasmTriggerPublishApp" | 
| 451 | 420 |           AfterTargets="$(WasmTriggerPublishAppAfterThisTarget)" | 
| 452 | 421 |           Condition="('$(IsBrowserWasmProject)' == 'true' or '$(IsWasiProject)' == 'true') and '$(WasmBuildingForNestedPublish)' != 'true' and '$(IsCrossTargetingBuild)' != 'true'"> | 
|  | 
| 482 | 451 |     </ItemGroup> | 
| 483 | 452 |   </Target> | 
| 484 | 453 | 
 | 
| 485 |  | -  <Target Name="_PrepareForNestedPublish" DependsOnTargets="_GetDefaultWasmAssembliesToBundle" Condition="'$(WasmBuildingForNestedPublish)' == 'true'"> | 
| 486 |  | -    <PropertyGroup> | 
| 487 |  | -      <_WasmRuntimeConfigFilePath Condition="$([System.String]::new(%(PublishItemsOutputGroupOutputs.Identity)).EndsWith('$(AssemblyName).runtimeconfig.json'))">@(PublishItemsOutputGroupOutputs)</_WasmRuntimeConfigFilePath> | 
| 488 |  | -    </PropertyGroup> | 
| 489 |  | - | 
| 490 |  | -    <PropertyGroup Condition="'$(_WasmRuntimeConfigFilePath)' == ''"> | 
| 491 |  | -      <_WasmRuntimeConfigFilePath Condition="$([System.String]::new(%(PublishItemsOutputGroupOutputs.Identity)).EndsWith('$(AssemblyName).runtimeconfig.json'))">@(PublishItemsOutputGroupOutputs)</_WasmRuntimeConfigFilePath> | 
| 492 |  | -    </PropertyGroup> | 
| 493 |  | -  </Target> | 
| 494 |  | - | 
| 495 | 454 |   <Target Name="_EmitWasmAssembliesFinal" Returns="@(WasmAssembliesFinal)"> | 
| 496 | 455 |     <ItemGroup> | 
| 497 | 456 |       <WasmAssembliesFinal Include="@(_WasmAssembliesInternal)" LlvmBitCodeFile="" /> | 
|  | 
0 commit comments