为什么运行 Dafny 程序时出现问题?

问题描述 投票:0回答:1

何时运行 Dafny 程序

method Main(){

  print "hello World";
}

在 windows 中运行代码,单击 fn + F5 或 F5 查看此问题

E:\dafny>& "C:\Program Files\dotnet\dotnet.EXE" c:\Users\User\.vscode\extensions\dafny-lang.ide-vscode-3.0.8\out\resources\4.0.0\github\dafny\Dafny.dll run "e:\dafny\hello.dfy"
& was unexpected at this time.

但是当我从运行命令 She Sohwing 的第一个字符中删除 & 时,结果是正确的

E:\dafny>"C:\Program Files\dotnet\dotnet.EXE" c:\Users\User\.vscode\extensions\dafny-lang.ide-vscode-3.0.8\out\resources\4.0.0\github\dafny\Dafny.dll run "e:\dafny\hello.dfy"        

Dafny program verifier finished with 0 verified, 0 errors
hello World

单击 fn + F5 时如何显示秒命令而不是第一个“意味着命令运行时没有 &”?我不想手动编辑

运行该死的代码必须编辑运行 caommand

.net dafny
1个回答
0
投票

I Founded 解决方案 如果使用命令提示符 (cmd) 是终端,则将终端切换到 PowerShell。 现在可以单击 fn + F5 并使用 & 运行代码,但现在显示问题。 代码现在运行没有任何问题。

© www.soinside.com 2019 - 2024. All rights reserved.