名门娴妻,河北三佳购物招聘,中九卫星升级
春节放假回老家,没有把笔记本电脑带上,由于肺炎疫情的原因只能呆在家里,写的一个winform程序无法正常使用,需要及时修复,看我如何使用家里十年的台式机来调试修复 .net 应用程序。
winform程序无法正常使用的原因,主要是在解析html源代码的时候,找不到指定的节点导致的错误。
尝试安装vs code软件,发现安装完成运行后,打开界面一直处于黑屏状态,电脑非常卡,只能使用notepad++记事本修改代码。
msbuild 2015工具下载地址:
https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=48159
在安装msbuild的时候,需要先安装.net framework 4.5框架。
安装完成后,需要将目录添加到环境变量,我安装后的目录为:c:\program files\msbuild\14.0\bin
如何将目录添加到环境变量略。
首先,将源代码从github上面下载到本地,解压即可,如下图:
msbuild 文档地址:
https://docs.microsoft.com/zh-cn/visualstudio/msbuild/msbuild
尝试编译,代码如下:
msbuild.exe itsvse.csproj -property:configuration=debug
报错如下:
“c:\users\pi\downloads\itsvse\itsvse\itsvse.csproj”(默认 目标) (1) -> (corecompile 目标) -> form1.cs(13,7): error cs0246: the type or namespace name 'csharphttphelper' c ould not be found (are you missing a using directive or an assembly reference?) [c:\users\pi\downloads\itsvse\itsvse\itsvse.csproj] form1.cs(14,7): error cs0246: the type or namespace name 'newtonsoft' could n ot be found (are you missing a using directive or an assembly reference?) [c:\u sers\pi\downloads\itsvse\itsvse\itsvse.csproj] 6 个警告 2 个错误 已用时间 00:00:05.28
解决方案,将程序引用的 dll 复制到 /bin/debug 文件夹下面,重新编译即可,如下图:
可以正常打开编译后应用程序,然后通过写日志的方式一点点调试输出,使用notepad++记事本修改代码,重新编译程序,winform 程序即可正常运行。
原文地址:https://down.itsvse.com/k/0nomps.html
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Blazor server side 自家的一些开源的, 实用型项目的进度之 CEF客户端
.NET IoC模式依赖反转(DIP)、控制反转(Ioc)、依赖注入(DI)
vue+.netcore可支持业务代码扩展的开发框架 VOL.Vue 2.0版本发布
网友评论