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

相关推荐
数据的世界015 分钟前
编程语言排行榜2025年11月
c#·.net
夕泠爱吃糖22 分钟前
template关键字
开发语言·c++·template
ceclar12325 分钟前
C++文件操作
开发语言·c++
高一要励志成为佬44 分钟前
【C++】vector的迭代器失效问题,(什么是迭代器失效,为什么会产生迭代器失效,怎么避免迭代器失效问题)
开发语言·c++
CaracalTiger1 小时前
本地部署 Stable Diffusion3.5!cpolar让远程访问很简单!
java·linux·运维·开发语言·python·微信·stable diffusion
whm27771 小时前
Visual Basic 创建状态栏
开发语言·visual studio
yongshao81 小时前
KUKA机械臂使用EthernetKRL配置与C#上位机实现TCP通讯
tcp/ip·机器人·c#·信息与通信
api_180079054602 小时前
【技术教程】Python/Node.js 调用拼多多商品详情 API 示例详解
大数据·开发语言·python·数据挖掘·node.js
郑州光合科技余经理2 小时前
乡镇外卖跑腿小程序开发实战:基于PHP的乡镇同城O2O
java·开发语言·javascript·spring cloud·uni-app·php·objective-c
@木辛梓2 小时前
指针,数组,变量
开发语言·c++·算法