Reputation: 1134
We use TeamCity as CI server and want to activate code ispection (.Net). If I configure the code inspection I got a lot of errors from inspector. The same if I try to do code inspection with resharper comman line tools.
We have the following project / solution structure
/
- Solutions/
- Solution1/
- Solution1.sln
- BuildOutput/
- Solution2/
- Solution2.sln
- BuildOutput
...
- Projects/
- Project1/
...
- Project2/
...
The projects are configured to allways build in the solution BuildOutput
directory.
If I execute code inspection like this from the solution directory:
C:\Tools\RSCL\inspectcode.exe "Solution1.sln"
I got the following output with errors on the command line:
JetBrains Inspect Code 9.0 Update 1
Running in 64-bit mode, .NET runtime 4.0.30319.34014 under Microsoft Windows NT 6.2.9200.0
C:\Tools\RSCL\inspectcode.exe : Paths relative to drive roots are not supported. Parametername: component Der tats„chliche Wert war \BuildOutput\Debug.
In Zeile:1 Zeichen:1
+ C:\Tools\RSCL\inspectcode.exe "Solution1.sln"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Paths relative ...ldOutput\Debug.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
--- EXCEPTION #1/2 [ArgumentOutOfRangeException]
Message = "Paths relative to drive roots are not supported."
ExceptionPath = Root.InnerException
ClassName = System.ArgumentOutOfRangeException
HResult = COR_E_ARGUMENTOUTOFRANGE=80131502
Source = JetBrains.Platform.Util
ParamName = component
ActualValue = \BuildOutput\Debug
StackTraceString = "
bei JetBrains.Util.FileSystemPath.Combine(String component)
bei JetBrains.ProjectModel.Impl.CachedProjectItemValue`2.GetValue()
bei JetBrains.ProjectModel.ProjectImpl.<.ctor>b__5(ProjectImpl element)
bei JetBrains.ProjectModel.ProjectImpl.GetOutputFilePath()
bei JetBrains.ProjectModel.Build.OutputAssemblies.UpdateOutputAssemblyMvid(IProject project)
bei JetBrains.ProjectModel.Build.OutputAssemblies.AfterProjectOpenedInternal(IProject project)
bei JetBrains.DataFlow.Viewable.<>c__DisplayClass1d`1.<View>b__1b(Lifetime valueLifetime, TValue value)
bei JetBrains.DataFlow.ViewableCollection`1.Add(TValue item)
bei JetBrains.DataFlow.Lifetime.AddBracket(Action FOpening, Action FClosing)
bei JetBrains.ProjectModel.ProjectManagerBase.OpenProjectInstance(Pair`2 projectInstanceWithLifetime)
bei JetBrains.ProjectModel.ProjectManagerBase.<>c__DisplayClass8.<EnqueueOpenProjectInstance>b__6()
bei JetBrains.Util.Logging.Logger.Catch(Action action)
"
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = "
Paths relative to drive roots are not supported.
Parametername: component
Der tats„chliche Wert war \BuildOutput\Debug.
"
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = "Exception #1 at Root.InnerException"
HResult = COR_E_APPLICATION=80131600
StackTraceString = "
bei JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerBase.ExecuteOneTask(SolutionLoadTask task)
bei JetBrains.ProjectModel.Tasks.SolutionLoadTasksSchedulerBase.DispatchTasks(Boolean background)
bei JetBrains.ProjectModel.SolutionManagerBase.CreateSolutionInstance(SolutionElement solutionElement, SolutionInstance solutionInstance)
bei JetBrains.ProjectModel.MsBuild.Internal.MsBuildSolutionManager.<>c__DisplayClass4.<>c__DisplayClass6.<.ctor>b__1()
bei JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
bei JetBrains.Threading.ReentrancyGuard.ExecuteOrQueue(String name, Action action)
bei JetBrains.ProjectModel.MsBuild.Internal.MsBuildSolutionManager.<>c__DisplayClass4.<.ctor>b__0(Lifetime msBuildSolutionLifetime, MsBuildSolution msBuildSolution)
bei JetBrains.DataFlow.Lifetimes.Define(Lifetime lifetime, String id, Action`2 FAtomic, ILogger logger)
bei JetBrains.DataFlow.SequentialLifetimes.DefineNext(Action`2 FNext)
bei JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
bei JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
bei JetBrains.DataFlow.Property`1.FireChange(TValue old, TValue new, Object cookie)
bei JetBrains.DataFlow.Property`1.SetValue(TValue value, Object cookie)
bei JetBrains.ProjectModel.MsBuild.MsBuildSolutionHost.OpenSolution(FileSystemPath location, IMsBuildSolutionUserProfile userProfile)
bei JetBrains.CommandLine.InspectCode.Unattended.InspectCodeProductMain.OpenSolution(FileSystemPath solutionFilePath, ILogger logger, MsBuildSolutionHost solutionHost, SolutionsManager solutionsManager,
IInspectCodeSettings settings)
bei JetBrains.CommandLine.InspectCode.Unattended.InspectCodeProductMain.Main(IThreading invocator, IShellLocks shellLocks, ILogger logger, IInspectCodeSettings settings, MsBuildSolutionHost solutionHost,
SolutionsManager solutionsManager, PlatformMana
ger platformManager, ISdkManager sdkManager, IProductCommandLineArguments argumentsRaw, IssuesTypesWriter issuesTypesWriter)
bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
bei JetBrains.Application.Environment.RunsPublicStaticIntMain.<>c__DisplayClass7.<.ctor>b__0()
bei JetBrains.Util.Logging.Logger.Catch(Action action)
bei JetBrains.Threading.JetDispatcher.Closure.Execute()
bei JetBrains.Threading.JetDispatcher.ProcessQueue()
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.DispatcherOperation.InvokeImpl()
bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bei System.Windows.Threading.DispatcherOperation.Invoke()
bei System.Windows.Threading.Dispatcher.ProcessQueue()
bei System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
bei MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
bei JetBrains.DataFlow.Lifetimes.Using(Action`1 ?)
bei JetBrains.Application.Environment.IJetHostEx.RunHostMessageLoop(IComponentContainer containerEnv)
bei JetBrains.Application.Environment.HostParameters.JetHostParametersCaller.RunMainLoop(ComponentContainer containerEnv)
bei JetBrains.Application.Environment.JetEnvironment.InternalRun(JetHostParametersCaller host, ComponentContainer containerEnv)
bei JetBrains.Application.Environment.JetEnvironment.CreateAndRun(Full hostparams)
bei JetBrains.CommandLine.InspectCode.InspectCodeProgram.Main(Assembly assembly, HostInfo hostInfo, String[] args)
bei JetBrains.CommandLine.InspectCode.InspectCodeProgram.Main(String[] args)
"
Paths relative to drive roots are not supported. Parametername: component Der tats„chliche Wert war \BuildOutput\Debug.
--- EXCEPTION #1/2 [ArgumentOutOfRangeException]
...
I don't understand what is going wrong. The Solutions are all buildable and code inspection from VS works well on the same solutions.
Upvotes: 1
Views: 1189
Reputation: 4592
I figured it out. Mine was failing because my .csproj did not define the SolutionDir. The relative path error is a red herring so to speak.
Make sure this is in the csproj
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
Upvotes: 1