xmake icon indicating copy to clipboard operation
xmake copied to clipboard

支持 Windows 上的 .NET 项目 / Support .NET project on Windows

Open WhiredPlanck opened this issue 1 year ago • 4 comments

你在什么场景下需要该功能?

最近开始尝试将一些有些历史的 Win32 程序用 .NET Framework 翻新。具体的原项目在不久前加入了 xmake 构建支持,但苦于 xmake 目前不直接支持 .NET 项目,只能手写类似打包的方式构建.

描述可能的解决方案

已知 CMake 自 3.8 版本起引入了 CSharpUtilities 方便设置项目相关属性, 以及有第三方示例。不过 CMake 是“构建系统的构建系统”,实质上是生成了 .csproj 来构建的,这和 xmake 期望的“直接描述”方式有所不同,仅供参考。同样使用 Lua 语言的 Premake 似乎也支持类似方式,不过它的文档不甚清晰。

描述你认为的候选方案

No response

其他信息

No response

WhiredPlanck avatar Jan 11 '25 02:01 WhiredPlanck

Bot detected the issue body's language is not English, translate it automatically.


Title: Support .NET project on Windows / Support .NET project on Windows

Issues-translate-bot avatar Jan 11 '25 02:01 Issues-translate-bot

dotnet 在 win/mac/linux 上,用了不同的工具链,差异比较大,单 win 上对 csc.exe 的支持,估计就有不少工作量,暂时没时间搞。有兴趣的话,可以直接提 pr 过来。

先前有个 pr 不过实现方式有问题,没用 csc 而是走了 project generator https://github.com/xmake-io/xmake/pull/4510

waruqi avatar Jan 11 '25 15:01 waruqi

dotnet 在 win/mac/linux 上,用了不同的工具链,差异比较大,单 win 上对 csc.exe 的支持,估计就有不少工作量,暂时没时间搞。有兴趣的话,可以直接提 pr 过来。

先前有个 pr 不过实现方式有问题,没用 csc 而是走了 project generator #4510

明白。

WhiredPlanck avatar Jan 12 '25 04:01 WhiredPlanck

Bot detected the issue body's language is not English, translate it automatically.


dotnet uses different tool chains on win/mac/linux, and the differences are quite large. The support for csc.exe on win alone is probably a lot of work, and I don’t have time to do it yet. If you are interested, you can submit a PR directly.

There was a PR before, but there was a problem with the implementation. Instead of using csc, I used project generator #4510

clear.

Issues-translate-bot avatar Jan 12 '25 04:01 Issues-translate-bot