Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.0.100] NETSDK1083: RuntimeIdentifier 'win10-x86' is not recognized in .NET 9.0 for .NET 8 Target Framework with Evergine 2024.6.28.781 #26052

Closed
emilisa707 opened this issue Nov 22, 2024 · 6 comments
Labels
platform/windows 🪟 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed t/bug Something isn't working
Milestone

Comments

@emilisa707
Copy link

Description

I encountered the following error while building my project using the .NET 9.0 SDK:

C:\Program Files\dotnet\sdk\9.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): Error NETSDK1083: The specified RuntimeIdentifier 'win10-x86' is not recognized. See https://aka.ms/netsdk1083 for more information.

Questions:

  1. Is win10-x86 a valid RuntimeIdentifier for .NET 9.0? If not, what should I use instead?
  2. Is there a compatibility issue between targeting net8.0 and using the .NET 9.0 SDK?
  3. Are there additional steps I should take to resolve this issue?
    Any help or guidance would be appreciated!

Steps to Reproduce

  1. SDK Version:
    .NET SDK 9.0.100 (verified using dotnet --list-sdks)

  2. Target Framework:
    net8.0 (because i am using Evergine:

  3. Project File (.csproj):
    Here is a simplified version of my .csproj file:

<PropertyGroup>
    <TargetFramework>Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFramework>
    <RuntimeIdentifier>win10-x86</RuntimeIdentifier>
</PropertyGroup>

Development Environment:

OS: Windows 11 Home 64-bit (10.0, Build 22632)
IDE: Microsoft Visual Studio Community 2022 (64-bit) - Current
Version 17.12.1

Link to public reproduction project repository

No response

Version with bug

9.0.10 SR1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

net8.0-windows10.0.19041.0

Did you find any workaround?

  1. Changed RuntimeIdentifier to win-x86 or win-x64, but the same issue persists.
  2. Verified the .NET SDK installation (dotnet --list-sdks confirms the correct version is installed
  3. Ran dotnet clean and dotnet restore before rebuilding.
  4. have tried to instal workload with command: dotnet workload install maui
    Image
  5. have adding <UseRidGraph>true</UseRidGraph>
  6. have download
  7. Followed the discussion in this GitHub issue comment to check for potential workarounds, but the error persists in my case.

Relevant log output

@emilisa707 emilisa707 added the t/bug Something isn't working label Nov 22, 2024
@Saccomani
Copy link

Same issue here, I can't publish to windows...

@drasticactions
Copy link
Contributor

@emilisa707 Did you go to the URL in the error message? I believe it explains the change and how to handle it.

https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/rid-graph#recommended-action

If you specify the RID by using the RuntimeIdentifier MSBuild property in your project file (*.csproj, *.vbproj, or *.fsproj), change it accordingly. For example, change <RuntimeIdentifier>win10-x64</RuntimeIdentifier> to <RuntimeIdentifier>win-x64</RuntimeIdentifier> in your project file:

If you need to revert to the previous behavior of using the old, full RID graph, you can set the UseRidGraph MSBuild property to true in your project file. However, the old RID graph won't be updated in the future to attempt to handle any other distros or architectures.

<PropertyGroup>
  <UseRidGraph>true</UseRidGraph>
</PropertyGroup>

This is a .NET breaking change, it's unrelated to MAUI specific code.

@drasticactions drasticactions added the s/needs-info Issue needs more info from the author label Nov 25, 2024
@emilisa707
Copy link
Author

@emilisa707 Did you go to the URL in the error message? I believe it explains the change and how to handle it.

https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/rid-graph#recommended-action

If you specify the RID by using the RuntimeIdentifier MSBuild property in your project file (*.csproj, *.vbproj, or *.fsproj), change it accordingly. For example, change <RuntimeIdentifier>win10-x64</RuntimeIdentifier> to <RuntimeIdentifier>win-x64</RuntimeIdentifier> in your project file:

If you need to revert to the previous behavior of using the old, full RID graph, you can set the UseRidGraph MSBuild property to true in your project file. However, the old RID graph won't be updated in the future to attempt to handle any other distros or architectures.

true This is a .NET breaking change, it's unrelated to MAUI specific code.

Thank you for the detailed explanation! I’ve already tried both suggestions:

Updating the to win-x86 or win-x64 as per the compatibility documentation.
Adding true to revert to the old behavior.
Unfortunately, neither resolved the issue. I’m still encountering the same error when building the project.

Since I’m also using Evergine in my development environment, could this be related to how it handles runtime identifiers? If you have any additional ideas or steps I might have missed, I’d appreciate further guidance!

@dotnet-policy-service dotnet-policy-service bot added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Nov 25, 2024
@Saccomani
Copy link

@emilisa707 Você acessou a URL na mensagem de erro? Acredito que explica a mudança e como lidar com ela.
https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/rid-graph#recommended-action

Se você especificar o RID usando a propriedade RuntimeIdentifier MSBuild no arquivo de projeto (*.csproj, *.vbproj ou *.fsproj), altere-o adequadamente. Por exemplo, altere para no arquivo de projeto:<RuntimeIdentifier>win10-x64</RuntimeIdentifier>``<RuntimeIdentifier>win-x64</RuntimeIdentifier>

Se você precisar reverter para o comportamento anterior de usar o grafo RID antigo e completo, poderá definir a propriedade UseRidGraph MSBuild como true no arquivo de projeto. No entanto, o gráfico RID antigo não será atualizado no futuro para tentar lidar com outras distribuições ou arquiteturas.

verdadeiro

Esta é uma alteração significativa do .NET, não está relacionada ao código específico do MAUI.

Obrigado pela explicação detalhada! Já tentei as duas sugestões:

Atualizando o para win-x86 ou win-x64 de acordo com a documentação de compatibilidade. Adicionando true para reverter ao comportamento antigo. Infelizmente, nenhum dos dois resolveu o problema. Ainda estou encontrando o mesmo erro ao construir o projeto.

Como também estou usando o Evergine em meu ambiente de desenvolvimento, isso pode estar relacionado à forma como ele lida com identificadores de tempo de execução? Se você tiver alguma ideia ou etapa adicional que eu possa ter perdido, gostaria de receber mais orientações!

@emilisa707 Did you go to the URL in the error message? I believe it explains the change and how to handle it.
https://learn.microsoft.com/en-us/dotnet/core/compatibility/sdk/8.0/rid-graph#recommended-action

If you specify the RID by using the RuntimeIdentifier MSBuild property in your project file (*.csproj, *.vbproj, or *.fsproj), change it accordingly. For example, change <RuntimeIdentifier>win10-x64</RuntimeIdentifier> to <RuntimeIdentifier>win-x64</RuntimeIdentifier> in your project file:

If you need to revert to the previous behavior of using the old, full RID graph, you can set the UseRidGraph MSBuild property to true in your project file. However, the old RID graph won't be updated in the future to attempt to handle any other distros or architectures.

true

This is a .NET breaking change, it's unrelated to MAUI specific code.

Thank you for the detailed explanation! I’ve already tried both suggestions:

Updating the to win-x86 or win-x64 as per the compatibility documentation. Adding true to revert to the old behavior. Unfortunately, neither resolved the issue. I’m still encountering the same error when building the project.

Since I’m also using Evergine in my development environment, could this be related to how it handles runtime identifiers? If you have any additional ideas or steps I might have missed, I’d appreciate further guidance!

did you found some workaround? i need to publish and does not works for me ..

@StephaneDelcroix StephaneDelcroix added this to the Backlog milestone Nov 27, 2024
@Saccomani
Copy link

I foud a workaround, using the CLI for publish, works for me!

I follow this instructions

https://learn.microsoft.com/en-us/dotnet/maui/windows/deployment/overview?view=net-maui-9.0

@ninachen03 ninachen03 added the s/triaged Issue has been reviewed label Dec 2, 2024
@jfversluis
Copy link
Member

Don't think this is something for .NET MAUI and is properly documented. Thanks for all the help here everyone!

@jfversluis jfversluis closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/windows 🪟 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants