初学者。我正在尝试将C#转移到未来,所以我想将我的主项目转换为它。我尝试使用SharpDevelop 4.4,但转换后试图在Visual Studio中打开我的表单导致:
To prevent possible data loss before loading the designer, the following errors must be resolved: The designer could not be shown for this file because none of the classes within it can be designed.
和错误:
Instances of this error (1) 1. Hide Call Stack at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager) at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager) at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
有没有办法可以手动转换文件?我知道在线有代码转换器,但我不知道你将如何改变整个解决方案。
编辑:尝试运行程序后出现此错误:
Error 5 The OutputPath property is not set for project 'Skype.Converted.csproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform. Skype.Converted
信息消息:
Message 4 The designer could not be shown for this file because none of the classes within it can be designed.
答案 0 :(得分:0)
我会推荐这个代码转换器,因为它是我用过的,当我只能在C#中找到我的答案的解决方案并且需要它们在VB中。
我确信您可以将其用于反向操作以手动转换代码。
链接:http://converter.telerik.com/
就设计器位而言,我相对肯定你可以在一个项目上选择所有控件,复制,然后将它们粘贴到另一个项目上。然而,将它们与它们的功能/句柄重新关联将是令人讨厌的。