none
Microsoft.Common.targets(1756,9): error MSB6006: “LC.exe”已退出,代码为 -1。 RRS feed

  • 问题

  • 我把工程从VS2010移植到VS2008就出现这个问题了

    Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
    C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\LC.exe /target:MplusNet.dll /complist:Properties\licenses.licx /outdir:obj\Debug\ /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Office.Interop.Excel.dll" /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Office.Interop.Word.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.configuration.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.Entity.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Security.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.Design.dll" /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Mobile.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.XML.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /i:C:\Windows\assembly\GAC_MSIL\Office\14.0.0.0__71e9bce111e9429c\Office.dll /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\office.dll" /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Vbe.Interop.dll" /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\stdole.dll" 
    C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1756,9): error MSB6006: “LC.exe”已退出,代码为 -1。
    Done building project "MplusNet.csproj" -- FAILED.
    ========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========


    2012年5月6日 14:22

答案

  • 我把工程从VS2010移植到VS2008就出现这个问题了

    Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
    C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\LC.exe /target:MplusNet.dll /complist:Properties\licenses.licx /outdir:obj\Debug\ /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Office.Interop.Excel.dll" /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Office.Interop.Word.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.configuration.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.Entity.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Security.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.Design.dll" /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Mobile.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.XML.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /i:C:\Windows\assembly\GAC_MSIL\Office\14.0.0.0__71e9bce111e9429c\Office.dll /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\office.dll" /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Vbe.Interop.dll" /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\stdole.dll" 
    C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1756,9): error MSB6006: “LC.exe”已退出,代码为 -1。
    Done building project "MplusNet.csproj" -- FAILED.
    ========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========


    这个是版本兼容性问题——一般地,如果你的dll版本高(现在是4.0的),你突然移动到3.5的(VS2008最高支持3.5),就出现问题了。

    建议你找到那个dll源代码,重新编译成3.5的版本后使用(注意移除所有4.0的功能函数)。

    谢谢……


       QQ我:讨论(Talk)
    下载MSDN桌面工具(Vista,Win7)
    我的博客园
    慈善点击,点击此处

    2012年5月7日 7:46

全部回复

  • 刚才没看清楚...可能是你版本是4.0的转换到3.5出现问题了...

    不过你是否用了什么第三方的控件了呢?如果是的话也有可能遇到这样的问题!


    2012年5月7日 7:35
    版主
  • 我把工程从VS2010移植到VS2008就出现这个问题了

    Project file contains ToolsVersion="4.0", which is not supported by this version of MSBuild. Treating the project as if it had ToolsVersion="3.5".
    C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\LC.exe /target:MplusNet.dll /complist:Properties\licenses.licx /outdir:obj\Debug\ /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Office.Interop.Excel.dll" /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Office.Interop.Word.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.configuration.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.Entity.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.EnterpriseServices.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Security.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.Design.dll" /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Web.Extensions.dll" /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Mobile.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.Services.dll /i:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.XML.dll /i:"C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /i:C:\Windows\assembly\GAC_MSIL\Office\14.0.0.0__71e9bce111e9429c\Office.dll /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\office.dll" /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\Microsoft.Vbe.Interop.dll" /i:"D:\Program Files\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\stdole.dll" 
    C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(1756,9): error MSB6006: “LC.exe”已退出,代码为 -1。
    Done building project "MplusNet.csproj" -- FAILED.
    ========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========


    这个是版本兼容性问题——一般地,如果你的dll版本高(现在是4.0的),你突然移动到3.5的(VS2008最高支持3.5),就出现问题了。

    建议你找到那个dll源代码,重新编译成3.5的版本后使用(注意移除所有4.0的功能函数)。

    谢谢……


       QQ我:讨论(Talk)
    下载MSDN桌面工具(Vista,Win7)
    我的博客园
    慈善点击,点击此处

    2012年5月7日 7:46