2015-01-09 2 views
1

TeamCity를 CI 서버로 사용하고 코드 ispection (.Net)을 활성화하려고합니다. 코드 검사를 구성하면 검사관에게 많은 오류가 발생합니다. resharper comman line 도구를 사용하여 코드 검사를 시도하는 경우에도 마찬가지입니다.Resharper 명령 줄 검사가 예외를 throw합니다.

우리는 프로젝트가 솔루션 BuildOutput 디렉토리 구축에 allways하도록 구성되어

/ 
- Solutions/ 
    - Solution1/ 
     - Solution1.sln 
     - BuildOutput/ 
    - Solution2/ 
     - Solution2.sln 
     - BuildOutput 
    ... 
- Projects/ 
    - Project1/ 
     ... 
    - Project2/ 
     ... 

다음 프로젝트/솔루션 구조를 가지고있다.

내가 솔루션 디렉토리에서 다음과 같은 코드 검사를 실행하면 :

C:\Tools\RSCL\inspectcode.exe "Solution1.sln" 

나는 명령 줄에 오류가있는 다음과 같은 출력있어 : 나는 무슨 일

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] 

... 

을 이해하지 못하는 잘못된. 솔루션은 모두 빌드 가능하며 VS의 코드 검사는 동일한 솔루션에서 원활하게 작동합니다.

+0

안녕에 있는지 확인이에 대한 해결책을 찾았나요? – KnowHoper

+0

No. 해당 사항 없음. – WebDucer

+0

아래에서 솔루션을 참조하십시오. – KnowHoper

답변

1

나는 그것을 알아 냈다. 내 .csproj가 SolutionDir을 정의하지 않았기 때문에 내 것이 실패했습니다. 상대 경로 오류는 말할 수있는 붉은 청어입니다.

, 이것은 csproj

<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>