当前位置: 移动技术网 > IT编程>开发语言>.net > 使用十年的电脑在家用记事本调试 .NET 程序

使用十年的电脑在家用记事本调试 .NET 程序

2020年03月09日  | 移动技术网IT编程  | 我要评论

名门娴妻,河北三佳购物招聘,中九卫星升级

引言

春节放假回老家,没有把笔记本电脑带上,由于肺炎疫情的原因只能呆在家里,写的一个winform程序无法正常使用,需要及时修复,看我如何使用家里十年的台式机来调试修复 .net 应用程序。

winform程序无法正常使用的原因,主要是在解析html源代码的时候,找不到指定的节点导致的错误。

开发环境

  • cpu:pentium(r) dual-core cpu e6300 @ 2.80ghz
  • 内存:2g
  • 系统:windows 7 家庭普通版

配置

开发工具

尝试安装vs code软件,发现安装完成运行后,打开界面一直处于黑屏状态,电脑非常卡,只能使用notepad++记事本修改代码。

  • msbuild
  • notepad++

msbuild 2015工具下载地址:

https://www.microsoft.com/zh-cn/download/confirmation.aspx?id=48159

在安装msbuild的时候,需要先安装.net framework 4.5框架。

msbuild

安装完成后,需要将目录添加到环境变量,我安装后的目录为: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

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网