Oharra
Baimena behar duzu orria atzitzeko. Direktorioetan saioa has dezakezu edo haiek alda ditzakezu.
Baimena behar duzu orria atzitzeko. Direktorioak alda ditzakezu.
El error NETSDK1032 se produce cuando hay un error de coincidencia entre el RuntimeIdentifier (RID), como win-x64 o linux-x64, y el PlatformTarget, como x64 o x86. El mensaje de error completo es similar al ejemplo siguiente:
La plataforma
RuntimeIdentifier'{RID}' y laPlatformTarget'{Target}' deben ser compatibles.
El RID se especifica en el archivo del proyecto o en la línea de comandos. Si no se especifica, el RID predeterminado usado es win-x64 para Windows, linux-x64 para Linux y osx-x64 para macOS.
El PlatformTarget se especifica en el archivo del proyecto o en la línea de comandos. Si no se especifica, el valor predeterminado es AnyCPU.
Este es un ejemplo de un archivo .csproj con RID incompatible y configuraciones de PlatformTarget:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net11.0</TargetFramework>
<PlatformTarget>x86</PlatformTarget>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>
Corrija el archivo de .csproj anterior cambiando PlatformTarget o RuntimeIdentifier. Por ejemplo, cambie PlatformTarget para que coincida con RID.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net11.0</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup>
</Project>
O cambie el RID para que coincida con el PlatformTarget:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net11.0</TargetFramework>
<PlatformTarget>x86</PlatformTarget>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
</PropertyGroup>
</Project>