Visual C++ CLR designer is always showing 0x8000000A error in the second run of the project and editing design

旧城冷巷雨未停 提交于 2020-01-26 03:39:05

问题


I'm trying to make a great GUI for my csgo cheat. I decided to use C++/CLR. Firstly I create empty project then, I change in a properties entrypoint and the subsystem and I add this code to the cpp file:

#include "MyForm.h"

using namespace System;`

using namespace System::Windows::Forms;`

[STAThreadAttribute]
void Main(array<System::String ^> ^args)
{
 Application::EnableVisualStyles();
 Application::SetCompatibleTextRenderingDefault(false);
 SmallPackofCheats::MyForm mainForm;
 Application::Run(%mainForm);
}

Then I save it and I restart visual studio. I run visual studio and I design menu. Designer works. After ended work I save everything and I close Visual Studio. Every next run of the Visual Studio and after opening my project I have this problem: image link

How to solve this problem? Thanks in advance.


回答1:


I encountered a similar problem recently and the other suggested solutions did not help. This method, however, did work:

  1. Window -> Close all Documents (or at least ensure that every designer window is closed)
  2. Close VS and restart it (important!)
  3. Reopen the solution
  4. Build -> Rebuild Solution

Now you should be able to open the designer.



来源:https://stackoverflow.com/questions/47952064/visual-c-clr-designer-is-always-showing-0x8000000a-error-in-the-second-run-of

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!