VS2015 devenv.exe在后期构建事件中退出,代码为1

时间:2017-02-21 16:21:31

标签: c++ visual-studio visual-studio-2012 visual-studio-2015 devenv

我有一个由VS2015打开的VC ++ 2012项目。 VS2012和VS2015都安装在我的电脑上。我添加了post build事件:

devenv.exe "$(SolutionPath)" /Build "$(Configuration)Dll|$(Platform)" /Project "$(ProjectPath)"

评估值为:

devenv.exe "C:\Users\Wang-Tzu-Chao\Documents\Visual Studio 2015\Projects\KORAT\NCUTAS.sln" /Build "DebugDll|x64" /Project "C:\Users\Wang-Tzu-Chao\Documents\Visual Studio 2015\Projects\KORAT\OCRScan\TinyOCR.vcxproj"

右键单击项目后 - >重建,我一直收到以下错误:

Error MSB3073 The command "devenv.exe "C:\Users\Wang-Tzu-Chao\Documents\Visual Studio 2015\Projects\KORAT\NCUTAS.sln" /Build "DebugDll|x64" /Project "C:\Users\Wang-Tzu-Chao\Documents\Visual Studio 2015\Projects\KORAT\OCRScan\TinyOCR.vcxproj" :VCEnd" exited with code 1. ocrscan C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets 134

错误XML日志如下所示:

<?xml version="1.0" encoding="utf-16"?>
<?xml-stylesheet type="text/xsl" href="ActivityLog.xsl"?>
<activity>
  <entry>
    <record>1</record>
    <time>2017/02/21 15:42:45.240</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Microsoft Visual Studio 2012 version: 11.0.50727.1</description>
  </entry>
  <entry>
    <record>2</record>
    <time>2017/02/21 15:42:45.240</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Running in User Groups: Administrators Users</description>
  </entry>
  <entry>
    <record>3</record>
    <time>2017/02/21 15:42:45.240</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Available Drive Space: C:\ drive has 170573537280 bytes; D:\ drive has 407639183360 bytes</description>
  </entry>
  <entry>
    <record>4</record>
    <time>2017/02/21 15:42:45.241</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Internet Explorer Version: 11.0.14393.693</description>
  </entry>
  <entry>
    <record>5</record>
    <time>2017/02/21 15:42:45.241</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>.NET Framework Version: 10.0.14393.0</description>
  </entry>
  <entry>
    <record>6</record>
    <time>2017/02/21 15:42:45.242</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>MSXML Version: 6.30.14393.321</description>
  </entry>
  <entry>
    <record>7</record>
    <time>2017/02/21 15:42:45.242</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Creating PkgDefCacheNonVolatile</description>
  </entry>
  <entry>
    <record>8</record>
    <time>2017/02/21 15:42:45.247</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Double-checking master pkgdef file</description>
  </entry>
  <entry>
    <record>9</record>
    <time>2017/02/21 15:42:45.249</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>PkgDefManagement initialized</description>
  </entry>
  <entry>
    <record>10</record>
    <time>2017/02/21 15:42:45.249</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>RootFolder</description>
    <path>C:\Program Files (x86)\Microsoft Visual Studio 11.0\</path>
  </entry>
  <entry>
    <record>11</record>
    <time>2017/02/21 15:42:45.249</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>ShellFolder</description>
    <path>C:\Program Files (x86)\Microsoft Visual Studio 11.0\</path>
  </entry>
  <entry>
    <record>12</record>
    <time>2017/02/21 15:42:45.249</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>PkgDefSearchPath</description>
    <path>C:\Program Files (x86)\Microsoft Visual Studio 11.0\\Common7\IDE\Extensions;C:\Program Files (x86)\Microsoft Visual Studio 11.0\\Common7\IDE\CommonExtensions;C:\Program Files (x86)\Microsoft Visual Studio 11.0\\Common7\IDE\devenv.admin.pkgdef</path>
  </entry>
  <entry>
    <record>13</record>
    <time>2017/02/21 15:42:45.249</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>ApplicationExtensionsFolder</description>
    <path>C:\Program Files (x86)\Microsoft Visual Studio 11.0\\Common7\IDE\Extensions</path>
  </entry>
  <entry>
    <record>14</record>
    <time>2017/02/21 15:42:45.249</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>&quot;ZeroImpact&quot; = dword:0, &quot;MergeRegistry&quot; = dword:1</description>
  </entry>
  <entry>
    <record>15</record>
    <time>2017/02/21 15:42:45.250</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Could not find ConfigurationChanged timestamp.</description>
    <hr>80070002</hr>
  </entry>
  <entry>
    <record>16</record>
    <time>2017/02/21 15:42:45.250</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>User extensions enabled by setting</description>
    <path>HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\ExtensionManager\EnableAdminExtensions</path>
  </entry>
  <entry>
    <record>17</record>
    <time>2017/02/21 15:42:45.250</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Could not find ConfigurationChanged timestamp.</description>
    <hr>80070002</hr>
  </entry>
  <entry>
    <record>18</record>
    <time>2017/02/21 15:42:45.250</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>PkgDefManagement startup complete</description>
  </entry>
  <entry>
    <record>19</record>
    <time>2017/02/21 15:42:45.251</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Configuration file to be used for CLR initialization</description>
    <path>C:\Users\Wang-Tzu-Chao\AppData\Local\Microsoft\VisualStudio\11.0\devenv.exe.config</path>
  </entry>
  <entry>
    <record>20</record>
    <time>2017/02/21 15:42:45.251</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>AppId setting up registry detouring</description>
  </entry>
  <entry>
    <record>21</record>
    <time>2017/02/21 15:42:45.251</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Adding detour rule 1: from HKLM</description>
    <path>Software\Microsoft\VisualStudio\11.0</path>
  </entry>
  <entry>
    <record>22</record>
    <time>2017/02/21 15:42:45.251</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Detour to HKCU</description>
    <path>Software\Microsoft\VisualStudio\11.0_Config</path>
  </entry>
  <entry>
    <record>23</record>
    <time>2017/02/21 15:42:45.251</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Adding detour rule 2: from HKLM</description>
    <path>Software\Microsoft\VisualStudio\11.0</path>
  </entry>
  <entry>
    <record>24</record>
    <time>2017/02/21 15:42:45.251</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Detour to HKCU</description>
    <path>Software\Microsoft\VisualStudio\11.0_Config</path>
  </entry>
  <entry>
    <record>25</record>
    <time>2017/02/21 15:42:45.251</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>AppId starting registry detouring</description>
  </entry>
  <entry>
    <record>26</record>
    <time>2017/02/21 15:42:45.264</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>AppId stopped registry detouring</description>
  </entry>
  <entry>
    <record>27</record>
    <time>2017/02/21 15:42:45.264</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Shutting down pkgdef registry</description>
  </entry>
  <entry>
    <record>28</record>
    <time>2017/02/21 15:42:45.264</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Released pkgdef cache usage tracker</description>
  </entry>
  <entry>
    <record>29</record>
    <time>2017/02/21 15:42:45.264</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>PkgDef registry shutdown complete</description>
  </entry>
</activity>

我需要你的帮助,谢谢你!

1 个答案:

答案 0 :(得分:-1)

将命令更改为以下格式后,一切正常:

"$(DevEnvDir)devenv.exe" /Build "DebugDll|x64" /Project "$(ProjectName)" "$(ProjectPath)"

DebugDll|x64是添加到VC2012项目的自定义构建配置。