[wasi] Sample: change net7.0 -> net8.0
authorAnkit Jain <radical@gmail.com>
Thu, 1 Dec 2022 22:51:00 +0000 (22:51 +0000)
committerAnkit Jain <radical@gmail.com>
Thu, 1 Dec 2022 22:51:00 +0000 (22:51 +0000)
This is temporary, and the whole sample is changing very soon with the
on-going wasi work.

src/mono/wasi/sample/Directory.Build.props
src/mono/wasi/sample/console/Makefile
src/mono/wasi/sample/console/WasiConsoleApp/WasiConsoleApp.csproj
src/mono/wasi/sample/console/main.c

index 69b70ee..cd84104 100644 (file)
@@ -3,6 +3,6 @@
 
     <PropertyGroup>
         <!-- WASI host applications need to grant access to specific disk paths, so ensure the output is within the current directory -->
-        <OutputPath>bin/$(Configuration)/net7.0</OutputPath>
+        <OutputPath>bin/$(Configuration)/$(NetCoreAppCurrent)</OutputPath>
     </PropertyGroup>
 </Project>
index b4d731f..c05eb4b 100644 (file)
@@ -1,7 +1,7 @@
 include ../../Makefile.variable
 include ../SampleMakefile.variable
 
-BIN_DIR=WasiConsoleApp/bin/Debug/net7.0
+BIN_DIR=WasiConsoleApp/bin/Debug/net8.0
 
 all: console.wasm $(BIN_DIR)/WasiConsoleApp.dll
 
index 2e57747..cae907a 100644 (file)
@@ -2,9 +2,10 @@
 
   <PropertyGroup>
     <OutputType>Exe</OutputType>
-    <TargetFramework>net7.0</TargetFramework>
+    <TargetFramework>net8.0</TargetFramework>
     <InvariantGlobalization>true</InvariantGlobalization>
     <DebugType>embedded</DebugType>
+    <UseAppHost>false</UseAppHost>
   </PropertyGroup>
 
 </Project>
index 8647c48..10e8ae9 100644 (file)
@@ -4,9 +4,9 @@
 int main() {
     // Assume the runtime pack has been copied into the output directory as 'runtime'
     // Otherwise we have to mount an unrelated part of the filesystem within the WASM environment
-    const char* app_base_dir = "./WasiConsoleApp/bin/Debug/net7.0";
+    const char* app_base_dir = "./WasiConsoleApp/bin/Debug/net8.0";
     char* assemblies_path;
-    asprintf(&assemblies_path, "%s:%s/runtime/native:%s/runtime/lib/net7.0", app_base_dir, app_base_dir, app_base_dir);
+    asprintf(&assemblies_path, "%s:%s/runtime/native:%s/runtime/lib/net8.0", app_base_dir, app_base_dir, app_base_dir);
 
     add_assembly(app_base_dir, "WasiConsoleApp.dll");
     mono_set_assemblies_path(assemblies_path);