How can I force Visual Studio 2010 to reload files and projects that have changed on disk? - visual-studio-2010

I often use command line tools to do source control updates of files and projects that I have loaded into Visual Studio 2010. With previous releases when I did this I could force Visual Studio to notice and load the changes by doing a Save All. This doesn't seem to work in Visual Studio 2010.
I do have 'Detect when a file is changed outside the environment' checked in the Options window, but if I sit and wait it takes minutes or longer for the changes to be noticed.
How can I force 2010 to notice the changes in loaded source files and projects?

You can reforce reloading a project by unloading and loading the project.
Right-click the project and select Unload Project, then, when the project is unloaded right-click again and select Reload Project.
Note that this requires that all modified files in the project either be saved or the changes in the file be discarded.

It sounds like this could be the same problem that I experienced here. VS 2010 doesn't seem to pick up on file changes made outside the IDE (like if you add a file to the file system, and then click refresh in Visual Studio you don't see the new file, I experienced this on C++ projects).
You can refer here for the MS case, they claim they have fixed the problem in "the next VS release", which I assume would mean the first service pack for VS 2010.

Win7 shouldn't be a pre-requisite, though its possible an earlier edition (pre-SP1) of Visual Studio didn't work it. Upgrade always works, for reference the track changes option also needs to be turned on.

Related

vs C#2015 solution's backwards compatibility wont run on vs2010 even when nothing was done to it

so i was in the middle of making a program, when i decided to try upgrading to vs2015 just because i like the newer UI.
so i opened the .sln in vs2015 test run the program again, and re arrange the ui of my program, but i didnt add or remove anything, or even touched the code.
saved the file, and tried opening it again on my laptop that still on vs2010.
i can open the solution,i can access and edit the code, but i can't open the designer at all, or run the program that i made.
although i can also upgrade the one on my laptop to the newer one, im doing this project with a friend that is also still on vs2010, is there any way to make it compatible again?
Whenever you try to open the project in visual studio 2015 which was basically developed in visual studio 2010 will prompt the window for the make some changes in the .sln file also it shows all changes in the browser.
If you try to open that file which is changed by the VS2015 will not be able to open in VS 2010 but available to open in VS 2012 and on word

Loading Visual Studio 12 project in Visual Studio 10 [duplicate]

My teacher is complaining that he can't read the VS2012 format on his VS2010 environment. I looked around in settings and so on but couldn't find anything. How can I give the project in an VS2010 readable format to my teacher?
Modifying sln manually
Backup your project folder (copy/paste to another location, like a folder called "backups")
Open sln file on wordpad
Change the "header" of opened sln to below (the first lines that matches mentioned lines below, except by version number/name):
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
I'll see if there is a way to do it in project options...
If the VS2010 installation has SP1 installed, then it should be able to read the VS2012 solution file.
Assuming this is not a terribly complex project (I'm making that assumption since there is a teacher involved), the easiest approach may be just to re-create the project in Visual Studio 2010.
Fire up VS2010, add your files, make any necessary changes to settings, and save.
You will need VS2010 no matter what approach you take. Even if you convert the project file by other means, it would be very wise to test it before handing it in again. The Express edition is free.
Another easy way to do it is to right click on the source code, open it with a program such as notepad, then save that on to a USB stick. When you go to class, copy and paste this into Visual Studio 2010 and viola.

Export Visual Studio 2012 to 2010 sln format

My teacher is complaining that he can't read the VS2012 format on his VS2010 environment. I looked around in settings and so on but couldn't find anything. How can I give the project in an VS2010 readable format to my teacher?
Modifying sln manually
Backup your project folder (copy/paste to another location, like a folder called "backups")
Open sln file on wordpad
Change the "header" of opened sln to below (the first lines that matches mentioned lines below, except by version number/name):
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
I'll see if there is a way to do it in project options...
If the VS2010 installation has SP1 installed, then it should be able to read the VS2012 solution file.
Assuming this is not a terribly complex project (I'm making that assumption since there is a teacher involved), the easiest approach may be just to re-create the project in Visual Studio 2010.
Fire up VS2010, add your files, make any necessary changes to settings, and save.
You will need VS2010 no matter what approach you take. Even if you convert the project file by other means, it would be very wise to test it before handing it in again. The Express edition is free.
Another easy way to do it is to right click on the source code, open it with a program such as notepad, then save that on to a USB stick. When you go to class, copy and paste this into Visual Studio 2010 and viola.

Strange! VS 2005 -Break Point is not being hit

I am using Visual Studio 2005.I am running my code in Debug mode only.But my break point is
not being hit.
I followed :
Cleared my solution and created the one again
Closed the VS and Opened it again
Restarted my PC and tested the break point
But i am unable to figure out the problem.
My Question is:
Is it due to any virus ?
Add-on feature in my IE 8.0 prevents this
My VS is Corrupted ?
I am having botn VS 2008 and VS 2005 installed in my machine so any version
conflicts?
Suggestion is needed.
It sounds like the problem you are having may be due to the source code and the .pdb files being out of sync with each other.
Try these steps:
Perform a "Clean" build in Visual Studio.
Shut down Visual Studio.
Delete any "bin" and "obj" folders in all of your project folders.
Delete the solution .suo file
Sometimes the solution .suo file can become corrupt (doesn't cause Visual Studio to indicate any errors, but usually leads to strange behavior). Nine out of ten times, deleting the .suo file clears any strange behavior in Visual Studio.
The trick about deleting the "obj" folders forces Visual Studio to truely do a clean build the next time it compiles. Doing a "clean" build in Visual Studio only deletes the compiled binary results, it doesn't remove any intermediate object files that may have been created that Visual Studio might be linking against. By manually deleting the "obj" folders, you delete those cached object files and force a true rebuild.
What kind of project is it (website, console app, ...) Are you running the project directly from visual studio, or attaching to it afterwards?
Usually when this happens to me, its because the assemblies that are being used to run the process I want to debug do not match the currently built assemblies from visual studio.
You mention IE8, so if this is a website, you should try to attach visual studio to the w3wp.exe process. Otherwise the breakpoint won't have any effect. Alternatively, run the website using visual studio.
If you hover over the breakpoint in Visual Studio, does it indicate an error? Common problems are that the code hasn't been built, or the DLL that contains the code isn't loaded into the debugged process.

Why would my Visual Studio 2008 close everytime I open a .xaml file?

Visual Studio 2008 has been very stable for months on my computer.
This morning when I double-click on any .xaml file to open it, or even click on the tab of an already opened .xaml file, Visual Studio says "initializing toolbar" in the status bar and then 20 seconds later fully closes the whole application without any error message.
Other files (e.g. .cs class files) I can open fine.
Has anyone experience this or know what I could check/change to be able to use Visual Studio to edit .xaml files again?
MORE INFO: I can also create a new project and create and edit .xaml files fine.
MORE INFO: I can edit .xaml files in other modules (projects) fine.
MORE INFO: Everytime it crashes, this event is registered:
.NET Runtime version 2.0.50727.3053 - Fatal Error in executable module (72555E00) (80131506).
(odd since I have .NET framework 3.5 installed)
MORE INFO: It is only in one module (project) that .xaml files cause Visual Studio to crash. Even creating a new UserControl in that module crashes Visual Studio.
I get this occasionally (with .xaml and .resx files) and find that if I delete the solutions .suo file things work fine again.
[The suo file just contains per user settings like recently opened files etc so it's nothing important and will just be recreated when you next open the solution.]
I've been getting the same issue whenever I try to access project settings for a C# project.
Found additional information about this:
Here: http://blog.fryhard.com/archive/2008/11/26/visual-studio-2008-closes-at-build-outlook-2007-add-in.aspx
And here: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/99e124d0-c5d7-49c0-b1dd-71328f9a6571/
Apparently it's a bug in the core CLR engine that causes the entire CLR to crash if certain types of assemblies are loaded in a certain order.
Most of the time it appears to be directly related to the Visual Studio add-in called PowerCommands - uninstalling PowerCommands will make the problem go away.
And (we hope) it's supposed to be fixed for .Net 4.
This sounds very similar to the issue I had when I first installed VS 2008. Unfortunately, after hours of research, I ended up reinstalling the IDE (with my fingers crossed). No problems since then, but it's obviously not the most enjoyable way to solve the problem.
What is likely happening here is that one of the controls referenced directly on indirectly in your designer is stack overflowing during the designer process. Because the designer is hosted in process a stack overflow by one of the components will take down the designer and VS.
Try attaching a debugger to VS, break on first chance StackOverflow Exceptions and open the designer.

Resources