In my case I set Diagnostic
for the MSBuild verbosity as shown here.
Guess what... in the last line of the Output
window in Visual Studio it showed this:
2>"C:\Company\Project\project.sharded\Project\Project.csproj" (Rebuild;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies target) (1) ->
2>(CoreCompile target) ->
2> C:\Company\Project\project.sharded\Project\Services\UserService.cs(387,59,387,62): error CS0136: A local or parameter named 'sut' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
2>
2> 2147 Warning(s)
2> 1 Error(s)
This looks like a bug in Visual Studio 2019 (16.3.5).
No errors were shown in the Error List
window in Visual Studio.
This is the kind of errors that generally appear in the Error List
window.
This is the offending line:
var sut = _sdb.SysUsableThreads.SingleOrDefault(sut => sut.uid == thread.uid && sut.thread_core == thread.core);
OK. Can't use sut
because the var is named sut
and I named the lambda sut
. Again, this is the kind of thing that should be displayed in the Error List
. For sure this is a bug in Visual Studio 2019. I reported it inside Visual Studio.