使用最新的net6.0,在windows10上面运行一切正常,跑到windows7里面去初始化都会失败!
第一行代码就出错: keHuDuan.StartTime = DateTime.Now.ToLocalTime().ToString();
错误提示:system.typeinitializationexception: the type initialirer for system.datetime threw an exception
使用最新的net6.0,在windows10上面运行一切正常,跑到windows7里面去初始化都会失败!
第一行代码就出错: keHuDuan.StartTime = DateTime.Now.ToLocalTime().ToString();
错误提示:system.typeinitializationexception: the type initialirer for system.datetime threw an exception
找到原因了,是因为Windows7没有更新,将windows7更新后,就能正常运行了!