linux – 使用monoxbuild编译VS2015应用程序时出现问题

linux – 使用monoxbuild编译VS2015应用程序时出现问题,第1张

概述我是编程新手,但不是 Linux的新手.我最近在C#中开始编程,我们使用Visual Studio 2015来编写应用程序,因此使用MSbuild来编译它们.但是,在家里我想用mono编译所有东西,但是当我尝试时我得到了几个错误并且它拒绝编译. 这是我运行的程序: $xbuild Dice_Game.sln 这是stderr: Errors:/home/dj/programs/c#_progr 我是编程新手,但不是 Linux的新手.我最近在C#中开始编程,我们使用Visual Studio 2015来编写应用程序,因此使用MSbuild来编译它们.但是,在家里我想用mono编译所有东西,但是当我尝试时我得到了几个错误并且它拒绝编译.
这是我运行的程序:

$xbuild Dice_Game.sln

这是stderr:

Errors:/home/dj/programs/c#_programs/Dice_Game/Dice_Game.sln (default targets)  ->(Build target) ->/home/dj/programs/c#_programs/Dice_Game/Dice_Game.csproj (default     targets) ->/usr/local/lib/mono/xbuild/12.0/bin/Microsoft.CSharp.targets     (CoreCompile target) ->CSC: error CS0518: The predefined type `System.Object' is not defined or importedCSC: error CS0518: The predefined type `System.ValueType' is not defined or importedCSC: error CS0518: The predefined type `System.Attribute' is not defined or importedCSC: error CS0518: The predefined type `system.int32' is not defined or importedCSC: error CS0518: The predefined type `System.UInt32' is not defined or importedCSC: error CS0518: The predefined type `system.int64' is not defined or importedCSC: error CS0518: The predefined type `System.UInt64' is not defined or importedCSC: error CS0518: The predefined type `System.Single' is not defined or importedCSC: error CS0518: The predefined type `System.Double' is not defined or importedCSC: error CS0518: The predefined type `System.Char' is not defined or importedCSC: error CS0518: The predefined type `system.int16' is not defined or importedCSC: error CS0518: The predefined type `System.Decimal' is not defined or importedCSC: error CS0518: The predefined type `System.Boolean' is not defined or importedCSC: error CS0518: The predefined type `System.SByte' is not defined or importedCSC: error CS0518: The predefined type `System.Byte' is not defined or importedCSC: error CS0518: The predefined type `System.UInt16' is not defined or importedCSC: error CS0518: The predefined type `System.String' is not defined or importedCSC: error CS0518: The predefined type `System.Enum' is not defined or importedCSC: error CS0518: The predefined type `System.Delegate' is not defined or importedCSC: error CS0518: The predefined type `System.MulticastDelegate' is not defined or importedCSC: error CS0518: The predefined type `System.VoID' is not defined or importedCSC: error CS0518: The predefined type `System.Array' is not defined or importedCSC: error CS0518: The predefined type `System.Type' is not defined or importedCSC: error CS0518: The predefined type `System.Collections.IEnumerator' is not defined or importedCSC: error CS0518: The predefined type `System.Collections.IEnumerable' is not defined or importedCSC: error CS0518: The predefined type `System.Idisposable' is not defined or importedCSC: error CS0518: The predefined type `system.intPtr' is not defined or importedCSC: error CS0518: The predefined type `System.UIntPtr' is not defined or importedCSC: error CS0518: The predefined type `System.RuntimeFIEldHandle' is not defined or importedCSC: error CS0518: The predefined type `System.RuntimeTypeHandle' is not defined or importedCSC: error CS0518: The predefined type `System.Exception' is not defined or imported 4 Warning(s) 31 Error(s)Time Elapsed 00:00:01.2374970

好像我可以做这个工作……我只是没有足够的经验与Mono使其工作.任何帮助,将不胜感激.

解决方法 请将项目的目标框架更改为.NET 4.5.

目前Mono不支持.NET 4.5.1及更高版本.

总结

以上是内存溢出为你收集整理的linux – 使用mono / xbuild编译VS2015应用程序时出现问题全部内容,希望文章能够帮你解决linux – 使用mono / xbuild编译VS2015应用程序时出现问题所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1018136.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存