Visual Studio 2022 delete all "using" from my archive

sergio luque aibar 0 Reputation points
2023-07-01T13:15:21.7433333+00:00

When i close my project in visual studio and obiusly i saved, visual delete using.UnityEngine; and all usings that i need to run my project in unity, im learning that how make games, its visual who delete thats usings because in unity preview usings still are there, but just closed visual they desapear.

How can i solve that problem, i unistalles and reintalled, shutdown de pc, and also deleted extension installed withou intellicode etc ... why its happening? is frustrating.

Microsoft Visual Studio Community 2022

Versión 17.6.4

VisualStudio.17.Release/17.6.4+33815.320

Microsoft .NET Framework

Versión 4.8.09032

Versión instalada: Community

Visual C++ 2022 00482-90000-00000-AA300

Microsoft Visual C++ 2022

Administrador de paquetes NuGet 6.6.0

Administrador de paquetes NuGet de Visual Studio. Para obtener más información acerca de NuGet, visite https://docs.nuget.org/

Code alignment 15.1.118.0

Code alignment helps you present your code beautifully, enhancing clarity and readability.

Herramientas de Azure App Service v3.0.0 17.6.326.62524

Herramientas de Azure App Service v3.0.0

Herramientas de C# 4.6.0-3.23259.8+c3cc1d0ceeab1a65da0217e403851a1e8a30086a

Los componentes de C# utilizados en el IDE. En función del tipo de proyecto y la configuración, se podría utilizar una versión diferente del compilador.

Herramientas de Visual Basic 4.6.0-3.23259.8+c3cc1d0ceeab1a65da0217e403851a1e8a30086a

Los componentes de Visual Basic utilizados en el IDE. En función del tipo de proyecto y la configuración, se podría utilizar una versión diferente del compilador.

Microsoft JVM Debugger 1.0

Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Visual Studio IntelliCode 2.2

Visual Studio Tools para Unity 17.6.1.0

Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-07-03T08:12:08.66+00:00

    Hi @sergio luque aibar

    Welcome to Microsoft Q&A! 

    Do you mean that all usings for Unity project will be removed when saving the project? 

    Please go to Tools > Options > Text Editor > Code Cleanup > uncheck the “Run Code Cleanup profile on Save” option. 

    If it only occurs in Unity project, you can post it in dedicated Unity forum

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

     


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.