メッセージの例
warning XA0125: 'AndroidApp1.pdb' is using a deprecated debug
information level. Set the debugging information to Portable in the
Visual Studio project property pages or edit the project file in a
text editor and set the 'DebugType' MSBuild property to 'portable' to
use the newer, cross-platform debug information level. If this file
comes from a NuGet package, update to a newer version of the NuGet
package or notify the library author.
問題点
MSBuild プロパティをDebugTypeまたはfullに設定してビルドされた.mdbまたは pdbonly シンボル ファイルのサポートが非推奨になりました。 これは、アプリケーション プロジェクト内の .mdb ファイルと .pdb ファイル、および NuGet パッケージを含む参照先ライブラリに適用されます。
ソリューション
DebugTypeをアプリケーションプロジェクト内およびすべてのライブラリ参照でportableに設定してください。
portable は、今後のすべてのプロジェクトに推奨される設定です。 古い full と pdbonly の設定は、以前の Windows 固有のファイル形式用です。 .NET 6 以降では、これらの古い形式はサポートされません。
Visual Studio で、プロジェクト のプロパティ ページで [プロパティ] > [ビルド] > [詳細設定 ] に移動し、 デバッグ情報を[ポータブル] に変更します。
Visual Studio for Mac で、[ビルド > コンパイラ] >プロジェクトのプロパティ ページのデバッグ情報に移動し、[デバッグ情報] を [ポータブル] に変更します。
問題のあるシンボル ファイルが NuGet パッケージから取得されている場合は、新しいバージョンのパッケージに更新するか、ライブラリの作成者に通知します。