Visual studio2010创建MFC的工程中资源视图出现空白问题原因与解决

      这几天正在赶几个项目,正准备着手做,没想到开发神器Visual studio2010出现问题了,具体问题是这样的:

打开Visual studio2010创建MFC工程时会出现几个错误提示对话框


然后接着还会跳出好几个错误提示对话框,大概意思就是各种包没有找到,然后创建MFC工程后资源视图为空,但是用Visual打开以前创建的工程,资源视图正常,而且当关闭Visual后直接点击创建工程中的RC文件,可以打开资源视图。在网上找了一阵答案后没发现具体的解决的办法,只是发现一个有点沾边的现象的解决方案,于是我就照着去尝试了一下,没想到成功解决了问题。

    问题分析:

    因为用Visual可以正常打开别的项目文件,所以软件本身没有出现什么问题,再根据错误的提示,就是一些包没有找到,那就是路径的设置出错或者因为其他一些不规范操作导致路径记录被删除,我回忆起之前清理过注册表,有人告诉我注册表清理后会将VS在注册表中的指定路径删除掉,于是解决方法就是将包路径导入进入或者将配置恢复到默认条件下,我采取恢复配置到默认状态。


方法:选择工具-》导入和导出设置-》重置所有设置即可

另外在网上找了直接导入路径法,下面粘贴出来

Microsoft.Data.Entity.Design.BootstrapPackage.BootstrapPackage error when opening closing solution

I am running on a Windows 7 Home Premium x64.

I originally had the VS 2010 C# Express and VS 2010 Web Express with MVC 1/2/3 & Silverlight installed. Also had the VS 2010 SP1 installed. I uninstalled all of those except .NET Framework 4.0.

Subsequently I installed the VS 2010 Ultimate from MSDN on my PC and started experiencing this problem every time I tried to open or create a VS 2010 solution.

The workaround that SEEMS to have worked for me are the scripts from MS on 20/01/2010 at 10:57, only correction was one of the commands on the 3rd batch that was posted as 'query delete' instead of 'delete':

========== Script from Microsoft ==========
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s

reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s

reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /va /f

reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /va /f

reg delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /f
reg delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /f
reg delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /va /f


reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s

reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s

reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s

=============== Output from the Above commands ==============
Setting environment for using Microsoft Visual Studio 2010 x86 tools.

C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\
VisualStudio\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A
4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\AutoLoadPack
ages\{adfc4e66-0397-11d1-9f4e-00a0c911004f}
    {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}    REG_DWORD    0x0


C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\
VisualStudio\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A
4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\AutoLoadPack
ages\{93694fa0-0397-11d1-9f4e-00a0c911004f}
    {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}    REG_DWORD    0x0


C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\
VisualStudio\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{7A
4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
    (Default)    REG_SZ    Microsoft.Data.Entity.Design.BootstrapPackage.Bootstr
apPackage, Microsoft.Data.Entity.Design.BootstrapPackage, Version=10.0.0.0, Cult
ure=neutral, PublicKeyToken=b03f5f7f11d50a3a
    InprocServer32    REG_SZ    C:\Windows\SysWOW64\mscoree.dll
    Class    REG_SZ    Microsoft.Data.Entity.Design.BootstrapPackage.BootstrapPa
ckage
    Assembly    REG_SZ    Microsoft.Data.Entity.Design.BootstrapPackage, Version
=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{7A
4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}\Toolbox
    Default Items    REG_DWORD    0x1


C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio
\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-
4415-9FAB-D6DCC56F47FB}
ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio
\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-
4415-9FAB-D6DCC56F47FB}
ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio
\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s
ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\
10.0_Config\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96
-5D5B-4415-9FAB-D6DCC56F47FB}

HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\AutoLoadPackages\{
adfc4e66-0397-11d1-9f4e-00a0c911004f}
    {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}    REG_DWORD    0x0


C:\Windows\system32>reg query delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\Visual
Studio\10.0_Config\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7
A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
ERROR: Invalid key name.
Type "REG QUERY /?" for usage.

C:\Windows\system32>reg delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio
\10.0_Config\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D9
6-5D5B-4415-9FAB-D6DCC56F47FB}
Delete the registry value {7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} (Yes/No)? y
The operation completed successfully.

C:\Windows\system32>reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\
10.0_Config\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s

HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\Packages\{7A4E8D96
-5D5B-4415-9FAB-D6DCC56F47FB}
    (Default)    REG_SZ    Microsoft.Data.Entity.Design.BootstrapPackage.Bootstr
apPackage, Microsoft.Data.Entity.Design.BootstrapPackage, Version=10.0.0.0, Cult
ure=neutral, PublicKeyToken=b03f5f7f11d50a3a
    InprocServer32    REG_SZ    C:\Windows\SysWOW64\mscoree.dll
    Class    REG_SZ    Microsoft.Data.Entity.Design.BootstrapPackage.BootstrapPa
ckage
    Assembly    REG_SZ    Microsoft.Data.Entity.Design.BootstrapPackage, Version
=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\Packages\{7A4E8D96
-5D5B-4415-9FAB-D6DCC56F47FB}\Toolbox
    Default Items    REG_DWORD    0x1


C:\Windows\system32>reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft
\VisualStudio\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7
A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /f
The operation completed successfully.

C:\Windows\system32>reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft
\VisualStudio\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7
A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /f
The operation completed successfully.

C:\Windows\system32>reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft
\VisualStudio\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /va /f
The operation completed successfully.

C:\Windows\system32>reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudi
o\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B
-4415-9FAB-D6DCC56F47FB} /f
ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudi
o\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B
-4415-9FAB-D6DCC56F47FB} /f
ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudi
o\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /va /f
ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio
\10.0_Config\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D9
6-5D5B-4415-9FAB-D6DCC56F47FB} /f
The operation completed successfully.

C:\Windows\system32>reg delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio
\10.0_Config\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D9
6-5D5B-4415-9FAB-D6DCC56F47FB} /f
ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio
\10.0_Config\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /va /f
The operation completed successfully.

C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\
VisualStudio\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A
4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}


ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\
VisualStudio\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A
4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}


ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\
VisualStudio\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{7A
4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}\Toolbox
    Default Items    REG_DWORD    0x1


C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio
\10.0\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-
4415-9FAB-D6DCC56F47FB}
ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio
\10.0\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96-5D5B-
4415-9FAB-D6DCC56F47FB}
ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio
\10.0\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s
ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\
10.0_Config\AutoLoadPackages\{adfc4e66-0397-11d1-9f4e-00a0c911004f} /v {7A4E8D96
-5D5B-4415-9FAB-D6DCC56F47FB}


ERROR: The system was unable to find the specified registry key or value.

C:\Windows\system32>reg query delete HKEY_CURRENT_USER\SOFTWARE\Microsoft\Visual
Studio\10.0_Config\AutoLoadPackages\{93694fa0-0397-11d1-9f4e-00a0c911004f} /v {7
A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB}
ERROR: Invalid key name.
Type "REG QUERY /?" for usage.

C:\Windows\system32>reg query HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\
10.0_Config\Packages\{7A4E8D96-5D5B-4415-9FAB-D6DCC56F47FB} /s

HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\10.0_Config\Packages\{7A4E8D96
-5D5B-4415-9FAB-D6DCC56F47FB}\Toolbox
    Default Items    REG_DWORD    0x1


C:\Windows\system32>

展开阅读全文

没有更多推荐了,返回首页