简体   繁体   中英

Visual Studio 2013 is running old code

I have searched and found other topics on this, but none of the solutions seem to work for me. Visual Studio is running old code in debug mode and release mode. If I go to the actual directory and launch the exe, it is the latest code. It is a XAML project.

Things I have tried: 1) Deleted bin and obj folders 2) Rebuilt solution 3) Cleaned solution 4) Made sure the project is set to build in Configuration Manager

Update: I tried adding a new configuration in Configuration Manager. The path is totally different, and it still running the old code. The exe built with the new config is the right code when I launch it manually, but it seems like visual studio is running a cached version of the exe.

Another gotcha I see a lot - be careful with shortcuts. If you are opening the solution via Recent Projects or another shortcut, try opening it via File -> Open or clicking on the solution file itself instead. I see a lot of developers looking at old code or the wrong branch because of this.

Can also try changing the assembly version number. Every once in awhile that will somehow make a difference.

I am not sure what exactly helped, but one thing is certain:

i marked .js file properties "Build action" as "Compile".

Tryed to deploy (got an error of course), and changed it back to "Content".

Rebuild, deploy, run debugger and FINALY it works on my current code.

The Error is back on my "new old" code

What i do is:

click "Continue", go to opened IE window with my page\\site, press CTRL + F5,

and what i see?

My new current code inside VS debugger...

Error is gone

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