How to fix that running and build error in the visual studio community 2022

ANOJAN .T 5 Reputation points
2024-02-22T10:26:52.3333333+00:00

**Severity Code Description Project File Line Suppression State Error Project "C:\Program Files\dotnet\packs\Microsoft.Maui.Sdk\8.0.3\Sdk\AutoImport.props" was not imported by "C:\Program Files\dotnet\sdk\8.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.props" at (14,3), due to the file being invalid. back C:\Program Files\dotnet\packs\Microsoft.Maui.Sdk\8.0.3\Sdk\AutoImport.props 14 **

**Severity Code Description Project File Line Suppression State Error Project "C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\7.0.101\Sdk\AutoImport.props" was not imported by "C:\Program Files\dotnet\sdk\8.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.ImportWorkloads.props" at (14,3), due to the file being invalid. back C:\Program Files\dotnet\packs\Microsoft.Maui.Resizetizer.Sdk\7.0.101\Sdk\AutoImport.props 14 **

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,313 questions
Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
235 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,012 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
352 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
1,067 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2024-02-22T10:26:52.3366667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    This error occurs when Visual Studio is unable to import the AutoImport.props file due to it being invalid. This issue is related to the Microsoft.Maui.Sdk and Microsoft.Maui.Resizetizer.Sdk packages. To fix this issue, try the following steps:

    1. Close Visual Studio.
    2. Delete the contents of the following folders:
      • C:\Program Files\dotnet\sdk\NuGetFallbackFolder
      • C:\Users{username}.nuget\packages
    3. Open Visual Studio and reload the solution.
    4. Rebuild the solution.

    If the issue persists, try uninstalling and reinstalling the Microsoft.Maui.Sdk and Microsoft.Maui.Resizetizer.Sdk packages.


    References:


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.