How to create a new Visual Studio solution on the desktop using the context menu? - visual-studio-2010

Years ago, using VS2005, I had a setup where I could right-click on the desktop/folder, select New, select Visual Studio 2005 solution and it would create a solution for me right there. I can't remember how I did this.
Does something like this exist for VS2008 or VS2010? It would be really handy.
EDIT: Figured it out based on the links in the answers (and also found an old email to myself).
1. Create a registry file (.reg) with the following content, then execute it:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.sln\ShellNew]
"FileName"="Visual Studio Solution.sln"
2. Create a new file called Visual Studio Solution.sln in C:\Windows\ShellNew folder with the following content:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
3. Reboot Windows and you'll have yourself a context menu.

I used to use what I think you are looking for. It was done with a little registry update (.reg) file whose contents start like this
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.sln\ShellNew]
"Data"=hex:EF,BB,BF,D,A,4D,
of which this is just a snippet, and it was for an earlier version of VS. But this might be enough to jog your memory, or give you something to google for. See here for more
http://flux88.com/2009/03/right-click-new-visual-studio-solution/
edit..
also see http://visualstudiohacks.com/registry-hacks/create-solutions-without-folders/

I believe the Team Foundation Server edition of Visual Studio does that, either stand alone or with the Team Foundation Server Power Tools, which the Power Tools site says it has Windows Shell Extensions.
Also Codeplex hosts MSBuildShellExtension which is a little off topic for what your looking for, but its nice because it lets you build your project from any directory on your hard drive, without ever having to launch Visual Studio.

1) In Visual Studio 2010, use the "Blank Solution" project to create a solution.
2) Copy that SLN file into "%SystemRoot%\ShellNew".
3) In RegEdit, go to HKEY_CLASSES_ROOT.sln
4) If a key (folder) for "ShellNew" does not yet exist under .sln, create it.
5) Create a string value under ".sln" with a name of "Filename" and the filename of the SLN file for its data.
Done. No restart necessary.
REF: http://support.microsoft.com/kb/140333

Related

Change default Windows installer location in Visual Studio

I'm modifying a Windows installer in Visual Studio 2008 (Visual Basic I believe, what my company's currently using) and I want to change the default install "Folder" of the program (the name of the directory). I've attached an image
to show what I mean. "Folder" defaults to "C:\Program Files (x86)\foo\" and I want it to default to "C:\Program Files (x86)\bar\" instead every time the installer is run. I feel like I've gone through just about every menu/item in the install directory and everywhere I can find, done my online research, all to no avail. Any help with this or in what window/menu to look in would be very-much appreciated. Thanks!
In the File System view in the setup project, select Application Folder and then use F4 (or right-click=>Properties window). That will show you the default location. The values in square brackets are Windows Installer properties, the rest are your text.
If you want to get more up to date Visual Studio Community Edition is free and there is an installer project add-on for it that you can get from the Visual Studio extension gallery.

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.

Webservice Contract First Visual Studio Addin 2008: did someone succeed to install?

I've tried to install this
http://www.thinktecture.com/resourcearchive/tools-and-software/wscf
it seems I have to download the vs2005 version first and then update with a file for vs2008.
But the addin failed to install as for me.
Did someone achieve to do so with VS 2008 ?
You're right. It looks like it is needed to have VS 2K5 before being able to use this add-in.
I guess the setup for VS 2005 tries to add a toolbar or some menu items, so it launches VS 2005, which of course fails if you don't have it.
Instead of preparing a setup program for VS 2008, the author just provides an updated .addin while for it.
Maybe it is enough to extract the files from the .msi (see the back room tech for a link) and then install the .addin file from the zip of the "2008 version".
If you succeed in doing this with the msi, put then this .addin file in a directory where VS 2008 looks for it (see the list in Tools / options / Environment / Addins Macro security).
Inside the .addin, there is the path to the add-in itself, which must be of course adapted.

Removing SourceSafe Integration from Visual Studio 2008

A question was asked recently about removing SourceSafe integration from Visual Studio 6. I need to do the same with Visual Studio 2008.
Our team uses Subversion and I have installed AnkhSVN, the Subversion plug-in for VS2008 (some other members of the team use VisualSVN). I find that SourceSafe "insists" on being the integrated source control tool of choice - the setting for source control plug-in in Tools > Options > Source Control seems to reset itself every time VS2008 is closed. This is very annoying and I want to get rid of SourceSafe.
I tried running the VS2008 install with the intention of switching off (effectively uninstalling) the SourceSafe plug-in, but there is no option for it.
Visual Studio stores source control preferences in the solution and project files. To switch providers, you have to first "unbind" the old provider.
Select File > Source Control > Change Source Control, select the solution and all the project files, and click "Unbind."
Save the solution.
Then you can change the provider with Tools > Options > Source Control.
Hand-editing the .sln and .proj files also works, but it's not exactly recommended.
Found it! MS's Help and Support site describes it, see section 2
Add a DWORD registry key at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SourceSafe\HideInVisualStudio
Set it to 1. Restart VS2008 and the SourceSafe plug-in option is gone.
You can usually edit the *.sln file and *.??proj file with out an problems to remove these bindings. These two files are just text files so you can open them in Notepad, Wordpad, or Visual Studio.
Just remove stuff slowly and then save and try to load.
Not sure if this works, but you can try:
Tools/Options/Source Control: set Current Source Control plug-in to "None"
Open the solution - hopefully it will tell you the provider is missing and give you an option to remove the bindings.
There are several constraints/behaviors for my case:
1) The machine and the projects are shared by several developers and they should not be affected by my changes,
2) vs2008 automatically re-enables SourceSafe control (did not try the HideInVisualStudio registry solution because it's a global flag),
3) I can't remove the bindings in the projects nor un-install SourceSafe
So I have found a way which is not perfect but works good enough for me:
1) open regedit and go to this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SourceSafe
there should be an entry
SCCServerPath
which should contain something like this:
C:\Program Files\Microsoft Visual SourceSafe\ssscc.dll
2) Modify the permissions for ssscc.dll in order to DENY the "Read and Execute" access for your userid.
Now, this is not perfect because you will have sometimes an error message message when you load a solution in VS2008 (There was a failure while initializing the Microsoft Visual SourceSafe source control provider. You cannot use this provider to perform source control operations.), but the goal is achieved:
1) No more source safe integration in VS2008,
2) Source Safe standalone is still working,
3) Other users are not affected by the modification.

Resources