首页 新闻 会员 周边 捐助

MONO6.4.0.198编译windows下.netframework版本为4.5.2的winform报错,求解该如何办,

0
[待解决问题]

[root@localhost EShoe-CommService]# mcs -r:System.Windows.Forms.dll -r:System.Threading.Tasks.dll -r:System.Data.Linq.dll -r:System.IO.dll -r:Newtonsoft.Json.dll -r:System.Net.Http.dll -r:System.Net.dll -r:System.IO.dll -r:System.Configuration.dll -r:System.Data.SqlClient.dll -r:System.Data.dll -r:System.Drawing.dll -r:System.Reflection.dll -r:Microsoft.Owin.Hosting.dll -r:System.ComponentModel.dll -r:Owin.dll -r:Microsoft.Owin.Cors.dll -r:Microsoft.AspNet.SignalR.Core.dll -r:System.Net.Sockets.dll -r:System.Xml.dll -t:winexe AboutBoxEShoe.cs ClassBusinessProcess.cs ClassCommToDev.cs ClassWebServerCommServer.cs FormLogin.cs FormMain.cs GlobalVariables.cs HttpApiServer.cs HttpClientHelper.cs Program.cs
AboutBoxEShoe.cs(16,13): error CS0103: The name InitializeComponent' does not exist in the current context AboutBoxEShoe.cs(18,18): error CS1061: Type EShoeCommService.AboutBoxEShoe' does not contain a definition for labelProductName' and no extension method labelProductName' of type EShoeCommService.AboutBoxEShoe' could be found. Are you missing an assembly reference? AboutBoxEShoe.cs(12,19): (Location of the symbol related to previous error) AboutBoxEShoe.cs(19,18): error CS1061: Type EShoeCommService.AboutBoxEShoe' does not contain a definition for labelVersion' and no extension method labelVersion' of type EShoeCommService.AboutBoxEShoe' could be found. Are you missing an assembly reference? AboutBoxEShoe.cs(12,19): (Location of the symbol related to previous error) AboutBoxEShoe.cs(20,18): error CS1061: Type EShoeCommService.AboutBoxEShoe' does not contain a definition for labelCopyright' and no extension method labelCopyright' of type EShoeCommService.AboutBoxEShoe' could be found. Are you missing an assembly reference? AboutBoxEShoe.cs(12,19): (Location of the symbol related to previous error) AboutBoxEShoe.cs(21,18): error CS1061: Type EShoeCommService.AboutBoxEShoe' does not contain a definition for labelCompanyName' and no extension method labelCompanyName' of type EShoeCommService.AboutBoxEShoe' could be found. Are you missing an assembly reference? AboutBoxEShoe.cs(12,19): (Location of the symbol related to previous error) AboutBoxEShoe.cs(22,18): error CS1061: Type EShoeCommService.AboutBoxEShoe' does not contain a definition for textBoxDescription' and no extension method textBoxDescription' of type EShoeCommService.AboutBoxEShoe' could be found. Are you missing an assembly reference? AboutBoxEShoe.cs(12,19): (Location of the symbol related to previous error) ClassCommToDev.cs(297,32): error CS1061: Type EShoeCommService.FormMain' does not contain a definition for checkBoxDispReport' and no extension method checkBoxDispReport' of type EShoeCommService.FormMain' could be found. Are you missing an assembly reference? FormMain.cs(21,26): (Location of the symbol related to previous error) ClassCommToDev.cs(710,28): error CS1061: Type EShoeCommService.FormMain' does not contain a definition for checkBoxDispReport' and no extension method checkBoxDispReport' of type EShoeCommService.FormMain' could be found. Are you missing an assembly reference? FormMain.cs(21,26): (Location of the symbol related to previous error) ClassWebServerCommServer.cs(85,30): error CS1061: Type EShoeCommService.FormMain' does not contain a definition for checkBoxDispReport' and no extension method checkBoxDispReport' of type EShoeCommService.FormMain' could be found. Are you missing an assembly reference? FormMain.cs(21,26): (Location of the symbol related to previous error) FormLogin.cs(18,13): error CS0103: The name InitializeComponent' does not exist in the current context
FormLogin.cs(25,18): error CS1061: Type EShoeCommService.FormLogin' does not contain a definition for account_workerTableAdapter' and no extension method account_workerTableAdapter' of type EShoeCommService.FormLogin' could be found. Are you missing an assembly reference?
FormLogin.cs(13,26): (Location of the symbol related to previous error)
FormLogin.cs(31,90): error CS0103: The name comboBoxWorker' does not exist in the current context FormLogin.cs(38,17): error CS0103: The name textBoxPassword' does not exist in the current context
FormMain.cs(76,55): error CS0234: The type or namespace name Properties' does not exist in the namespace EShoeCommService'. Are you missing an assembly reference?
FormMain.cs(79,13): error CS0103: The name InitializeComponent' does not exist in the current context FormMain.cs(218,16): error CS0103: The name richTextBoxMessage' does not exist in the current context
FormMain.cs(220,17): error CS0103: The name richTextBoxMessage' does not exist in the current context FormMain.cs(221,17): error CS0103: The name richTextBoxMessage' does not exist in the current context
FormMain.cs(224,13): error CS0103: The name richTextBoxMessage' does not exist in the current context FormMain.cs(225,13): error CS0103: The name richTextBoxMessage' does not exist in the current context
FormMain.cs(226,13): error CS0103: The name richTextBoxMessage' does not exist in the current context FormMain.cs(231,17): error CS0103: The name radioButtonDev' does not exist in the current context
FormMain.cs(235,13): error CS0103: The name richTextBoxMessage' does not exist in the current context FormMain.cs(240,16): error CS0103: The name radioButtonTerminal' does not exist in the current context
FormMain.cs(244,13): error CS0103: The name richTextBoxMessage' does not exist in the current context FormMain.cs(268,17): error CS0103: The name radioButtonDev' does not exist in the current context
FormMain.cs(269,17): error CS0103: The name radioButtonDev' does not exist in the current context FormMain.cs(273,17): error CS0103: The name radioButtonDev' does not exist in the current context
FormMain.cs(274,17): error CS0103: The name radioButtonDev' does not exist in the current context FormMain.cs(281,13): error CS0103: The name richTextBoxMessage' does not exist in the current context
FormMain.cs(493,17): error CS0103: The name notifyIcon1' does not exist in the current context FormMain.cs(497,17): error CS0103: The name notifyIcon1' does not exist in the current context

SUKHOIIII的主页 SUKHOIIII | 初学一级 | 园豆:11
提问于:2024-07-15 11:17
< >
分享
所有回答(1)
0

来自AI:

根据错误信息,你的代码在编译时遇到了一些问题。引发错误的原因可能是缺少必要的程序集或库文件。下面是一些建议来解决这些错误:

  1. 检查引用的程序集和库文件:确保你的代码中引用的程序集和库文件的版本与你的目标.NET Framework版本(4.5.2)兼容。请仔细检查错误消息中列出的程序集,并确认它们是否存在于正确的位置,而且与你的目标.NET Framework版本兼容。
  2. 确认命名空间和类的定义:请确保使用的命名空间和类的定义正确,并且命名空间和类名的拼写与源代码中的一致。
  3. 确认UI设计器是否生成了代码:根据错误消息,看起来某些类中的InitializeComponent()方法未找到。这些方法是由窗体设计器自动生成的,用于初始化窗体的组件。请确保你的设计器将代码生成为正确的文件,并且文件与你的代码中引用的文件一致。
  4. 确认缺失的程序集是否被添加到项目引用中:根据错误消息,一些程序集似乎没有被正确引用。请确认这些程序集是否被添加到你的项目引用中。
  5. 检查文件路径和文件名:确保代码中引用的文件的路径和文件名正确无误,并且这些文件是可访问的。
    如果你仍然无法解决问题,建议逐个处理每个错误,并对每个错误进行单独的调查和解决。你可以根据错误消息中提供的信息,针对每个错误进行进一步的搜索和解决方案。此外,确保你的环境中已经安装了适当版本的编译器和相关工具。
    如果你仍然遇到问题,建议寻求更多专业的支持,如向开发社区、论坛或相关技术支持寻求帮助。
Technologyforgood | 园豆:7541 (大侠五级) | 2024-07-29 21:58
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册