简体   繁体   English

使用MsBuild编译C#6时遇到麻烦

[英]Having troubles compiling C# 6 using MsBuild

I need to compile a source code, I've contacted the creator of the code and he told me this: 我需要编译源代码,我已经联系了代码的创建者,他告诉我:

" You need the roslyn compiler, since it's written in C# 6.0. " 您需要roslyn编译器,因为它是用C#6.0编写的。

I've got the roslyn compiler and I can't manage to make it work and/or compile anything 我有roslyn编译器,我无法使其正常工作和/或编译任何东西

I've already tried to use MsBuild from VS 2015 but, unfortunally, w/out any success (as I get a lot of compiling errors) 我已经尝试从VS 2015使用MsBuild,但是不幸的是,没有任何成功(因为我得到了很多编译错误)

If you are wondering what I'm trying to compile,here's the github https://github.com/frostycpu/FinalesFunkeln 如果您想知道我要编译的内容,这里是github https://github.com/frostycpu/FinalesFunkeln

I hope we can find a solution :) 我希望我们能找到一个解决方案:)

Edit: Here's a screenshot of the console: 编辑:这是控制台的屏幕截图:

[ [ 屏幕截图 ] ]

I'm using the italian version of Windows, if you need translations ask me anything 我使用的是意大利语的Windows,如果您需要翻译,请问我什么

My guess is you have some piece of software on your machine that defined the "Platform" environment variable, "helpfully" setting it to "HPD". 我的猜测是,您的计算机上有一些软件定义了“平台”环境变量,“有帮助地”将其设置为“ HPD”。 MSBuild picks up that environment variable and is trying to build the HPD platform that is not defined in the solution. MSBuild选择该环境变量,并尝试构建该解决方案中未定义的HPD平台。

The workaround is to build with msbuild /p="Any CPU" . 解决方法是使用msbuild /p="Any CPU"进行构建。 You could also uninstall the software or delete the environment variable, with the obvious caveat that who knows what the software does without that. 您还可以卸载该软件或删除环境变量,这显然是谁知道该软件的功能的警告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM