Visual Studio 2008 keeps adding 3 folders to solution folder prefixed with "Visual Studio" - windows

For some reason, Visual Studio 2008 keeps adding three folders to my solution folder. I always have to delete them so I don't accidentally add them to SVN. How do I prevent these from being created? This happens about once every couple weeks, but I haven't figured out when it happens. We're probably going to convert all of our projects to Visual Studio 2010 later this year, but in the mean time, I'd like to figure this out.
If anyone knows how to write a Windows folder (or file) creation listener, I'll be able to track this down faster. I'm imagining a Windows Service that displays a popup when a folder gets created somewhere in the Windows file system, and it's constantly listening. I've had other situations where folders and files get created in Windows (in different project types in Visual Studio 2008 or Windows for that matter), so that might be a cool resource to have in the arsenal.

That directory is probably set as your VS Projects location. If you open Tools>Options and then click Projects and Solutions, it should show you the folder paths. VS will recreate these paths if you delete them.
After installing VS, they are usually set to something like:
C:\Users\username\Documents\Visual Studio 2010

Related

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.

Visual studio lost current code on sudden crash

My visual studio 2010 crashed when some carelessness [bit of madness] mistakenly pressed start button and my Acer timeline got unstable. Two projects where open at the time, one in visual studio 2005 [I have both 2005 and 2010 installed]. Unfortunately I lost all the codes I had done at the time along with those coded even weeks before. Now the project files in both the solutions are those weeks older. Amazingly, the .aspx pages are intact and .cs files are gone.
What can be done to get the lost data? Help please.
Thanks.
Guys TAKE CARE if your Visual Studio crashes, you need to check the backup BEFORE you restart Visual Studio and check if your files are ok! Many people complain that they lost work after a crash, and then they restart Visual Studio, and upon discovering that their code cannot be found in Visual Studio they then check the backup at the location
%USERPROFILE%\Documents\Visual Studio 2010\Backup Files\\
The order is important. Check the backup FIRST, before restarting Visual Studio. If you start Visual Studio and then open your old project it's probable that Visual Studio will overwrite the backup files for that project.
Securing the backup is your FIRST concern. Then start Visual Studio and open your project to see how much damage there is.
You can check:
C:\Users\<username>\Documents\Visual Studio 2010\Backup Files\<ProjectName>\
C:\Users\<username>\Documents\Visual Studio 2005\Backup Files\<ProjectName>\
More information can be found here:
Visual Studio 2010 AutoRecover Feature
I just had the same experience -- losing a source file during a BSOD. Very annoying!
No backup file could be found, and I searched the hard drive for a file containing the class name, but no backup was unturned.
However I was able to get back something resembling my code by decompiling a DLL from the bin/Debug folder using DotPeek. So if you had previously compiled your code successfully, you can get the code (without comments, and with some weird local variable names, etc) via decompilation.
I Had the same problem, I lost code due to BSOD.
the backup folder should store files not saved until they are saved whenever you save the files there are deleted.
I think that maybe they don't remain after a restart as it was empty in my case.
A very good file recovery tool is Recuva. It helped me once, didn't help me second time, though, because I noticed the data loss too late, and all recoverable data got overwritten.
So I used DotPeek, though you'll have to do a lot of work on the disassembled files, they are pretty weird.
Now I put my source tree in Google Drive, because it has file versions and keeps deleted files. Dropbox would do, too.
Git or any other VCS are not solution for this thing, because you cannot have crazy amount of meaningless commits.

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

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.

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.

Resources