clang-power-tools icon indicating copy to clipboard operation
clang-power-tools copied to clipboard

start token ErrorText not match ending token PropertyGroup

Open roachsinai opened this issue 4 years ago • 1 comments

When running this tool on my project I got below error:

无法将值“System.Object[]”转换为类型“System.Xml.XmlDocument”。错误:“第 181 行,位置 8 上的开始标记“ErrorText”与结束标记“P
ropertyGroup”不匹配。 第 182 行,位置 7。”
所在位置 C:\users\xq\appdata\local\microsoft\visualstudio\16.0_61740d25\extensions\k00kjxft.mli\Tooling\v1\psClang\msbu
ild-project-load.ps1:649 字符: 5
+     [xml] $fileXml = Get-Content -LiteralPath $projectFilePath
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [],RuntimeException
    + FullyQualifiedErrorId : InvalidCastToXmlDocument

I turns out that NuGet insert below line in my project .vcxproj:

      <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>

And after I change it to :

      <ErrorText></ErrorText>

Export compile_commands.json successed.


By the way, thanks for provide this plugin!

roachsinai avatar Apr 02 '22 16:04 roachsinai

Hi @roachsinai ,

Sorry about the delayed reply. Can you provide a simplified representative XML document for testing purposes? I have tried to reproduce using your provided ErrorText element but have been unable to manifest the parsing error.

Regards, Gabriel.

hero101111 avatar Aug 01 '22 07:08 hero101111

I will close this issue as no user feedback is provided

mariru27 avatar Jul 07 '23 07:07 mariru27