Skip to content

Commit cfedf56

Browse files
committed
try different approach
Signed-off-by: James Sturtevant <[email protected]>
1 parent ec32087 commit cfedf56

File tree

8 files changed

+20
-12
lines changed

8 files changed

+20
-12
lines changed

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<PackageVersion Include="runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM" Version="10.0.0-alpha.1.24525.6" />
99

1010
<!-- Tests -->
11-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
12-
<PackageVersion Include="xunit" Version="2.4.2" />
13-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
11+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
12+
<PackageVersion Include="xunit" Version="2.9.2" />
13+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
1414
</ItemGroup>
1515
</Project>

samples/calculator/CalculatorComposed/CalculatorComposed.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
<PropertyGroup>
1010
<TargetFramework>net8.0</TargetFramework>
11+
<RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>
12+
<IlcExportUnmanagedEntrypoints>true</IlcExportUnmanagedEntrypoints>
13+
<PublishTrimmed>false</PublishTrimmed>
1114
</PropertyGroup>
1215

1316
<ItemGroup>

samples/calculator/CalculatorHost/CalculatorHost.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<InvariantGlobalization>true</InvariantGlobalization>
1313
<RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>
1414
<IlcExportUnmanagedEntrypoints>true</IlcExportUnmanagedEntrypoints>
15+
<WasmSingleFileBundle>true</WasmSingleFileBundle>
16+
<WasmBuildNative>true</WasmBuildNative>
17+
<SelfContained>true</SelfContained>
1518
</PropertyGroup>
1619

1720
<ItemGroup>

src/WasmComponent.Sdk/WasmComponent.Sdk.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
2+
<Import Project="build\BytecodeAlliance.Componentize.DotNet.Wasm.SDK.props" />
33
<PropertyGroup>
44
<PackageId>BytecodeAlliance.Componentize.DotNet.Wasm.SDK</PackageId>
55
<Authors>Bytecode Alliance Developers</Authors>
@@ -40,6 +40,12 @@
4040
<Target Name="BuildOrDownloadNativeTooling" BeforeTargets="Build" DependsOnTargets="BuildNativeTooling; DownloadNativeTooling;">
4141
</Target>
4242

43+
<ItemGroup>
44+
<PackageReference Include="Microsoft.DotNet.ILCompiler.LLVM" PrivateAssets="None" />
45+
<PackageReference Condition="$([MSBuild]::IsOSPlatform('Windows'))" Include="runtime.win-x64.Microsoft.DotNet.ILCompiler.LLVM" PrivateAssets="None" />
46+
<PackageReference Condition="$([MSBuild]::IsOSPlatform('Linux'))" Include="runtime.linux-x64.Microsoft.DotNet.ILCompiler.LLVM" PrivateAssets="None" />
47+
</ItemGroup>
48+
4349
<Target Name="BuildNativeTooling" Condition="'$(BuildWasmToolsLocally)' == 'true'">
4450
<Exec Command="cargo build --release" WorkingDirectory="$(WasmToolsModuleRoot)" />
4551

src/WasmComponent.Sdk/build/BytecodeAlliance.Componentize.DotNet.Wasm.SDK.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,4 @@
1212
<WasmToolsExe Condition="$([MSBuild]::IsOSPlatform('Windows'))">$(WasmToolsExe).exe</WasmToolsExe>
1313
</PropertyGroup>
1414

15-
<ItemGroup>
16-
<PackageReference Include="Microsoft.DotNet.ILCompiler.LLVM" PrivateAssets="None" />
17-
<PackageReference Include="runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM" PrivateAssets="None" />
18-
</ItemGroup>
1915
</Project>

test/E2ETest/PackageTest/PackageTest.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
<RemoveDir Directories="$(NugetPackageRoot)\bytecodealliance.componentize.dotnet.witbindgen\$(PackageVersion)" />
3838
<RemoveDir Directories="..\testapps\E2EProducer\obj" />
3939
<RemoveDir Directories="..\testapps\E2EConsumer\obj" />
40-
<Exec Command="dotnet restore --no-cache" WorkingDirectory="..\testapps\E2EConsumer" />
41-
<Exec Command="dotnet build --no-restore /bl" WorkingDirectory="..\testapps\E2EConsumer" />
40+
<Exec Command="dotnet publish /bl" WorkingDirectory="..\testapps\E2EProducer" />
41+
<Exec Command="dotnet publish /bl" WorkingDirectory="..\testapps\E2EConsumer" />
4242
</Target>
4343

4444
<Target Name="PackPackagesForE2ETest">

test/E2ETest/testapps/E2EConsumer/E2EConsumer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</ItemGroup>
2929

3030
<!-- After build, create the composed component so it can be executed in the test -->
31-
<Target Name="ComposeWasmComponent" AfterTargets="AfterBuild">
31+
<Target Name="ComposeWasmComponent" AfterTargets="LinkNativeLlvm">
3232
<PropertyGroup>
3333
<DependencyComponent>../E2EProducer/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/e2eproducer.wasm</DependencyComponent>
3434
</PropertyGroup>

test/WasmComponentSdkTest/testapps/SimpleConsumer/SimpleConsumer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</ItemGroup>
2727

2828
<!-- After build, create the composed component so it can be executed in the test -->
29-
<Target Name="ComposeWasmComponent" AfterTargets="AfterBuild">
29+
<Target Name="ComposeWasmComponent" AfterTargets="LinkNativeLlvm">
3030
<PropertyGroup>
3131
<DependencyComponent>../SimpleProducer/bin/$(Configuration)/$(TargetFramework)/wasi-wasm/native/simpleproducer.wasm</DependencyComponent>
3232
</PropertyGroup>

0 commit comments

Comments
 (0)