Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
modified initial .csproj file
  • Loading branch information
Stefan Pahontu committed Jul 18, 2022
commit daab5234fb273537bb18d2623591913c44cdca9b
1 change: 0 additions & 1 deletion src/mono/wasm/templates/templates/console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ internal static string Greeting()

[JSImport("node.process.version")]
internal static partial string GetNodeVersion();

}
29 changes: 15 additions & 14 deletions src/mono/wasm/templates/templates/console/console.0.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetArchitecture>wasm</TargetArchitecture>
<TargetOS>browser</TargetOS>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<UseMonoRuntime>true</UseMonoRuntime>
<WasmMainJSPath>main.mjs</WasmMainJSPath>
<OutputType>Exe</OutputType>
<PublishTrimmed>true</PublishTrimmed>
<WasmEmitSymbolMap Condition="'$(RunAOTCompilation)' != 'true'">true</WasmEmitSymbolMap>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetArchitecture>wasm</TargetArchitecture>
<TargetOS>browser</TargetOS>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<UseMonoRuntime>true</UseMonoRuntime>
<WasmMainJSPath>main.mjs</WasmMainJSPath>
<OutputType>Exe</OutputType>
<PublishTrimmed>true</PublishTrimmed>
<WasmEmitSymbolMap Condition="'$(RunAOTCompilation)' != 'true'">true</WasmEmitSymbolMap>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<WasmExtraFilesToDeploy Include="app-support.mjs" />
</ItemGroup>
<ItemGroup>
<WasmExtraFilesToDeploy Include="app-support.mjs" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/mono/wasm/templates/templates/console/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ App.main = async function (applicationArguments) {
}
};

const exports = await App.MONO.mono_wasm_get_assembly_exports("console.dll");
const exports = await App.MONO.mono_wasm_get_assembly_exports("console.0.dll");
const text = exports.MyClass.Greeting();
console.log(text);

await App.MONO.mono_run_main("console.dll", applicationArguments);
await App.MONO.mono_run_main("console.0.dll", applicationArguments);
}