I have an odd scenario that I can't figure out, and would appreciate any advice offered.
I'm running VisualStudio 2010 pro.
I have a web application solution with 6 projects.
On one occasion I opened up some files from a number of backup solutions to look at some historic code. I viewed them and closed the files. I did this with my current project open.
I may have rebuilt the solution with them open but I'm not sure.
I recently did a 'find', searching the whole solution, and noticed that the files from the backups are referenced as being part of the solution.
How do I remove them?
I found the answer.
The solution was to publish the website rather than build it.
Related
I've recently found it very convenient to organize the many projects in my Unity game solution into "solution folders", which exist only in Visual Studio (not in the file system); if I do this, ReSharper can very neatly organize the project dependency graph for me. (It's getting very large, because ... reasons.)
The problem is, these folders get wiped out every time Unity rebuilds the project *.csproj files. I've tried playing with the file generation hook as described here, but haven't had any luck -- I'm not sure the property I'm looking for is even settable from the csproj XML.
So: Is there any way to either save the solution folders, or automatically re-create them when csproj files get refreshed?
I'd given up on solving this problem, but 6 weeks later I stumbled across the solution. For anyone with the same concern: You must install the "Visual Studio Editor" package within Unity. As of this summer, this package supports solution folders in VS!
Background: I have a solution in Visual Studio 2013 with several projects that I have synced with Team Foundation Server. Myself and one other programmer are the only ones who regularly work on this solution. Two of the projects have corresponding setup projects which only I work with. We had problems with keeping the setup projects synced between our computers because sometimes it would update on his which would break mine because of file references or maybe because I am using an obfuscation tool he doesn't have. For this reason, he has cloaked the setup projects in his Source Control so that I can sync them with TFS, but he won't have to see them and to eliminate the issue stated above.
Question. Now, when I get the latest changes to the solution, the setup projects disappear out of my Solution Explorer and I have to readd them. I can go to Source Control and see these setup projects, but I can't figure out how to fix this so that it doesn't remove my setup projects when I get the latest solution version. Any ideas?
You can't have both of you opening the same solution with different projects.
When he opens the solution he will see two dead projects (the cloaked setup ones) and he is removing them from the solution. Then when you get the solution they are missing.
All developers working on a solution must get all the bits. A work around for this I to create a new solution file in the same folder as the other one. This solution only has the non-setup projects. You open the main solution and he opens the cut down version.
For years now, across multiple versions of Visual Studio, there has been a bug with the Publish Web command (the one you get when you right-click on a web app and click Publish).
Very intermittently (about 10% of the time), some files that have changed will not be deployed if they already exist in the output directory. This is highly disturbing behaviour as you can never be confident that all your changed files have been copied to the destination correctly. The only workaround I know is to totally clear out the destination directory but this is a big hassle.
Does anyone else experience this issue? What could be the cause? Are there any known workarounds?
I have run into this too. And yes, it is disturbing. Especially since we seem to have to wait 2 years for any Visual Studio updates.
The only workaround I found was to check up some of my changed ASPX files, and verify that they changed, and if not, I select the Delete all files option in Publish to force a complete rebuild (slow and tedious).
I started a new project this morning and, after putting ~3 hours of work into it, I tried to open a file from another project to get some code from it. I got a warning about discarding an unsaved object. After telling it to go ahead, I realized that it was referring to the project I had just been working on and not another file that I had just opened.
Even though I never saved the project, the various files containing my code and dataset had to exist on the hard-drive. Are they still there, perhaps in a temp folder? I'm developing on a box running Server 2008 R2 (don't ask, not my decision :) ).
This may help:
http://blogs.msdn.com/b/saraford/archive/2008/02/14/did-you-know-where-visual-studio-saves-auto-recovered-files-in-the-case-of-an-unexpected-shutdown-151.aspx
Also check C:\Users{Username}\AppData\Local\Temporary Projects
You could try one of those undelete programs and see if it finds anything.
Tools > Options > Projects and Solutions
and check the item
Save new projects when created
Save frequently. :)
Need to give one related input. Who the hell had the idea to implement this feature???
I used Visual Studio until 2003, then came back again to 2010 now.
After 2 days work, saving all the time, as I used to (Ctrl + S), I close the project and decide not to save the solution itself.
Done. All lost. Nothing can be recovered from anywhere in the computer.
How can a developer implement a dumb idea such as dropping all work in an "in memory" project.
You either know about it already or you will get screwed; like thousands found on Google during my desperate search.
Did Microsoft VS team look at it at least?
So frustrating...
It might be worth checking out the folder where AutoRecover files are saved.
You can find the default file location in Visual Studio on the Tools - Options menu. Look in the Projects and Solutions section - expand that and look in General to find the default file locations.
My files were under C:\My Documents\Visual Studio 2008\Backup Files.
I had this happen to me this morning. I worked on a new project yesterday and windows ran an update last night. Despite having debugged my program - the project had not saved - for some reason it didn't occur to me that the project might not be saved. I left the program running on my computer when I went to bed. This morning when I work up, I saw that windows had run an update. A few hours later, I saw that my computer had no trace of my program. I realize this is an old post, but I thought I would shed some light on what I did, since i was able to recover my files.
First I went here: http://windows.microsoft.com/en-us/windows7/recover-lost-or-deleted-files
In Visual Basic 2010 Express, a backup folder is created with your project name. Sure enough, my project backckup folder was there: Documents\Visual Studio 2010\Backup Files\MyProject. But, the folder was empty. I "restored this folder to a previous version" using the steps listed in the link above. After doing that, the folder was still empty, BUT, the temporary folder "C:\Users{Username}\AppData\Local\Temporary Projects" now contained my project's folder and files. Prior to running the "restore to previous version", the temporary projects folder was also empty.
So, I was able to copy the folder out of the Temporary Projects folder and I am as happy as one can be - or close to it.
Hope that helps someone out.
A note to the answers above, I had a mini jumpscare when i could not find my project anywhere, not in the recent projects nor in the visual studio projects folder.
I eventually found the project in the visual studio projects folder of the admin user;
I was looking at:
C:\Users\LocalUser\Documents\Visual Studio 2015\Projects
Whilst the project was saved under:
C:\Users\LocalAdmin\Documents\Visual Studio 2015\Projects
Bottom line is; also check the \documents of the admin user. This likely happend because i was testing an admin only application and visual studio was running with the admin's user profile loaded.
My visual studio 2005 solution sometimes does not open the entire projects. To clarify what I mean by the “Entire projects”, my application is consisting of different layers such as DAO, Domain, Service, Utility and finally Web.App that contains all of my .aspx, .asxc and code behind files. Each layer consists of large amount of .CS and .VB classes. So, when I open the solution file (.sln), it only opens the Web.App project without opening the others.
Has anybody encountered this kind of issue in VS2005 and if you have had what you did to fix it, please let me know. So, basically when I open the project .sln, it only shows the Web.App project not the other projects. This does not happen all the time, but happens once in a while.
Is it because Visual Studio 2005 was not installed correctly or missing some updates? Any ideas or suggestions are highly appreciated. Thank you so much
Have you tried creating a new solution and adding all the relevant projects to see if perhaps your current .sln is corrupt?