Problems with running Resharper CLI as part of MSBuild on hosted build controller in Visual Studio Online

Hi,

I'm trying to have the Resharper Inspection rules run as part of our TFS build, using a hosted build controller in Visual Studio Online, but I'm having some problems. First of all, I'm not sure whether this is even supposed to be possible or not? At least I haven't been able to find any documentation for this.

I have downloaded and extracted the Resharper CLI, and added the build target and the InspectCode task in the AfterBuild target to my project file:

<Import Project="..\SomePath\InspectCode.MsBuild.Targets" />
<Target Name="AfterBuild">
    <InspectCode ContinueOnError="False" SolutionFile="$(SolutionPath)" Debug="True"></InspectCode>
</Target>

But then I'm getting the error below when running the TFS build. Does anybody have idea of what's happening, what configuration errors that I might have applied or just how I'm able to extract more information about the problem?

C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : Internal exception thrown: Arithmetic operation resulted in an overflow.
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : --- EXCEPTION #1/2 [OverflowException]
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : Message = “Arithmetic operation resulted in an overflow.”
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : ExceptionPath = Root.InnerException
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : ClassName = System.OverflowException
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : HResult = COR_E_OVERFLOW=80131516
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : Source = JetBrains.Platform.ReSharper.Shell
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : StackTraceString = “
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :   at JetBrains.Application.PersistentMap.PersistentSortedMapLevelDb`2.get_Count()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.ReSharper.Psi.Caches.Persistence.PersistentIndexManagerImpl.LoadProjectModel()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.Util.Logging.Logger.Catch(Action action)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : ”
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : --- Outer ---
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : --- EXCEPTION #2/2 [LoggerException]
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : Message = “Arithmetic operation resulted in an overflow.”
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : ExceptionPath = Root
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : ClassName = JetBrains.Util.LoggerException
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : InnerException = “Exception #1 at Root.InnerException”
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : HResult = COR_E_APPLICATION=80131600
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error : StackTraceString = “
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :   at JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerBase.ExecuteOneTask(SolutionLoadTask task)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerBase.DispatchTasks(Boolean background)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.ProjectModel.SolutionManagerBase.CreateSolutionInstance(SolutionElement solutionElement, SolutionInstance solutionInstance)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.ProjectModel.MsBuild.Internal.MsBuildSolutionManager.<>c__DisplayClass4.<>c__DisplayClass6.<.ctor>b__1()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.Threading.ReentrancyGuard.ExecuteOrQueue(String name, Action action)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.ProjectModel.MsBuild.Internal.MsBuildSolutionManager.<>c__DisplayClass4.<.ctor>b__0(Lifetime msBuildSolutionLifetime, MsBuildSolution msBuildSolution)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.DataFlow.Property`1.FireChange(TValue old, TValue new, Object cookie)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.DataFlow.Property`1.SetValue(TValue value, Object cookie)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.ProjectModel.MsBuild.MsBuildSolutionHost.OpenSolution(FileSystemPath location, IMsBuildSolutionUserProfile userProfile)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.CommandLine.InspectCode.InspectCodeProductMain.OpenSolution(FileSystemPath solutionFilePath)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.CommandLine.InspectCode.InspectCodeProductMain.Run()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.CommandLine.Common.ConsoleApplicationHost.DoMain(Lifetime lifetime, IApplicationDescriptor descriptor, String configurationName, Object[] componentsToInject)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.CommandLine.Common.ConsoleApplicationHost.Main(Func`1 createApplicationDescriptor, Func`1 createHostCommandLine, String configurationName, Object[] componentsToInject)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at JetBrains.CommandLine.Tasks.InspectCode.Execute()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskBuilder.<InitializeAndExecuteTask>d__1c.MoveNext()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskBuilder.InitializeAndExecuteTask(TaskLoggingContext taskLoggingContext, ItemBucket bucket, IDictionary`2 taskIdentityParameters, TaskHost taskHost, TaskExecutionMode howToExecuteTask)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteBucket>d__f.MoveNext()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskBuilder.ExecuteBucket(TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Dictionary`2 lookupHash)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteTask>d__5.MoveNext()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskBuilder.ExecuteTask(TaskExecutionMode mode, Lookup lookup)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteTask>d__0.MoveNext()
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
C:\a\src\ZZZ\ProjectX\ProjectX.csproj(211,5): error :      at Microsoft.Build.BackEnd.TaskBuilder.ExecuteTask(TargetLoggingContext loggingContext, BuildRequestEntry requestEntry, ITargetBuilderCallback targetBuilderCallback, ProjectTargetInstanceChild taskInstance, TaskExecutionMode mode, Lookup inferLookup, Lookup executeLookup, CancellationToken cancellationToken)

2 comments
Comment actions Permalink

There is the following ticket about very similar problem http://youtrack.jetbrains.com/issue/RSRP-414105. You are welcome to track its status and comment it.

Thanks!  

0
Comment actions Permalink

shm, there is request in tracker for this issue http://youtrack.jetbrains.com/issue/RSRP-414105
Btw, what is first line of CLT output (where is environment logged)?

0

Please sign in to leave a comment.