Edit and Continue failed in ASP.NET Core web project

See original GitHub issue

Describe the bug

Error CS8055: “Cannot emit debug information for a source text without encoding.” is reported when editing ASP.NET Core web project while debugging.

Reported as VS feedback: https://developercommunity.visualstudio.com/content/problem/414645/edit-and-continue-not-working-with-aspnet.html. Internal bug 736856.

To Reproduce

  1. Create a C# ASP.NET Core Web Application (MVC). ASP.NET Core 3.0.
  2. Set a break point in Index method in HomeController.cs.
public IActionResult Index()
{
   // int i = 1;
   return View();
}
  1. F5 (The platform is AnyCPU).
  2. Uncomment // int i = 1;
  3. F10

Expected

ENC is successful.

Actual

ENC failed with error CS8055: “Cannot emit debug information for a source text without encoding.”

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
SeppPennercommented, Jun 26, 2019

@danroth27 It’s alright. What I was trying to say is: Running without the debugger works properly (As I told in https://github.com/aspnet/AspNetCore/issues/11489#issuecomment-505330487). Like you pointed out in the comment I quoted above: The support for complete live reload (https://github.com/aspnet/AspNetCore/issues/5456) is not yet done.

I don’t have other issues, I’m just waiting for https://github.com/aspnet/AspNetCore/issues/5456 to be done 😃

Edit: @danroth27 Now I understand why you asked. In my case it was not some error in the .cs class but in a razor page. Sorry for that confusion.

2reactions
rynowakcommented, Apr 23, 2019

This is fixed in VS 2019 16.1 Preview 1

Read more comments on GitHub >

github_iconTop Results From Across the Web

`Enable Edit and Continue` option does not work in ASP. ...
1.Add Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation NuGet package to the project. 2.Add the following in Program.cs: builder.Services.
Read more >
Edit and continue not working for asp.net core 3.0 with VS ...
I created another ASP.Net core web application with .Net Core 3.0 and experienced same issue. Edit and Continue checkbox is checked under Tools- ......
Read more >
VS 2022: Edit and continue isn't working.
Since recently upgrading to VS 2022, I cannot edit when in debug/break without being prompted: Edits were made which cannot be compiled.
Read more >
16.9.1 and 16.9.2 Edit And Continue Broken after upgrade
Create new ASPnet MVC project. Set Breakpoint in HomeController's Index -> on break, eg add a varialbe -> continue Stop WebApp Got to...
Read more >
Edit running code with Hot Reload - JetBrains Rider
Hot Reload, also known as Edit & Continue. Learn how to make changes while running and debugging without restarting the session.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found