InspectCode errors

Hi,

I am facing quite a few errors when running the InspectCode command line tool (Resharper in VS doesn't seem to have any issues though).

Firstly:

BuildIndexForFile C:\git\moss\src\packages\Akka\lib\net45\Akka.ExternalAnnotations.xml Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 2, position 4.

--- EXCEPTION #1/2 [XmlException]
Message = "Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 2, position 4."
ExceptionPath = Root.InnerException
ClassName = System.Xml.XmlException
HResult = Xml=80131940
Source = System.Xml
res = Xml_XmlDeclNotFirst
args.#0 = xml
lineNumber = 2
linePosition = 4
sourceUri = file:///C:/git/moss/src/packages/Akka/lib/net45/Akka.ExternalAnnotations.xml
version = 2.0
StackTraceString = "
  at System.Xml.XmlTextReaderImpl.Throw(Exception e)
     at System.Xml.XmlTextReaderImpl.ParsePI(StringBuilder piInDtdStringBuilder)
     at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
     at System.Xml.XmlReader.MoveToContent()
     at System.Xml.XmlReader.IsStartElement()
     at JetBrains.ReSharper.Psi.Impl.Reflection2.ExternalAnnotations.XmlPsiScanner.Process(XmlReader reader)
     at JetBrains.ReSharper.Psi.Impl.Reflection2.ExternalAnnotations.AnnotationsIndexBuilder.BuildIndexForFile(XmlReader lexer)
     at JetBrains.Util.Logging.Logger.Catch[TValue](String comment, Func`1 F)
"


and also:

Inspecting Message.cs
state = New

--- EXCEPTION #1/1 [LoggerException]
Message = "state = New"
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
HResult = COR_E_APPLICATION=80131600
StackTraceString = "
  at JetBrains.Util.Logging.Logger.Fail(String messageText)
     at JetBrains.ReSharper.Daemon.SolutionAnalysis.SolutionAnalysisManager.ReanalyzeIfSettingsChanged(IPsiSourceFile sourceFile)
     at JetBrains.ReSharper.Daemon.SolutionAnalysis.CollectInspectionResults.CollectIssuesFromSolutionAnalysis(SolutionAnalysisManager manager, IIssueSet issueSet, IPsiSourceFile file, Action`1 issueConsumer)
     at JetBrains.CommandLine.InspectCode.Unattended.InspectCodeRunner.<>c__DisplayClass17.<>c__DisplayClass1a.<RunFindCodeIssues>b__13()
     at JetBrains.Application.Progress.ProgressIndicatorExtensions.StartStop(IProgressIndicator progress, Int32 totalWorkUnits, String taskName, Action action)
     at JetBrains.CommandLine.InspectCode.Unattended.InspectCodeRunner.<>c__DisplayClass17.<RunFindCodeIssues>b__12(IProgressIndicator progress)
     at JetBrains.CommandLine.Common.Console.Util.Progress.ToolTaskExecutor.ExecuteTask(String taskName, TaskCancelable cancelable, Action`1 task)
     at JetBrains.CommandLine.InspectCode.Unattended.InspectCodeRunner.<>c__DisplayClass17.<RunFindCodeIssues>b__11()
     at JetBrains.Threading.JetDispatcher.Closure.Execute()
     at JetBrains.Threading.Win32JetDispatcher.ProcessQueue()
     at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
     at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)


and finally:
Message = "Could not find the component's XamlLanguageLevelProvider descriptor."
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
HResult = COR_E_INVALIDOPERATION=80131509
Source = JetBrains.Platform.ComponentModel
StackTraceString = "
  at JetBrains.Application.Components.ComponentContainerEx.GetComponent[TInterface](IComponentContainer container)
     at JetBrains.ReSharper.Psi.Xaml.Impl.Tree.References.XamlTypeReference.GetSymbolFilters(List`1 filters, Boolean useName)
     at JetBrains.ReSharper.Psi.Xaml.Impl.Tree.References.XamlTypeReference.CoreResolve(ISymbolTable symbolTable)


It refuses to generate any results.

Any ideas if these are known or are being addressed?

Thanks
3 comments
Comment actions Permalink

Hi Iain!

Last issue is resolved in ReSharper 10 EAP builds.
About first twos - can you send us your project for investigation?

Thanks in advance!
Slava.

0
Comment actions Permalink

Hi,

Sorry, I am not able to send my current project, I will try and reproduce on a small project.

r.e. the Akka.ExternalAttributes error, I think the error is correct and the xml is invalid. I will ask for the project to correct it.

I am using this build by the way:
JetBrains.ReSharper.CommandLineTools.10.0.20150923.195954-EAP2

Thanks,
Iain

0
Comment actions Permalink

Looks like the project has already fixed it. The xml in the current nuget package (1.0.4) looks fine, and this commit from July updates the xml file to remove unnecessary whitespace at the start: https://github.com/akkadotnet/akka.net/commit/0f6366d1feb53e09bb83dfe554ca39a685a2a91d

0

Please sign in to leave a comment.