Skip to content

Commit

Permalink
[wasm] Remove runtimeconfig.template.json from templates and provide …
Browse files Browse the repository at this point in the history
…it by default (dotnet#102818)
  • Loading branch information
maraf committed Jun 4, 2024
1 parent c1d6262 commit db5e98d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<PackageFile Include="$(WasmProjectRoot)build\WasmApp.Common.targets" TargetPath="Sdk" />

<PackageFile Include="$(WasiProjectRoot)build\WasiSdk.Defaults.props" TargetPath="Sdk" />

<PackageFile Include="$(WasiProjectRoot)build\wasiconsole.runtimeconfig.template.json" TargetPath="Sdk" />
</ItemGroup>

<Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ItemGroup>
<ProjectReference Include="$(RepoTasksDir)Microsoft.NET.Sdk.WebAssembly.Pack.Tasks\Microsoft.NET.Sdk.WebAssembly.Pack.Tasks.csproj" />
<ProjectReference Include="$(WasmProjectRoot)host\WasmAppHost.csproj" />
<PackageFile Include="build\*.props;build\*.targets;build\*.web.config" TargetPath="build" />
<PackageFile Include="build\*.props;build\*.targets;build\*.web.config;build\*.json" TargetPath="build" />
</ItemGroup>

<Target Name="_PrepareForPack" BeforeTargets="GetPackageFiles">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,12 @@ Copyright (c) .NET Foundation. All rights reserved.

</Target>

<Target Name="ProvideDefaultUserRuntimeConfig" BeforeTargets="_GenerateRuntimeConfigurationFilesInputCache" Condition="'$(GenerateRuntimeConfigurationFiles)' == 'true'">
<PropertyGroup Condition="!Exists('$(UserRuntimeConfig)')">
<UserRuntimeConfig>$(MSBuildThisFileDirectory)browser.runtimeconfig.template.json</UserRuntimeConfig>
</PropertyGroup>
</Target>

<!-- Publish starts here -->

<!-- Make sure that ResolveAssemblyReferences runs early enough to ensure satellite assemblies are populated in the ResolvedFilesToPublish -->
Expand Down
6 changes: 6 additions & 0 deletions src/mono/wasi/build/WasiApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -455,5 +455,11 @@ wasi.start(instance);
<Exec Condition="'$(OS)' != 'Windows_NT'" Command="chmod a+x &quot;$(_WasmNodeScriptPath)&quot;" />
</Target>

<Target Name="ProvideDefaultUserRuntimeConfig" BeforeTargets="_GenerateRuntimeConfigurationFilesInputCache" Condition="'$(GenerateRuntimeConfigurationFiles)' == 'true'">
<PropertyGroup Condition="!Exists('$(UserRuntimeConfig)')">
<UserRuntimeConfig>$(MSBuildThisFileDirectory)wasiconsole.runtimeconfig.template.json</UserRuntimeConfig>
</PropertyGroup>
</Target>

<!--<Target Name="_WasmCalculateInitialHeapSize" />-->
</Project>

0 comments on commit db5e98d

Please sign in to comment.