Visual Studio 2013不显示C#编译错误 - 仅显示"无法将dll从/ obj /复制到/ bin /文件夹"

时间:2014-09-17 18:49:33

标签: visual-studio-2013 msbuild

我与两位开发人员合作,他们的Visual Studio 2013 IDE遇到了一个非常奇怪的问题。几个星期前,一个开发人员开始出现问题......然后,就在今天,另一个开发人员开始了另一个开发人员。

在构建包含任何编译错误的C#代码时,IDE不显示编译错误列表...构建过程继续并尝试将已编译的DLL从/ obj /文件夹复制到/ bin /文件夹中虽然构建成功了。然后抛出错误并显示在错误列表中#34;无法将/obj/Debug/xxx.dll复制到/ bin / Debug。无法访问/obj/xxx.dll" ...这是因为/obj/xxx.dll从未创建,因为源代码没有编译。 注意:这不是另一个进程锁定.dll文件的问题

如果我们采用完全相同的源代码并在运行VS2013的另一台机器上打开并运行构建,您将看到编译错误。您甚至可以返回并修复受影响计算机上的这些编译错误并成功构建。

Visual Studio中是否存在某个设置,以忽略编译错误并继续构建过程,就像构建成功一样" - 我非常熟悉MSBuild,我知道没有这样的设置。所以这对我来说有点莫名其妙 - 它几乎就像某种VS2013错误。


编辑 - 以下是具有问题的计算机与没有问题的计算机之间的诊断构建日志差异。当csc.exe在一切正常的机器上执行时,你可以看到发送到控制台的输出......但是你没有看到有问题的机器上csc.exe的任何输出。然而......在Copy任务尝试将.dll从/ obj /复制到/ bin / ...之前,没有错误出现。

有问题的机器

1>Using "Csc" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1>Task "Csc" (TaskId:25)
1>  Task Parameter:DebugType=full (TaskId:25)
1>  Task Parameter:DefineConstants=DEBUG;TRACE (TaskId:25)
1>  Task Parameter:DisabledWarnings=;1701;1702;2008 (TaskId:25)
1>  Task Parameter:EmitDebugInformation=True (TaskId:25)
1>  Task Parameter:ErrorEndLocation=True (TaskId:25)
1>  Task Parameter:ErrorReport=prompt (TaskId:25)
1>  Task Parameter:FileAlignment=512 (TaskId:25)
1>  Task Parameter:HighEntropyVA=True (TaskId:25)
1>  Task Parameter:NoConfig=True (TaskId:25)
1>  Task Parameter:NoStandardLib=True (TaskId:25)
1>  Task Parameter:Optimize=False (TaskId:25)
1>  Task Parameter:OutputAssembly=obj\Debug\CRDReportingClasses.dll (TaskId:25)
1>  Task Parameter:Prefer32Bit=False (TaskId:25)
1>  Task Parameter:PreferredUILang=en-US (TaskId:25)
1>  Task Parameter:
1>      References=
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=Microsoft.CSharp
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom=C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System.Configuration
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  Implicit=true
1>                  OriginalItemSpec=System.Core
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System.Data.DataSetExtensions
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System.Data
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System.Xml
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System.Xml.Linq
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0 (TaskId:25)
1>  Task Parameter:
1>      Sources=
1>          DataProvider.cs
1>          Properties\AssemblyInfo.cs
1>          C:\Users\rutkor\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs
1>          obj\Debug\\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
1>          obj\Debug\\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
1>          obj\Debug\\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs (TaskId:25)
1>  Task Parameter:SubsystemVersion=6.00 (TaskId:25)
1>  Task Parameter:TargetType=Library (TaskId:25)
1>  Task Parameter:ToolPath=C:\Program Files (x86)\MSBuild\12.0\bin (TaskId:25)
1>  Task Parameter:UseHostCompilerIfAvailable=True (TaskId:25)
1>  Task Parameter:Utf8Output=True (TaskId:25)
1>  Task Parameter:WarningLevel=4 (TaskId:25)
1>  C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /errorendlocation /preferreduilang:en-US /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\CRDReportingClasses.dll /subsystemversion:6.00 /target:library /utf8output DataProvider.cs Properties\AssemblyInfo.cs "C:\Users\rutkor\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs" obj\Debug\\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs obj\Debug\\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs obj\Debug\\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs (TaskId:25)
1>Done executing task "Csc". (TaskId:25)

没有问题的机器

1>Using "Csc" task from assembly "Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
1>Task "Csc" (TaskId:25)
1>  Task Parameter:DebugType=full (TaskId:25)
1>  Task Parameter:DefineConstants=DEBUG;TRACE (TaskId:25)
1>  Task Parameter:DisabledWarnings=;1701;1702;2008 (TaskId:25)
1>  Task Parameter:EmitDebugInformation=True (TaskId:25)
1>  Task Parameter:ErrorEndLocation=True (TaskId:25)
1>  Task Parameter:ErrorReport=prompt (TaskId:25)
1>  Task Parameter:FileAlignment=512 (TaskId:25)
1>  Task Parameter:HighEntropyVA=True (TaskId:25)
1>  Task Parameter:NoConfig=True (TaskId:25)
1>  Task Parameter:NoStandardLib=True (TaskId:25)
1>  Task Parameter:Optimize=False (TaskId:25)
1>  Task Parameter:OutputAssembly=obj\Debug\CRDReportingClasses.dll (TaskId:25)
1>  Task Parameter:Prefer32Bit=False (TaskId:25)
1>  Task Parameter:PreferredUILang=en-US (TaskId:25)
1>  Task Parameter:
1>      References=
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=Microsoft.CSharp
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom=C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System.Configuration
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  Implicit=true
1>                  OriginalItemSpec=System.Core
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System.Data.DataSetExtensions
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System.Data
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System.Xml
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0
1>          C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll
1>                  CopyLocal=false
1>                  FrameworkFile=true
1>                  FusionName=System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
1>                  ImageRuntime=v4.0.30319
1>                  OriginalItemSpec=System.Xml.Linq
1>                  Redist=Microsoft-Windows-CLRCoreComp.4.5
1>                  ReferenceSourceTarget=ResolveAssemblyReference
1>                  ResolvedFrom={TargetFrameworkDirectory}
1>                  Version=4.0.0.0 (TaskId:25)
1>  Task Parameter:
1>      Sources=
1>          DataProvider.cs
1>          Properties\AssemblyInfo.cs
1>          C:\Users\deidad\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs
1>          obj\Debug\\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
1>          obj\Debug\\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
1>          obj\Debug\\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs (TaskId:25)
1>  Task Parameter:SubsystemVersion=6.00 (TaskId:25)
1>  Task Parameter:TargetType=Library (TaskId:25)
1>  Task Parameter:ToolPath=C:\Program Files (x86)\MSBuild\12.0\bin (TaskId:25)
1>  Task Parameter:UseHostCompilerIfAvailable=True (TaskId:25)
1>  Task Parameter:Utf8Output=True (TaskId:25)
1>  Task Parameter:WarningLevel=4 (TaskId:25)
1>  C:\Program Files (x86)\MSBuild\12.0\bin\Csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /errorendlocation /preferreduilang:en-US /highentropyva+ /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Configuration.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\CRDReportingClasses.dll /subsystemversion:6.00 /target:library /utf8output DataProvider.cs Properties\AssemblyInfo.cs "C:\Users\deidad\AppData\Local\Temp\.NETFramework,Version=v4.5.AssemblyAttributes.cs" obj\Debug\\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs obj\Debug\\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs obj\Debug\\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs (TaskId:25)
1>  Microsoft (R) Visual C# Compiler version 12.0.21005.1 (TaskId:25)
1>   (TaskId:25)
1>  for C# 5 (TaskId:25)
1>  Copyright (C) Microsoft Corporation. All rights reserved. (TaskId:25)
1>   (TaskId:25)
1>Done executing task "Csc". (TaskId:25)

0 个答案:

没有答案