edit and continue: Error BC36970 Changing the version of an assembly reference is not allowed during debugging

Topogigio 16 Reputation points
2022-01-14T11:06:05.82+00:00

Hi,
I've a VS2022 solution with several project. Basically it's a .NET 6.0 SPA app with WebAPI.

Every time I try to perform an edit and continue in my C# code, VS fails with this kind of error:

Error BC36970 Failed to emit module XXXX Changing the version of an assembly reference is not allowed during debugging: XXXX changed version to "1.0.0.0"

I cannot find a way to fix it, and so I'm not able to use edit and continue. Any idea?

thanks

Developer technologies | Visual Studio | Debugging
Developer technologies | C#
0 comments No comments
{count} vote

4 answers

Sort by: Most helpful
  1. Javango 10 Reputation points
    2023-02-23T16:45:55.86+00:00

    I have now exactly the same proplem. I recently updated the VS...

    1 person found this answer helpful.
    0 comments No comments

  2. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2022-01-17T07:43:50.343+00:00

    Hi @Topogigio ,

    Welcome to Microsoft Q&A!

    Please update your Visual Studio 2022 to the latest version and create a new project to verify if the issue persists or not.

    Meanwhile, please try to delete the .vs folder in your project folder and rebuild your project.

    By the way, you can refer to the similar issue and check if you have the same behavior or not:
    https://github.com/dotnet/roslyn/issues/28224#issuecomment-447017910

    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.

    0 comments No comments

  3. Topogigio 16 Reputation points
    2022-01-20T15:45:22.767+00:00

    Hi, VS is updated of course.

    The problem sometimes goes away for a while, then it returns after a few days.

    deleting .vs folder does not fix nothing


  4. Mojix 0 Reputation points
    2023-07-30T18:24:22.4333333+00:00
    Hi, I have also faced this problem recently and could not find the problem
    
    0 comments No comments

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.