A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.microsoft.com/en-us/visualstudio/debugger/supported-code-changes-csharp below:

Supported Code Changes (C# and Visual Basic) - Visual Studio (Windows)

The Hot Reload mechanism, previously called Edit and Continue, handles most types of code changes within method bodies. Most changes outside method bodies, and a few changes within method bodies, can't be applied during debugging, however. To apply those unsupported changes, you must stop debugging and restart with a fresh version of the code.

The Edit and Continue mechanism handles most types of code changes within method bodies. Most changes outside method bodies, and a few changes within method bodies, can't be applied during debugging, however. To apply those unsupported changes, you must stop debugging and restart with a fresh version of the code.

Supported changes to code

The following table shows the changes that might be made to C# and Visual Basic code during a debugging session without restarting the session.

Language element or feature Supported edit operation Limitations Types Add methods, fields, constructors, and more Yes Iterators Add or modify No async/await expressions Add or modify Yes Dynamic objects Add or modify No lambda expressions Add or modify Yes LINQ expressions Add or modify Same as lambda expressions Generics Add or modify Yes Language element or feature Supported edit operation Limitations Types Add methods, fields, constructors, and more Yes Iterators Add or modify No async/await expressions Add or modify Yes Dynamic objects Add or modify No lambda expressions Add or modify Yes LINQ expressions Add or modify Same as lambda expressions

Note

Newer language features such as string interpolation and null-conditional operators are generally supported by Edit and Continue. For the most current information, see the Enc Supported Edits page. For .NET Framework, the supported features are a subset of the listed features and are dependent on the compiler version.

.NET 6+ improvements

Improvements in .NET 6+ and Visual Studio 2022 and later versions include support for more types of edits that go beyond what was originally possible in older versions of Visual Studio. These improvements are available to both Hot Reload and the Edit and Continue experiences.

The .NET 6+ Hot Reload experience is powered by the Edit and Continue mechanism and Roslyn. Supported Edits lists the types of edits currently supported by Roslyn and potential future enhancements.

Unsupported changes to code

The following changes can't be applied to C# and Visual Basic code during a debugging session.

Unsafe code

Changes to unsafe code have the same limitations as changes to safe code, with one extra restriction: Edit and Continue doesn't support changes to unsafe code that exits within a method that contains the stackalloc operator.

Application support

Supported applications include:

For .NET 6 and later, editing is supported for the following file types:

Unsupported apps, platforms, and operations

Unsupported applications or platforms include:

For ASP.NET and ASP.NET Core, editing isn't supported for the following file types:

Unsupported scenarios

Edit and Continue isn't available in the following debugging scenarios:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4