执行briefcase dev,报错信息如下:
Unhandled Exception: System.TypeLoadException: Could not load type ‘System.Value
Tuple`3’ from assembly ‘mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyTok
en=b77a5c561934e089’.
at ClrLoader.DomainData…ctor(AppDomain domain)
at ClrLoader.ClrLoader.Initialize()
Unable to start application ‘helloworld’
Log saved to D:\briefcase.2023_07_07-14_07_49.dev.log
查询了一下,和.NET有关系,python调用.net最高只能使用3.8,我用的版本是3.7.
安装的.net版本是4.0. 查看python3.7和3.8的发布时间是2018年到2019年。 对应的.net版本是.net4.8.
win7系统安装4.8。net版本后,helloworld窗口弹了出来。
donet4.8版本下载地址:https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/thank-you/net48-web-installer
python启动briefcase dev代码:
import os
print(os.getcwd())
os.system("cd helloworld && start cmd.exe /k briefcase dev ")