ubuntu vscode c# 一些编程问题解决 (ubuntu vscode c# some programming error solutions)

 

本人电脑是 DELL Inspiron 3670, 系统装的是ubuntu18.04, c# 编程环境是 Visual Studio Code 1.41.1

在用vscode运行c#的过程中遇到了以下问题:

 

问题1. " The process cannot access the file 'bin/Debug/netcoreapp2.2/program1.pdb' because it is being used by another process. "

解决方法: 找了许多答案都不适用, 最后认真审题, 找到 bin/Debug/netcoreapp2.2 文件夹下的 program1.pdb 文件, 然后删除它, 重新编译代码, 问题就解决了......

 

问题2.  "The type initializer for 'Gdip' threw an exception.Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibgdiplus: cannot open shared object file: No such file or directory"

解决方法: 查了资料说安装好libc6-dev就一定搞定,所以我就输入  sudo apt-get install -y libc6-dev, 但是发现已经安装还是不行, 继续查找资料, 发现有提示说要安装libgdiplus, 所以我再次输入 sudo apt-get install -y libgdiplus, 结果就成功了.

posted @ 2020-01-21 11:17  ttweixiao9999  阅读(444)  评论(0编辑  收藏  举报