Visual Studio 2013 breaking Web Site - visual-studio-2013

I have a really weird problem, be interested in some pointers
We have a website that we have coded from Visual Studio 2003 -> Visual Studio 2010. We are now looking at moving to 2013.
The website is in IIS, when I navigate to it using IE it works. When VS2013 is -open-, not running, but has the project open we get a weird effect where the contents of the website gets duplicated by 3, its as if there are 3 iframes on the page, all with a copy of the same web site.
I close VS2013 and it goes back to normal
So, just to be clear, we don't even have to run the web site from within VS2013, just the project being open is enough to cause the weird effect
We use subversion as as far as I can tell no files have been modified when VS2013 is open
Any suggestions?
Thanks

It's Browser Link that's doing it! If you switch off Browser Link it works.
The source shows some extra script entries before the final tag but other than that the whole source is duplicated.
We don't need Browser Link and I don't have reflection capabilities on Asp.Net source so as to why that's for some one else to determine, I noticed a few people complaining when I searched on it so it may be something that just gets fixed in a future version

Related

Blank Security Warning when Opening Website in Visual Studio 2015

I get a blank security warning popup window when trying to open a website, in Visual Studio 2015 Community Edition. It worked on my other computer in the same environment.
I moves the files to a new fresh computer and I get this window.
Here's a screenshot:
Nothing is clickable, even what where the buttons should be. Visual Studio is just frozen, can't even close the IDE nor the popup window. It doesn't happen to Web Projects, only websites.
Any idea how to solve this?
I got the same issue. Just fixed it. In my case it was entity ".tt" files fault. I guess for some reason VS 2015 does not recognize ".tt" extension. I've just deleted these files and run website (not web application) successfully
The .tt files are needed if using Entity Framework.
Here is my workaround that worked in two cases of the blank security warning. Rename the files with .tt extension to .tt.old.
Open the project (it will not compile, so don't try)
Save and close the project
Rename the .tt.old files back to their original names
Open the project again, this time the warning will have content and will be clickable.

Visual Studio 2013 launches the wrong MVC Application

This seems like a typical Microsoft bug. I have a project that when I click launch despite the fact that it's set as the default project is launches a skeleton MVC app as opposed to the MVC app that I'm currently working on.
To fix the problem I have to close down Visual Studio completely and relaunch my solution. I press f5 or just run the app and it works.
What I find interesting is this mysterious skeleton app which seems to be ASP.NET temporary files is the same port as my project. This happens multiple times a day while developing this particular app on the particular port. Does anybody know why Visual Studio 2013 is doing this?
Okay so this is a Microsoft bug. It turns out the project I'm working on does have identical names to another project that I was working on except in a different codeline. Visual Studio gets all confused and launches the old app in cache instead of the app I'm working on. The only way to fix this it appears it to manually change the port number for IIS Express.
For more information check this out.
https://connect.microsoft.com/VisualStudio/feedback/details/786645/vs-launches-the-wrong-mvc-website-when-two-identically-named-solutions-are-open-at-the-same-time

Visual Studio extensions keep disappearing

I am by no means a visual studio expert. However I have done some searching on this topic and cannot find anything to help me.
I'm working on a VS 2010 web application. We are using TFS 2012 for source control. I wouldn't be suprised if this is causing my issue so I make a special mention of it.
The issue I'm having is every morning after I open the project I have to go into Tools / Extension Manager and search online and add JScript Editor Extensions. When I open the project the next day it's gone and I have to add it again. (I think sometimes it does this right in the middle of coding - my Javascript window changes size and loses formatting)
An extension that stays every day regardless is NuGet package manager, so it's not removing every extension.
I suspect that when I get latest from TFS it's overwriting the solution or project which contains the reference to the extension but I haven't been able to verify this.
Can anyone tell me why extensions would be removed? Are these a local user setting or are they contained in the project file?
Taking a step back, my real problem is complete lack of integration between C# and Javascript in the web programming world. I need all the help I can get on the Javascript side.
There were a number of issues with buggy extension addins. To clarify are you using visual studio 2010 with tfs 2012 plugin?
The recommended process for identifying the buggy extension is to disable the extensions one at a time until the buggy one is isolated.
the source control shell for tfs2012 can be installed as a separate shell if needed.
I suspect the script editor extensions however.

Visual Studio 2013 Update 2 - code files corrupt randomly

This has been happening to me and others on my team, maybe once a week. We'll be debugging a web application project and then edit and save a text file that is part of the site (like a .aspx or .css files). The file will initially be fine in visual studio and look normal, but the output to the browser will be garbage. It's hard to know what's going on until you close the file in visual studio and try to re-open it. Visual studio will open the file in notepad for some reason, and you'll see all garbage characters.
To fix the problem I have to revert the file from TFS and any work not in TFS is lost.
We have Resharper 8.2.1 and the latest Telerik UI for Asp.net Ajax controls installed. Everything else is pretty standard setup for Visual Studio.
The web application project is set to use IIS Express.
Does anyone else ever have this problem, and know what might be causing it?
Edit: This just happened again, but this time with a class library project. So it doesn't seem to be exclusively a problem with web application projects.
In my case the problem had to do with the encryption software that is installed on my Dell laptop - "CREDANT Mobile Guardian Shield". If you have administrative access to this, then you can add exceptions so that it doesn't encrypt your project / solutions folders.
I don't have access to modify the exception list, so what I did was look through the exception list and found a path listed that looked suitable for placing files I work with. In my case I chose "C:\sources\". I reinstalled all of my tooling into c:\sources\apps\, and use c:\sources\projects\ for all my solution files / TFS workspaces. My apps run faster now because there's no encryption overhead, and I haven't had the file corruption problem since doing this about 2 months ago.
Notepad is believing that the text file is Unicode but it is ANSI. Change the file encoding to Unicode.

Visual Studio 2010 hangs when opening websites

My Visual Studio 2010 Professional hangs up 99.999% of the time when I try to open a website as "Remote Site" through an HTTP address. However if i open the site through a unc path instead of through HTTP, it works fine. Of course that is not always feasible, for example when working from offsite. The same sites (assuming they are not NET40 sites) work fine in Visual Studio 2008, so I'm pretty sure it is not a problem with the Front Page Server Extensions.
If i run 2010 in /safe mode, it opens the projects fine. So i figured maybe it was one of my installed extensions. I therefore disabled all my extensions and tried again, but it still hangs up. So it is apparently something in Visual Studio itself that is different between safe and normal modes.
I ran it in logging mode, and checked the log but did not see anything that stuck out to me. The log is uploaded here: http://pastebin.com/aUnVanB1 .
The exact symptoms I am seeing are that when i click on the project name, it pops up and asks me for my credentials. I enter those, and click OK, and it then loads the solution explorer, and i see the tree view, but then it just hangs with the progress dialog that says "Preparing Solution...". The progress bar keeps cycling, but it never finishes loading, and the spot where the properties window would be in the VS UI is completely unpainted, with just a blank, empty, white space.
Any one have any clue what else i could do to try to figure out why 2010 hangs when attempting to load websites via HTTP? Thanks!
Thanks for your question... you gave me the right clue to solve my problem!
My VS 2010 was hanging (in fact was very slow to get available) when I was openening a solution containing a remote website and I was due to press Escape a few times to cancel the pending operation... As you suggest I tried to open such a solution with /safeMode and VS2010 became available quite instantly.
So as you pointed the VS Extensions... I checked mine (all from Telerik): opening the extension manager I discovered that some updates where available. I thought the extensions updates were automatically proposed and so never checked that before. In fact, you need to manually check with the extension manager if some are available.
I've updated all my Telerik extensions... and now I may open normally all solutions including a remote website.
Thanks a lot! Perhaps... you need to updates your extensions???
Check you network order preference in Windows.
I had a similar problem where DNS would cause a hang of 1 minute before trying again (and again and finally on the next network).
Under Network, Advanced Settings (WinXP):

Resources