5

I have looked up this question but none of the other answers have worked for me.

I am getting duplicate messages in the error list on VS2019. I do not think it is every error and when I first open my project it doesn't do it but once I open up a XAML file it stays like that. The code raising the errors does not need to interact with the XAML file in any way (It happens on newly created classes).

One answer said it may be IntelliSense and the Compiler reporting the same error but I've always had IntelliSense + Compiler on and this problem has only been around 1-2 months. Plus I switched to IntelliSense Only and am still getting double errors.

Duplicated messages from "XamlInProcLanguageClient"

The duplicates always come from XamlInProcLanguageClient but a google search shows a single result when I google it.

Additional Info:

  • It happens on new projects and old projects.
  • I have reset my settings and the problem still persists.
  • My MSBuild project build output verbosity is "Minimal"
  • If I close and reopen the solution, the duplicates go away until a xaml file is opened.

The only thing I could think I did around 1-2 months ago that might affect this is that I downloaded VS 2022 Preview (2.1 or 3). However, I never actually opened it and have uninstalled it to attempt to fix the problem (without luck).

Michael Wagner
  • 314
  • 1
  • 12
  • But they both go away when you fix the problem? (If so.. why do you care that there are two?) – Caius Jard Sep 19 '21 at 18:20
  • It's not really a fix because they come back. There are other annoying things it causes like sometimes when I fix the errors, the one caused by XamlInProcLanguageClient doesn't get cleared from the list until I restart VS. – Michael Wagner Sep 19 '21 at 19:26
  • But the app still builds and runs? I've become fairly used to it with my Blazor projects; one of them has 53 errors (yet it still works fine) - the most annoying thing is the real errors end up somewhere in the list... I should probably put a filter on to exclude "does not contain a constructor with this many arguments.." because all the bogus errors are the same message – Caius Jard Sep 19 '21 at 19:30
  • If it's only the "fake" errors, it will build and run, but if I have any real errors buried it's harder to find them. because they are all generated by "XamlInProcLanguageClient" I can actually filter them all out. but I want to know why this is happening when it didn't use too. – Michael Wagner Sep 19 '21 at 21:10
  • I have exactly same problem. I also downloaded VS 2022 Preview. Uninstalling preview version didn't helped, repairing VS 2019 neither. I would say it also broke code style warnings. I get warning about code style even if I add rule into the .editorconfig e.g. `IDE0011: Add braces to 'if' statement. ` – Josef Trejbal Oct 06 '21 at 08:10

2 Answers2

4

I was able to find this issue posted on the Microsoft Developer Community here, so it appears to have been a bug:

Intellisense content is repeatedly displayed

It says "fixed" in 17.0 which is just VS2022 and I have tested 16.11.7 (VS2019) and the problem persists. It does appear to be fixed in VS2022 so the answer is to upgrade.

Michael Wagner
  • 314
  • 1
  • 12
  • 2
    Adding to this, as of 30 Jan 2022 this is still an issue in 16.11.9. Specifically (in case the link goes down), it's a duplicate error that only occurs when you open a XAML file for the first time in the session. To see, check the Tool column in errors and see "Compiler" and "XamlInProcLanguageClient" for each error (Error List > Right click column header > Show Columns > Tools). Unfortunately I can't get VS2022 from my company software solution so I'm stuck with this annoying error until someone decides to release a fix for VS2019 (not gonna hold my breath). – Aelarion Jan 30 '22 at 15:08
2

If you select Build Only, I believe the duplicated errors(error messages) will gone.

Looks like the duplicated error messages are not from Build/Compile, instead, I think they are from IntelliSense or one of the features which is for Xaml in IntelliSense. This may be a feature of Visual Studio, and designed like this. Up to now, I haven’t found any option to turn off this feature. Switch to Build Only may help to filter it, and it seems they always appear with duplicated messages and once you solve the errors the Compiler points, then they will both disappear.

If you need an explanation for this feature, I suggest you ask in Microsoft Developer Community, where VS Product Team may give you an explanation.

enter image description here

enter image description here

Tianyu
  • 895
  • 3
  • 7
  • The problem with Build Only is that it requires I build the project before I get the errors. IntelliSense has been great, I just don't know where this "XamlInProcLanguageClient" tool came from and why googling it shows no results. Maybe I'll try the MDC. – Michael Wagner Sep 20 '21 at 22:39
  • This solves the duplication in the error list panel, but note in the screenshot both intellisense bars at the top still show 4 errors. – Willster419 Mar 26 '22 at 01:00