MSB3270: ビルドされているプロジェクトの 'arch' のプロセッサ アーキテクチャと、参照 'reference'、'arch' のプロセッサ アーキテクチャの間で不一致が発生しました
完全なメッセージは次のテキストのようになります。
MSB3270: There was a mismatch between the processor architecture of the project being built 'architecture' and the processor architecture of the reference 'dependency', 'architecture'. This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
考えられる原因
プロジェクトが構成されるターゲット アーキテクチャに一致しないアーキテクチャの依存関係を使用しようとしていると、メッセージに表示されます。 まず、ターゲット アーキテクチャが正しいことを確認し、その後、参照される依存関係がすべて、そのターゲット アーキテクチャに一致するようにします。
Visual Studio で、Configuration Manager を使用し、ビルドされるアーキテクチャを制御できます。
MSBuild では、PlatformTarget
プロパティがターゲット プラットフォームの定義に使用されます。
プロジェクト ファイルで MSBuild プロパティ ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch
を None または Warning に設定すると、この警告は表示されません。
<PropertyGroup>
<!-- other property settings -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
</PropertyGroup>
関連項目
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示