Trying to Add Resource in Visual Studio 2010 Pro SP1 results in “The operation could not be completed. Unspecified error” message with C++ project

白昼怎懂夜的黑 提交于 2019-12-05 18:35:24

I had this same problem.

Right clicking on the project, selecting Unload Project, then right clicking again and clicking Reload Project fixed it.

So I'm not 100% sure of the exact reason for this, but it had something to do with the Code Browsing Info DB that I had disabled to speed up VS2010. Seems VS won't allow entering the Add Resource wizard if the Code Browsing Info DB is disabled.

Still with the DB re-enabled I got the hanging "Please wait while 'Resource Script Wizard' prepares to start. Click Cancel to end 'Resource Script Wizard'" prompt. Not sure how it finally disappeared, but I had to do a reboot and did close my Outlook mail client after the reboot while doing a couple more trials. Not sure if it has anything to do, but after that I was able to enter the Add Resource Wizard.

Maybe the good old Microsoft-style troubleshooting reboots still works after all these years.

In my case, it was cause by Google Recaptcha control.

I'd generate ressource after my page was completed so he catch my recaptcha Control but added a weird tag in his XML document.

Here is what I propose to you, open your resources file using XML editor and check out if there is not a weird tags which is widely different than other one. Maybe for me it's recatpcha, but maybe for you it's another third party.

Check out mine what it looks like :

<!-- OTHER TAGS --->
<data name="aControlResource1.ToolTip" xml:space="preserve">
  <value />
</data>
<!-- 
     THIS IS THE NASTY TAGS ... REMOVING IT MAKE IT WORKS PERFECTLY.
-->
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="recaptchaResource1.ErrorMessage" type="System.Resources.ResXNullRef, System.Windows.Forms">
   <value />
</data>
<data name="anotherControlResource1.ToolTip" xml:space="preserve">
  <value />
</data>
<!-- OTHER TAGS -->

Yes i had same problem, the solution its simple, you should close resource file then u can insert another image resource, Visual Studio cant add ids to bitmap while the file steel open "resource.h"

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