"At the moment, the breakpoint will not be deleted. A copy of the file was found in the DLL file, but the current source code is different from the other."

I keep getting this error saying that there is a copy of the .cs file, so the breakpoint will not be affected.

I tried to clear the solution, recreate, delete the .pdb files in the obj and bin folders, close VS and restart it, restart the whole machine (this is Windows! Sometimes the most complicated, unexplained problems can be fixed as follows:)

Any idea what else I can try? this is a .net project on VS2015

Breakpoint error

+11
c # visual-studio-2015 breakpoints
source share
9 answers

I found a problem, it turned out that IIS was configured to use another copy of the project, which I had in my backup folder. Sounds pretty stupid, but I will leave this question open if someone has something like that.

+5
source share

Here's what to look at:

  • If you recently changed the names of the names of the names or classes, an older version of the dll may be installed in the asp.net cache. Often deleting files here and restoring will solve the problem.

c: \ Users \ yourname \ AppData \ Local \ Temp \ Temporary ASP.NET Files \

  1. Test your views to make sure you refer to the correct class names.
+3
source share

Check the physical directory in which the CS file is stored, there may be two separate files, and if you do not open .csproj in a text editor (and not VS). See if the file is referenced twice. If so, just delete one of the lines. If that doesn't work, you can always do what it says and set the location of the breakpoint :)

0
source share

Try to restore the solution.

Sometimes there are post-build scripts that copy DLLs from one project to another in order to update DLLs in different projects. If you modify and compile only one project, some of these scripts may not run, and old DLLs may not be updated.

0
source share

Someone has the same problem, go to iis, then the application pools on the left, then select the application pool, and then right-click View Applications. Now, under the physical path, you can see the physical path to which your virtual path will be bound, so make sure that the physical path points to the right folder, and if it does not point to the right folder, then remove the application from the application pool and add it again

0
source share

Although my current project configuration was set to Debug , it seemed like it was compiling as Release .

I removed (deleted) Web.Release.config from my project, recompiled the solution, and then returned Web.Release.config .

Now everything works just fine. What kind of strange behavior, huh? :)

0
source share

This happens with a debugging project when you try to copy a successfully created project from the root (root folder of the project) and save a copy of it in the "Project" folder of the corresponding Visual Studio.

When you do the above step, the Visual Studio debug location sometimes continues to reference the built-in DLLs in the copy / backup folder.

The same can be changed ONE OF THE METHODS written here.

But if you use the IIS-EXPRESS built into Visual Studio, you need to go to the project properties "Properties | alt + enter" => "Web" => In the "Servers" section, select IIS Express => For the current project URL, click " Create virtual directory. "

This will warn you that the current project URL refers to some other project location (your copy / backup folder). Confirm your choice for the dialog box, and here you are, again CLICKING on your control points.

0
source share

This may be due to an invalid library in your link.

When I got this problem, I just started a new solution with an old project. I have not changed the target library in the section Project-> link-> input. Therefore, as soon as I made the changes, I received this error. Each solution stores a copy of the library.

0
source share

I had the same problem and solved it by removing the [System.Diagnostics.DebuggerStepThroughAttribute()] attribute in the class.

0
source share

All Articles