C#-CSC编译环境搭建

一.Microsoft .NET Framework

确保系统中安装Microsoft .NET Framework相关版本
下载 .NET Framework 4.7 | 免费官方下载 (microsoft.com)https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/net47

二.编译环境搭建

已经集成编译工具csc.exe,归档至gitcode,实现user32.dll弹框功能.

霸王•吕布 / MinCSharpCompiler · GitCodehttps://gitcode.net/qq_35829452/mincsharpcompiler

三.调用外部dll

编译命令:csc /reference:user32.dll /out:HelloWorld.exe

代码添加Dllimport调用C/C++方法

DllImport("user32.dll", EntryPoint="MessageBoxA")

public static extern int MsgBox(int hWnd, string msg, string caption, int type);

四.查看已经assemble的dll库

C:\Windows\assembly可查看所有装载的.NET依赖库,如文件输入输出等常用API

相关推荐
_Voosk1 分钟前
写了个开头的 C++ Tutorial
开发语言·c++
larance5 分钟前
使用setuptools 打包python 模块
开发语言·python
树下水月6 分钟前
下载PHP 的历史版本
开发语言·php
繁星蓝雨6 分钟前
Qt优雅的组织项目结构一(使用pri进行模块化配置)——————附带详细示例代码
开发语言·qt·pri
喜欢流萤吖~9 分钟前
JSP 内置对象解析:功能、作用域与常用方法
java·开发语言
weixin_3077791312 分钟前
Jenkins Token Macro 插件:宏扩展的基石
开发语言·ci/cd·架构·自动化·jenkins
龘龍龙13 分钟前
Python基础学习(二)
开发语言·python·学习
ldmd28413 分钟前
Go语言实战:应用篇-1:项目基础架构介绍
开发语言·后端·golang
froginwe1116 分钟前
PHP 表单 - 必需字段
开发语言