Skip to content

Numerous CS9270 warnings caused by generated code #33866

@dotMorten

Description

@dotMorten

Description

When I build my project, I get numerous warnings from the generated code like this:

warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (dotnet/roslyn#72133)

Steps to Reproduce

  1. Clone the repro https://github.com/Esri/arcgis-toolkit-dotnet at tag v200.8.0 git clone https://github.com/Esri/arcgis-toolkit-dotnet --tag 200.8.0
  2. Open solution \src\Esri.ArcGISRuntime.Toolkit.sln in Visual Studio and build the project Esri.ArcGISRuntime.Toolkit.Maui
  3. Observe all the build warnings

Note that the project targets .NET 9, but same issue happens if you upgrade the targets to .NET 10.

Link to public reproduction project repository

https://github.com/Esri/arcgis-toolkit-dotnet

Version with bug

10.0.30

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

No response

Affected platforms

iOS

Affected platform versions

All

Did you find any workaround?

Only setting NoWarn, but that feels wrong.

Relevant log output

3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-BasemapGallery-BasemapGallery.Appearance.cs-GeneratedBindingInterceptors-92-28.g.cs(43,4,43,133): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-BasemapGallery-BasemapGallery.Appearance.cs-GeneratedBindingInterceptors-111-23.g.cs(43,4,43,134): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-BasemapGallery-BasemapGallery.Appearance.cs-GeneratedBindingInterceptors-164-27.g.cs(43,4,43,134): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-BasemapGallery-BasemapGallery.Appearance.cs-GeneratedBindingInterceptors-175-28.g.cs(43,4,43,134): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-FloorFilter-FloorFilter.cs-GeneratedBindingInterceptors-119-32.g.cs(43,4,43,117): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-FloorFilter-FloorFilter.DefaultTemplates.cs-GeneratedBindingInterceptors-52-23.g.cs(43,4,43,133): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-FloorFilter-FloorFilter.DefaultTemplates.cs-GeneratedBindingInterceptors-69-23.g.cs(43,4,43,133): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-FloorFilter-FloorFilter.DefaultTemplates.cs-GeneratedBindingInterceptors-88-23.g.cs(43,4,43,133): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-FloorFilter-FloorFilter.DefaultTemplates.cs-GeneratedBindingInterceptors-124-24.g.cs(43,4,43,134): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-FloorFilter-FloorFilter.DefaultTemplates.cs-GeneratedBindingInterceptors-133-27.g.cs(43,4,43,134): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-Legend-Legend.cs-GeneratedBindingInterceptors-37-23.g.cs(43,4,43,106): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-Legend-Legend.cs-GeneratedBindingInterceptors-44-23.g.cs(43,4,43,106): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-Legend-Legend.cs-GeneratedBindingInterceptors-52-20.g.cs(43,4,43,106): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-Legend-Legend.cs-GeneratedBindingInterceptors-55-23.g.cs(43,4,43,106): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-OverviewMap-OverviewMap.cs-GeneratedBindingInterceptors-53-22.g.cs(43,4,43,116): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-OverviewMap-OverviewMap.cs-GeneratedBindingInterceptors-60-19.g.cs(43,4,43,116): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-OverviewMap-OverviewMap.cs-GeneratedBindingInterceptors-62-21.g.cs(43,4,43,116): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-SearchView-SearchView.Appearance.cs-GeneratedBindingInterceptors-59-23.g.cs(43,4,43,125): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-SearchView-SearchView.Appearance.cs-GeneratedBindingInterceptors-82-23.g.cs(43,4,43,125): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
3>E:\src\Toolkit\Toolkit.Maui\obj\Debug\net9.0-windows10.0.19041.0\Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\E--temp-test-200.8.0-src-Toolkit-Toolkit.Maui-SearchView-SearchView.Appearance.cs-GeneratedBindingInterceptors-89-24.g.cs(43,4,43,125): warning CS9270: 'InterceptsLocationAttribute(string, int, int)' is not supported. Move to 'InterceptableLocation'-based generation of these attributes instead. (https://github.com/dotnet/roslyn/issues/72133)
etc...

Metadata

Metadata

Assignees

No one assigned

    Labels

    t/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions