0

I'm experiencing some strange behaviour with my ASP.NET MVC 5 application, running on Visual Studio Ultimate 2013, in Windows 8 Professional, and using MongoDB 2.6 as the database.

Originally, there was one solution; let's call this Alpha. Then, I copied the solution (literally copied and pasted in Windows Explorer), to create a new solution; let's call this one Bravo. I changed the solution and project name and all associated filenames, then edited the content of Bravo significantly such that it appeared very different to Alpha when the application was run in a browser.

The strange behaviour is as follows. If I am working with Bravo in Visual Studio, and I run it in a browser, then everything appears as would be expected with Bravo. However, if I then load Alpha in Visual Studio, and then I run Bravo, then the website that is displayed is actually that represented by the code in Alpha, not Bravo. If I then close Visual Studio instance running Bravo, restart it, and then run the Bravo application, the website displayed is back to the expected version for Bravo.

So, it seems that there is still something remaining in Bravo that is referencing Alpha. If I load up Alpha, then something is being loaded into memory which overrides the data which Bravo provides during the application launch. Only when I restart Visual Studio and refresh this memory with Bravo, does it run with the updated version of Bravo, rather than the original version of Alpha.

Similarly, if I have Alpha loaded in Visual Studio, and then load the Bravo solution in another instance of Visual Studio, then run Alpha - it displays what I would expect to appear from Bravo.

Any ideas on what is causing this behaviour, or how I might investigate this further?

Thanks :)

Karnivaurus
  • 22,823
  • 57
  • 147
  • 247
  • If you're using IIS, i'd check IIS paths and make sure they don't overlap & point to the corresponding project folders. – Sergey Akopov May 01 '14 at 18:01
  • I'm just using the development server for now, straight out of Visual Studio. – Karnivaurus May 01 '14 at 18:09
  • The only thing i can think of is both of your solutions are located at in the same physical folder and both are referencing files from the same place. Hence the same bin folder is used for both solutions. So when you build one, it overrides everything in the bin. Make sure you solutions are in entirely separate folders. – Sergey Akopov May 01 '14 at 19:37
  • Well, I have a root directory, and inside that root directory are two directories - one for the Alpha solution, one for the Bravo solution. Is that ok? – Karnivaurus May 01 '14 at 19:38

1 Answers1

0

Sergey is correct.

I have this happen all the time, when going back and forth between web solutions that I host in IIS, I always have to change the paths back and forth. This started with VS 2012 and continued in VS 2013.

I can't find much information on why it is happening or how to correct it. There are only work-arounds as far as I can tell.

Workaround and info on the bug request

another potential post on same subject.

I personally, just manually change it back and forth.

Community
  • 1
  • 1
Rob Allen
  • 2,871
  • 2
  • 30
  • 48