简体   繁体   中英

Visual studio does not refresh the bin folder

I have Visual Studio 2010 which has a problem with one specific solution which is made of several C# projects. This problem does not come up with other projects or solution.

The problem is that if I make a change in a source file and place a break point in the code, the break point won't get hit. The warning message (when I hover the mouse over the red circle which indicates a break point) VS says that the source code file is different to whatever code which has been built and loaded.

If I remove the /obj/Debug folders then rebuild the project, everything will work fine. I placed this command in pre-Build command box (in project's properties page)

DEL  $(ProjectDir)obj\$(ConfigurationName)*.*  /q

It will fixe the problem if every time I run the project I re-Build it but does not really help if I just press F5 to debug the project.

Any help would be much appreciated.

How are you referencing the other libraries in bin? Are you doing a project reference or referencing the dll ?

If you are adding the dll to the project directly make sure that you have pdb and refresh files.

If possible try adding the external projects to the same solution, and do project reference.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM