vscode c#开发环境简单搭建

1,环境搭建:https://www.cnblogs.com/springsnow/p/12881499.html
2,nuget的使用:https://www.cnblogs.com/springsnow/p/12882696.html
3,netcore下Excel开发库EPPLUS
https://github.com/JanKallman/EPPlus/wiki/The-Sample-Project
4,解决EPPLUS的License问题:https://www.epplussoftware.com/Developers/LicenseException
ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
5,微软官方的excel work ppt等的操作库:Open XML SDK
https://docs.microsoft.com/en-us/office/open-xml/open-xml-sdk?view=openxml-2.8.1

6,使用Bitmap时,会提示Bitmap在System.Drawing里不存在,
解决办法:dotnet add package System.Drawing.Common --version 6.0.0

把做好的C#程序打包的命令:

dotnet publish --configuration Release -r win10-x64

-r win10-x64

加-r的目的:生成可以在win10,64位操作系统,直接执行的exe文件,不需要执行的机器安装net core的runtime。
不加的话,要想执行,则机器上必须安装net core的runtime

posted @ 2021-12-11 23:01  小石王  阅读(1168)  评论(0编辑  收藏  举报