Select to view content in your preferred language

XAML errors when creating a new ArcGIS PRO dockpane

136
2
4 weeks ago
RogerAsbury
Frequent Contributor

In Visual Studio 2022, when creating a new ArcGIS PRO dockpane for a project, the default dockpane XAML file created seems to have a number of errors, as shown in the screenshot below. However, if run, everything runs fine, but the XAML designer won't display in VS giving the error "Invalid Markup".

RogerAsbury_0-1734567325106.png

The squiggly blue underlines tend to contain errors such as:

RogerAsbury_1-1734567453267.png

Just curious how I can fix this. 

For reference:
Visual Studio 2022 vers. 17.11.5

ArcGIS PRO sdk for .net vers. 3.4.0.55405

--
Roger Asbury
Analyst/Programmer - Fairbanks North Star Borough
Tags (2)
0 Kudos
2 Replies
CharlesMacleod
Esri Regular Contributor

binding errors like those usually come from the vs designer attempting to load a/the control into the VS designer UI. they are not compilation errors as such which is why the addin compiles and runs ok.

I wonder if your issue might be related to this post: https://developercommunity.visualstudio.com/t/Update-to-Version-1780-causes-error-T/10519868

fyi - I think u can modify what gets output here (if u wanted to):

https://stackoverflow.com/questions/62838824/how-to-send-databinding-errors-to-visual-studios-output... 

 

 

 

0 Kudos
Wolf
by Esri Regular Contributor
Esri Regular Contributor

I have experienced this issue myself and traced it back to some random issue with the XAML designer.  The errors you are seeing are only 'XAML Designer' errors and usually the errors go away when you close the 'XAML Designer'.  The error output is caused by a bug in the 'XAML Designer' and therefore you can 'build and run' the app and bring up your dockpane, even with these 'XAML Designer' errors.   Sometimes i was able to fix the issue by closing the solution, deleting the obj and bin folders, reopening the solution and then performing a 'rebuild all'. 

0 Kudos