A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/core/tools/sdk-errors/netsdk1032 below:

NETSDK1032: RuntimeIdentifier and PlatformTarget must be compatible. - .NET CLI

The error NETSDK1032 occurs when there's a mismatch between the RuntimeIdentifier (RID), such as win-x64 or linux-x64, and the PlatformTarget, such as x64 or x86. The full error message is similar to the following example:

The RuntimeIdentifier platform '{RID}' and the PlatformTarget '{Target}' must be compatible.

The RID is specified in the project file or the command line. If not specified, the default RID used is win-x64 for Windows, linux-x64 for Linux, and osx-x64 for macOS.

The PlatformTarget is specified in the project file or the command line. If not specified, the default is AnyCPU.

Here's an example of a .csproj file with incompatible RID and PlatformTarget settings:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <PlatformTarget>x86</PlatformTarget>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
  </PropertyGroup>
</Project>

Fix the preceding .csproj file by changing either PlatformTarget or RuntimeIdentifier. For example, change PlatformTarget to match the RID:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <PlatformTarget>x64</PlatformTarget>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
  </PropertyGroup>
</Project>

Or change the RID to match the PlatformTarget:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <PlatformTarget>x86</PlatformTarget>
    <RuntimeIdentifier>win-x86</RuntimeIdentifier>
  </PropertyGroup>
</Project>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4