Microsoft Visual Studio | VS打开解决方案时加载失败,或者出现错误提示

来源:互联网 发布:linux 文件分割 编辑:程序博客网 时间:2024/06/14 13:31
Microsoft Visual Studio | VS打开解决方案时加载失败,或者出现错误提示
1、加载失败并且输出状态栏也没什么错误提示的话,往往是因为一个低版本VS2010、VS2012等打开了VS2013甚至更高版本创建的解决方案。    解决方发:安装一个VS的相关补丁patch_KB2781514即可。
2、关于加载失败并且输出状态栏提示有错误, 按照提示进行修改即可。 比如说我出的一个错误就是,解决方案被我由C盘移动到D盘,结果再打开解决方案,CvDebug和CvRelease属性文件找不到了导致报错。xx.vcxproj里面存储着方案工程的属性信息,当我们移动解决方案时一些用相对路径表示的属性信息就会出现问题。所以修改一下对应的路径信息就可以了。
贴上我完整的xx.vcxproj文件(用记事本打开即可看到),可以看到我的属性信息里面的属性信息都是绝对路径的。移动也不会有问题。
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <ItemGroup Label="ProjectConfigurations">
  4. <ProjectConfiguration Include="Debug|Win32">
  5. <Configuration>Debug</Configuration>
  6. <Platform>Win32</Platform>
  7. </ProjectConfiguration>
  8. <ProjectConfiguration Include="Release|Win32">
  9. <Configuration>Release</Configuration>
  10. <Platform>Win32</Platform>
  11. </ProjectConfiguration>
  12. </ItemGroup>
  13. <PropertyGroup Label="Globals">
  14. <ProjectGuid>{DAE8CEE3-168F-4695-9F40-7F68A1E4AB96}</ProjectGuid>
  15. <Keyword>Win32Proj</Keyword>
  16. <RootNamespace>test</RootNamespace>
  17. </PropertyGroup>
  18. <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  19. <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
  20. <ConfigurationType>Application</ConfigurationType>
  21. <UseDebugLibraries>true</UseDebugLibraries>
  22. <PlatformToolset>v120</PlatformToolset>
  23. <CharacterSet>Unicode</CharacterSet>
  24. </PropertyGroup>
  25. <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
  26. <ConfigurationType>Application</ConfigurationType>
  27. <UseDebugLibraries>false</UseDebugLibraries>
  28. <PlatformToolset>v120</PlatformToolset>
  29. <WholeProgramOptimization>true</WholeProgramOptimization>
  30. <CharacterSet>Unicode</CharacterSet>
  31. </PropertyGroup>
  32. <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  33. <ImportGroup Label="ExtensionSettings">
  34. </ImportGroup>
  35. <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  36. <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  37. <Import Project="C:\Users\HooS\Documents\CvDebug-x86.props" />
  38. </ImportGroup>
  39. <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  40. <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  41. <Import Project="C:\Users\HooS\Documents\CvRelease-x86.props" />
  42. </ImportGroup>
  43. <PropertyGroup Label="UserMacros" />
  44. <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  45. <LinkIncremental>true</LinkIncremental>
  46. </PropertyGroup>
  47. <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  48. <LinkIncremental>false</LinkIncremental>
  49. </PropertyGroup>
  50. <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
  51. <ClCompile>
  52. <PrecompiledHeader>
  53. </PrecompiledHeader>
  54. <WarningLevel>Level3</WarningLevel>
  55. <Optimization>Disabled</Optimization>
  56. <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  57. </ClCompile>
  58. <Link>
  59. <SubSystem>Console</SubSystem>
  60. <GenerateDebugInformation>true</GenerateDebugInformation>
  61. </Link>
  62. </ItemDefinitionGroup>
  63. <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
  64. <ClCompile>
  65. <WarningLevel>Level3</WarningLevel>
  66. <PrecompiledHeader>
  67. </PrecompiledHeader>
  68. <Optimization>MaxSpeed</Optimization>
  69. <FunctionLevelLinking>true</FunctionLevelLinking>
  70. <IntrinsicFunctions>true</IntrinsicFunctions>
  71. <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  72. </ClCompile>
  73. <Link>
  74. <SubSystem>Console</SubSystem>
  75. <GenerateDebugInformation>true</GenerateDebugInformation>
  76. <EnableCOMDATFolding>true</EnableCOMDATFolding>
  77. <OptimizeReferences>true</OptimizeReferences>
  78. </Link>
  79. </ItemDefinitionGroup>
  80. <ItemGroup>
  81. <ClCompile Include="test.cpp" />
  82. </ItemGroup>
  83. <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  84. <ImportGroup Label="ExtensionTargets">
  85. </ImportGroup>
  86. </Project>

0 0
原创粉丝点击