If possible at all, does anyone know how to use the full c++ toolset shipped with Visual Studio 2010 (compiler/linker/sdk) in Visual Studio 2008?
Would changing all directories listen under Options->Projects and Solutions->VC++ Directories be sufficient, or is there more to it? And suppose I try it this way, are there any caveats to it?
I kinda forgot about this question until today a friend was saying how great C++0x was. I'm still in love with VS2008, much more than with 2010 which is above all things slow, so decided to give it a go.
And, I still can't believe it, but with a minimum of hacks it actually works.
And it works great: sitting before VS2008 you don't even notice it's actually using the 2010 toolset. Unless you look at cl/link's logo. Or off course, unless you are suddenly able to use lambdas. I could not find any problems so far whatsoever. Editing etc works like it alwasy did, building works, debugging works, that's all I need.
Here's what I did:
make a batch file setting up the envorinment for use with Windows SDK 7.1 / VS2010 toolset, but leaving devenv from the VS2008 installation. Mostly copied this from 2010's setenv.cmd.
now the dirty bit: copy msobj100.dll, mspdb100.dll , mspdbcore.dll and mspdbsrv.exe into the 2010's VSINSTALLDIR/bin directory (or put them in your PATH somweher). This is required else cl.exe doesn't work, nor would debugging.
launch from same command line where batch file was run using devenv /useenv
smile
This is the used batchfile for an x64 machine:
SET PlatformToolset=Windows7.1SDK
SET ToolsVersion=4.0
SET WindowsSDKVersionOverride=v7.1
SET Path32=%ProgramFiles(x86)%
SET "VCINSTALLDIR=%Path32%\Microsoft Visual Studio 10.0\VC\"
SET "VSINSTALLDIR=%Path32%\Microsoft Visual Studio 10.0\"
SET "VCTools=%VCINSTALLDIR%Bin"
SET "VCTools=%VCTools%;%VCTools%\VCPackages;"
SET "VCLibraries=%VCINSTALLDIR%Lib"
SET "VCIncludes=%VCINSTALLDIR%INCLUDE"
SET Path=%FxTools%;%VSTools%;%VCTools%;%SdkTools%;%Path%
SET OSLibraries=%WindowsSdkDir%Lib
SET OSIncludes=%WindowsSdkDir%INCLUDE;%WindowsSdkDir%INCLUDE\gl
SET "LIB=%VCLibraries%;%OSLibraries%;%FxTools%"
SET "LIBPATH=%FxTools%;%VCLibraries%"
SET "INCLUDE=%VCIncludes%;%OSIncludes%"
EDIT instead of batchfile combined with /useenv, there's another way that does the same but more direct: the settings for VC++ Directories are all saved in the file %APPDATA%/VisualStudio/9.0/VCComponents.dat. So if you take the original one and replace all occurrences of $(VCINSTALLDIR) with $(ProgramFiles)\Microsoft Visual Studio 10.0\VC\ it works as well.
Related
I am using Visual Studio 2015, but I have to show my project from Visual Studio 2013 pc, Is it harmful for solution file? or any file? Visual Studio 2015 have some extra feature, that cant's contain Visual Studio 2013. Now how can I solve it?
I want to recommend not to mix different versions of Visual Studio. Please strictly create different folders for different versions e.g . one for VS2013 and another for VS2015.
You know - different versions installed on one PC is possible.
If you really want to go one version back to show your VS2015 project in a VS2013 IDE make sure you have a backup in a safe place. You maybe warned - don't make the mistake of mixing code versions when you switch from one PC to another.
Try to open and show for your needs in your special development environment by yourself it is possible but be careful like mentioned above. Having used the highest dotnet version possible in VS2015 you'll get errors.
I rely on the Find in Files dialog in Visual Studio a great deal. (Sometimes Intellisense/Resharper just don't cut it.) Since upgrading to 2015, I've noticed that the dialog doesn't remember my custom "Look in" paths or "Look at these file types" lists between sessions.
If I close my solution and VS instance, then reopen, I have to enter my custom path and file types again. Huge waste of time. Has anyone run else run into this? Any workaround? 2013 used to remember this stuff.
Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081
Installed Version: Professional
I've never had any problems with it not remembering my settings, but I imagine that you could run a custom registry modifier to add the appropriate keys, you could make sure your settings are always pristine. The custom search information is stored in HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\Find.
The file types are stored in a string key called Filter with whatever you would normally input into the custom file type category in the VS search window. For example searching for only .cs and .txt files you would put *.cs;*.txt.
The folders are located in a string key called Query with values such as C:\Folder1;C:\Folder2. However, it's behavior seems a little weird. You have change the value of Query and a Query+integer value (i.e. Query0) to the same value to have it appear in Visual Studio.
If you just run a script to modify the above values to the files types/folder locations you want, that should work.
I ran into this today. After much searching I found a post on the visual studio forums somehow. This pointed me towards ReSharper. This directed me towards a workaround.
Start visual studio in safe mode with the command line argument /SafeMode
Create the folder sets you want for searching
Restart visual studio not in safemode
Once I had restarted all my created custom searches remained, and the registry values were created. This might not work in the specific case, but this worked for me.
You can set these values programmatically inside Visual Studio for the Find and Replace dialog (for example with Visual Commander):
DTE.Find.FilesOfType = "*.txt";
DTE.Find.SearchPath = #"c:\temp";
If you have an earlier version of VS, export the environment settings, copy the NumberOfScopes and NamedScopes* settings from the Environment_UnifiedFind section to the same section in your VS2015 settings file and then re-import settings.
Once I did this, it allowed VS2015 to start saving folder specifications for future settings exports.
Or you could try replacing this in your VS2015 export:
<PropertyValue name="NumberOfScopes">0</PropertyValue>
With this:
<PropertyValue name="NumberOfScopes">1</PropertyValue>
<PropertyValue name="NamedScopes>0">FOLDER_SPEC_NAME>SEMICOLON_SEPARATED_LIST_OF_FOLDERS>{4A812F3C-7B1A-4987-9769-461F20EB25CB}</PropertyValue>
(Don't forget to re-import after you make the change)
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.
I am trying to install Microsoft visual studio Professional 2010 on my Windows XP SP3 edition. I am getting the error "vs_setup.msi could not be open" :
I have seen some forums mentioning the same problem for different reasons, and mostly because of having a previous version of Microsoft visual studio installed, but this is the first time for me to install it. Any idea how to fix that ?
Note: The actual setup files are in the path "G:\Visual Studio 2010 Professional". I do not know why the setup is trying to look for vs_setup.msi inside the "G:" directly ! Of course it is not there.
Maybe this setup is from DVD image and it's hardcoded to work in root directory.
Try to move all setup files to G:\ or another drive root
It probably doesn't like the spaces in the installation folder name. Rename "Visual Studio 2010 Professional" to VS2010Pro and see if it doesn't start working.
Also look for the setup log in %temp%. Sometimes it's cryptic but you can usually get SOME idea of what went wrong. Maybe edit your question with the errors from that log. It's called dd_something*something* etc.
Microsoft Visual Studio 2010 Shell (Isolated) Redistributable Package.
With 7zip open and extract VSIsoShell.exe in a New Directory (there are many files inside of this .exe).
After this is done, redirect to the right path w/ the extracted files (with vs_setup.msi file).
7zip is an Open source Windows utility for manipulating archives (www.7-zip.org)
I have two versions of Visual Studio 2005/208 installed in my system (windows7), when I am opening Visual Studio with "devenv" command from "Run" window then its opening Visual Studio 2005 but I want when I open it using "devenv" command so Visual Studio 2008 should open by default.
How can I do this in windows.
Thanks
Note: I am not sure this question is for Stackoverflow or for Superuser so just asked it here, if this has any problem then (any moderator) please move it to superuser.
You can follow these steps to open VS2008 from the command prompt using "devenv":
Open the Registry Editor by typing regedit on Run
Locate and open the following key:
My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\devenv.exe
Currently for VS 2005, devenv.exe is mapped to
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe
If you want open VS 2008 from the command prompt, you must change the map to
C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe
Just change to 8 to 9.0 to switch from VS 2005 to VS 2008, or VS 2008 to VS 2005.
The problem is that both executables are called "devenv.exe".
What will be happening is that while both the 2005 folder and 2008 folder are on your Windows search path, the 2005 folder occurs first. This means that the 2005 version is found first and gets executed.
Possible solutions:
Rename the 2005 copy to be "devenv2005.exe" (for example). However, you will need to update any shortcuts that point to it to use the new name.
Edit your PATH environment variable to swap the order of the 2005 and 2008 directories.
The second is the least work - depending on how confident you are about editing environment variables.
This is what i have:
REM devenv8.bat
#echo off
"%VS80COMNTOOLS%..\IDE\devenv.exe"
REM devenv9.bat
#echo off
"%VS90COMNTOOLS%..\IDE\devenv.com"
It flashes command prompt momentarily, but I haven't worked out how to get rid of that. Will be interested to know how to have it not do that.
Make two batch files (devenv-2005.bat and devenv-2008.bat) and use them instead of devenv. Make sure to set up the environment appropriately for each one and then launch devenv.exe using the START command with a full path name from within the batch. There are utility batch files shipped with Visual Studio that will set up the environment (e.g., INCLUDE, LIB, PATH, etc.) for you. In VS2005, it was named vsvars32.bat. I would imagine that it is named similarly in VS2008.
The other option is to find the environment script (vsvars32.bat) for VS2008 and modify your user environment to match. I would remove references to VS2005 from the environment altogether just to be safe.
My suggestion is to run Launchy, but I also +1ed the batch file approach. I should add, once with that approach I hotkey launchy, win-space for me, and type either '5' or '8' for vs05 or vs08.