Visual Studio deleted my Desktop while doing Publish - visual-studio-2012

I accidentally published my C# project into the desktop folder, while the "Delete All files in destination" was checked, and all of my important files and folders there were deleted!
How can I restore them? It's extremely important.

You could try to recover them with this utility:
https://www.piriform.com/recuva
Also, have you checked the recycle bin? The files might be still there.

Related

Android Studio has lost Run Configurations

Android Studio lost all the run-configurations of a project and it is not the first time this happened. This always occurs (as far as I can tell), when switching projects and/or having opened an Android project in IntelliJ IDE.
In an attempt to restore them, I've reverted several missing .xml files from the .idea directory, including runConfigurations.xml, which did not yield the desired result. the documentation does not really help either.
Q: Where are these run configurations being stored, (in order to keep a backup of them)?
As described in Run/Debug Configurations Dialog documentation when: Share check-box is enabled Run/Debug Configuration files are stored under .idea/runConfigurations/ directory.

VS2015 Team Explorer showing solutions from node_modules

I just started using the npm package gulp-sass which relies on node-sass.
The node-sass package has a src folder, which includes a .sln file.
This .sln file shows up under my VS2015 Team Explorer Solutions heading. I really don't want that to happen.
Is there a way to exclude solutions placed under "node_modules" from being shown in the Team Explorer?
See attachment for documentation.
For TFVC, when you open the VS, then Visual Studio will scan the local workspace for solution files.
According to your screenshot, you are using GIT as your source control. This should be the same mechanism. VS will scan your local mapping repository. Unless you move the folders in your local repository, the solutions from node_modules will still shown in Team Explorer.
If you really can't stand this feature, you may have to create a "dummy" repository for some folders including sln file on your machine and let Team Explorer scan that one every time you start up, instead.

Git with Visual Studio Source Control Explorer available yet?

we set up Git as version control system (we used tfs before). Now the source control explorer is not available anymore.
I found this thread from 2013:
Using Git in Visual Studio, how do I navigate repository files?
It's 2015 now and I cannot find any info from late 2014 or 2015. Does anybody know something new?
Thanks
VS2015 still does not have a file browser for Git projects. They do have a list of *.sln files that can be opened within a Git repo. If you have say a "ReadMe.txt" at the root level of the repo though, you still need to open it in explorer or command line and modify it (either by adding to VS or elsewhere), then the file will show up in pending.
In VS2012, there was an add in called "Mindscape File Explorer" that added a file explorer. You could set the root directory to your projects folder and save you from leaving VisualStudio.
Apparently no one at Microsoft cares about solving this problem since it's been around for years now. Seems like it would be an easy win to just show all files at the project root level in either the solution tab or a new project view tab.
Visual Studio "15" Preview has an "Open Folder" feature that let's you load up any folder in the Solution Explorer but it's not connected with Source Control, you have to do it manually after you've connected with the repository in Team Explorer but it's better than nothing.
You can right-click the file to access History, Commit, Compare with unmodified, Undo, Go to git changes... etc

Visual Studio 2012 - Adding files via Solution Explorer not showing in Pending Changes

I have a VS 2012 solution with multiple projects in it.
When I create a new solution folder or new a folder under projects and add files via the "Solution Explorer" it just modifies the sln or csproj file. The newly added files do not show up in "Pending Changes".
I am having to add the files explicitly again via "Source Control Explorer" -> "Add Items to Folder" to have it actually [add] before check-in.
What would I need to change to have the files added via "Solution Explorer" itself?
Try creating a brand new solution, and then add it to source control. Does the issue still happen for new projects in that solution? Is it the same behaviour for your colleagues?
If so then it sounds to me like you have some strange checkin policy screwing it up.
See the answers in this question for ideas.
Failing all of those, maybe a reinstall of TFS on the server is required, or if it's only affecting you, reinstall VS.

Visual Studio 2012 Slow To Close

I am running VS 2012. Working on a project that is stored on a mapped network drive. Whenever I go to close the solution it takes several minutes (5-7) for Visual Studio to close. It does eventually close, but very painful waiting for it to finish.
Anyone have any suggestions on how to fix?
Try Process Monitor by SysInternals: http://technet.microsoft.com/en-us/sysinternals/bb896645
You can set the filters in such a way that only the Visual Studio 2012 executable is monitored and you will see each and any action towards files, network or registry. This might give you the idea about what's going on behind the scenes.
It's typical. Because Visual Studio have to copy your data from local disk to map network. Also it have to check security options. Execute your project on your local Disk.
Try this: Remove all the "UNUSED" MS Access or other data files in the App_Data folder - including any that are in sub folders. If you have old versions in App_Data or in any sub folders then Visual Studio will have to open all of them even if your website does not use them. In my case it took 2 - 3 minutes to open the website and even longer to close. I had 50 or so backups and test databases I kept in various folders just a archives. I just moved them to another folder in my website. Wow - Visual Studio now opens in a few seconds.

Resources