Could not resolve SDK "Microsoft.NET.Sdk". Exactly one of the probing messages below indicaates why we could not resolve the SDK

Rafael Pereira 0 Reputation points
2023-03-18T17:04:28.6666667+00:00

I am currently having this error in Xamarin, in compiling my project.

It has an error after creating my first project in Xamarin.

(DOES NOT SHOW MAINPAGE.XAML PASTE).

0D1B322E-2F77-465F-A08E-791F68165FF7

I tried the following steps to fix this issue:

1 - Repair my Visual Studio

2 - Uninstall my Visual Studio and Install again

3 - File changes inside my File Explorer.

4 - I created a MainPage.xaml page, but it doesn't work

5 - I already have updated jdk and sdk

6 - I didn't change the PATH path, I couldn't.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,291 questions
{count} votes

2 answers

Sort by: Most helpful
  1. JOHNSON A 5 Reputation points
    2023-03-19T04:32:39.1033333+00:00

    Hi @Rafael Pereira , Thanks for using Microsoft Q&A Platform.

    I empathize with your disappointment ,

    It sounds like there might be an issue with the SDK version that Xamarin is trying to use. Here are a few steps you can try to resolve the issue:

    Check the SDK version in your project file: Make sure that the <TargetFramework> element in your project file is set to a valid version of the .NET SDK. You can find a list of valid versions on the Microsoft website.

    Install the required SDK: If the SDK is not installed on your machine, you can try installing it manually from the Microsoft website or using the Visual Studio Installer.

    Clear the NuGet cache: In Visual Studio, go to Tools > Options > NuGet Package Manager > General and click on "Clear All NuGet Cache(s)". Then try rebuilding your project.

    Check the references in your project: Make sure that all the required references are included in your project. You can check the references by right-clicking on your project in the Solution Explorer and selecting "Manage NuGet Packages".

    Try creating a new project: If none of the above steps work, try creating a new project from scratch and see if you still encounter the same error. If the new project works, then there might be an issue with your original project file.

    I hope this helps.

    Regards,

    Johnson A

    -Please kindly accept the answer and vote 'Yes' if you feel helpful to support the community, thanks.

    1 person found this answer helpful.
    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more