Mike Pike
Mike Pike

Reputation: 333

Visual Studio keeps running the old build

I have a simple Silverlight program that displays a bunch of images. I modified it do display more images, but it when I hit "run without debugging" is keeps running the old build with fewer images. When I copy the code into a new project and run it, it works fine for the first time, but then each subsequent change is not displayed. What could be the problem? I'm using Visual Web Developer 2008 Express.

Upvotes: 30

Views: 63210

Answers (20)

Sadagopan TS
Sadagopan TS

Reputation: 1

Please check is there any old .tlb file present in someother folder. In my case i was using the .tlb file generated using .NET dll and then created the .tlb file using RegAsm. I tried to use the .tlb file in vb6 code, it still refers old code only. After a long search i found same .tlb file older version found in Visual Studio\VB98 folder. I removed it then it worked fine. This may not be relevent for this issue but could give you another way of thinking

Upvotes: 0

RedSonja
RedSonja

Reputation: 430

I had this recently too and I didn't see the answer here. I was changing an MMI to get rid of redundant buttons, and they didn't go away.

Really old legacy code. To make it keep user settings - like language - someone had made it keep the Settings. I was not allowed to change this, they want it like that.

To get rid of the old settings and allow new ones:

open regedit

navigate to HKEY_CURRENT_USER - Software - MyProject - SubProject

here you see Recent File List and Settings. Delete Settings completely - don't worry, it will make a new one.

Upvotes: 0

Siphe Thonyama
Siphe Thonyama

Reputation: 11

I had to clear browsing data and it worked in my case

Upvotes: -1

Pratapn
Pratapn

Reputation: 1

There is a scroll bar at the top which has 3 options:

  • debug
  • release
  • configuration manager

Make sure release is selected.

Upvotes: -1

Morcilla de Arroz
Morcilla de Arroz

Reputation: 2182

I used to suffer this. All of this used to be (for me) a folder's contents issue.

Maybe you can check this:

  • Delete %windir%\microsoft.net\framework\v4.0xxx\Temporary
  • IIS Express: even if you change the output file for compiled results, you will see in applicationhost.config that many times IISExpress is really "looking" to the default bin folder of your project.
  • It is even possible that you have different configurations for Debug or Release, so maybe IIS is looking BIN with Release code, and you are now compiling in Debug to another folder, do you understand me?

Upvotes: 2

Doppler Effect
Doppler Effect

Reputation: 1

In my case(VS 2015) it was because of the missing dll in the .exe directory... I made a "clean solution", then additionally deleted all bin and obj folders' contents. Reason to do so was VS keeping to load old dll build. Solution was to select folder of the running debug config, i.e. everytime I rebuild project destination location with dll and a reference to it stays with warning mark for some time until intellitrace does its job. After doing the setup mentioned above, I still have to do a manual rebuild on a project that generates a dll into specified dir. Pressing F5 does nothing, I don't have time to find out why... Main thing is its working for me

Upvotes: 0

ADyson
ADyson

Reputation: 121

I just had this happen to me in VS 2013 for Web. Had to change the Project URL in:

"Project properties"
"Web" tab
  "Servers"

To a different localhost number and recreate Virtual directory.

Before my Project URL was:

http://localhost:55487/

I changed it to:

http://localhost:55488/ 

Then clicked "Create Virtual Directory".

Would like to know why this happened in the first place.

Upvotes: 12

Graham Laight
Graham Laight

Reputation: 4840

Check you haven't got two versions of whichever file you're updating (one for one group of users, one for a different group of users).

Upvotes: 0

Mick
Mick

Reputation: 161

I also had this issue and while some of the fixes above helped temporarily, the one that worked for me was to remove the history and caching in Internet Options.

Go into Internet Option (also available in VS via Tools > options > Environment > Web Browser > Internet Explorer Options).

On the General tab click Settings in the Browsing History section.

  • On the Temporary Internet Files page select Every time I start Internet Explorer
  • On the History tab set the Days to keep history to 0
  • On the Caches and Database tab make sure Allow website caches and databases is NOT ticked.

I'm not sure if all of the above are required, but I've made a number of changes to files and so far they have been reflected straight away in the dynamic versions without any noticeable performance problems.

I've also since realised if I set 'Every time I visit the webpage' instead of 'Every time I start Internet Explorer' I don't have to stop and restart the project to see the changes. Which is how it should be!

Upvotes: 2

Georgy Batalov
Georgy Batalov

Reputation: 499

Just delete folder 'Release' in project with old code build.

Upvotes: 1

hogarth45
hogarth45

Reputation: 3657

I had this issue in a web site.
The site referenced 1 of the projects in the solution, and changes to it would not reflect in the debug.
Issue was a third project was referencing an outdated dll of the same same referenced project.
I removed the project and all references in other projects and readded and re-referenced everything and it worked fine.

Upvotes: 0

The Godfather
The Godfather

Reputation: 929

If this is a web application, change the Project URL with a new port number.

Example :

Change from http://localhost:3688/

To http://localhost:36881/

To do this:

  1. Navigate to Project properties -> Web

  2. Change the URL

  3. Hit "Create Virtual Directory"

  4. Finally, Build and RUN

Upvotes: 0

Sameera
Sameera

Reputation: 1113

I was also suffering from this issue and none of the suggestions worked. I was building a Office.js add-in and debugging was with IIS Express. What fixed the issue for me was deleting files in C:\Users\<user>\AppData\Local\Temp\Temporary ASP.NET

Actually, I went ahead and and deleted the entire C:\Users\<user>\AppData\Local\Temp folder out of spite :)

Upvotes: 2

Kurren
Kurren

Reputation: 837

I had the same problem and none of the answers were working for me. It turns out that building the ASP.Net project did not build the Silverlight project, so running without debugging didn't update the Silverlight.

Fix: Right click the Asp.Net project. Build Dependencies > Project Dependencies. Check the Silverlight project. Now building should work.

Upvotes: 0

Pitka
Pitka

Reputation: 525

  1. Stop all incntance of VS.
  2. Delete all /bin, not just /bin/Debug. All /bin
  3. Remove user option .suo file in solution dir. It will create on self.
  4. Remove all restore windows point
  5. Stop IIS. 6 Start IIS after 1 minutes.
  6. Rebuild solution, Buid projects

It happing on me too. Very nasty. You may restart your computer. Check for global asembly dll.

Upvotes: 1

sondergard
sondergard

Reputation: 3234

I found that I had to close all open instances of Visual Studio before I got it working again

Upvotes: 4

ujju
ujju

Reputation: 39

This happens because your cache memory is full. just go to you bin and obj folder and delete all the temporary files. Now it will run properly.

Upvotes: 3

Rui Belo Pais
Rui Belo Pais

Reputation: 231

Always check "Configuration Manager" option on "Build" menu in Microsoft Visual Web Developer. The checkBox "build" has to be checked, otherwise it won't build.

Happened to me, I hope this helps others.

Upvotes: 23

CaptainPlanet
CaptainPlanet

Reputation: 735

Maybe it's a caching issue (webbrowser / proxy).

To fool the browser try to embed the xap file with an additional parameter that changes every time you open the plugin:

<param name="source" value="ClientBin/BubuApp.xap?<%=Guid.NewGuid().ToString() %>"/>

If this don't help, try to clean the project (delete obj / bin folders & xap file).

Upvotes: 2

Astromaz3
Astromaz3

Reputation: 191

Happened to me too. Well i dont know the exact reason for this behavior. But when i close the visual C express 10 and then open again and build it builds the new saved file. I guess it still hangs on to the old file when there is an error in some debug mode or something.

Upvotes: 1

Related Questions