Open fforjan opened 3 months ago
@fforjan what do you mean by but if run from the binary folder
?
@jsturtevant
Execution with dotnet run
:
PS C:\git\wasmtime-dotnet\examples\consumefuel> dotnet run
Added 5000 units of fuel
Called an expensive function which consumed 1000 fuel. 3998 units of fuel remaining.
Called an expensive function which consumed 1000 fuel. 2996 units of fuel remaining.
Called an expensive function which consumed 1000 fuel. 1994 units of fuel remaining.
Called an expensive function which consumed 1000 fuel. 992 units of fuel remaining.
Calling the expensive function one more time, which will throw an exception.
Exception caught with the following message:
error while executing at wasm backtrace:
0: 0x36 - <unknown>!expensive
Caused by:
Arithmetic operation resulted in an overflow.
which is expected.
'local execution' :
PS C:\git\wasmtime-dotnet\examples\consumefuel\bin\Debug\net8.0> .\consumefuel.exe
Unhandled exception. System.IO.FileNotFoundException: Could not find file 'C:\git\wasmtime-dotnet\examples\consumefuel\bin\Debug\net8.0\consumefuel.wat'.
the file is missing because not in the active folder ?
if I was trying to debug from visual studio :
@jsturtevant let me know if you would like me to do anything on this
nothing yet, will get to taking a look at this and a few of the other PRs by end of the week. Thanks for the patience!
The different example would work if run via
dottest run
as the local folder would be the one containing the wat file but if run from the binary folder, it would fail as the file woudl be missing.This is fixing it.