Does the PlatformSDK folder in VS2010 ever get updated? - visual-studio-2010

I've been battling error C2733 (second C linkage of overloaded function '_interlockedbittestandset' not allowed), and in doing some investigations, I've found what I believe to be the problem.
I have Visual Studio 2010 Professional installed on my system, along with SP1 and a number of hot-fixes, and I noticed that the PlatformSDK folder that came with the application is now down-level. The SDK that came with the application is located at:
Program Files (x86)\Microsoft Visual Studio 10.0\VC\PlatformSDK
As a result of installing SP1 and the various hot-fixes, I now also have this platform SDK available to me:
Program Files (x86)\Microsoft SDKs\Windows\v7.0A
The problem is that Visual Studio defaults all of the VC++ Directories to the former path, which results in the errors. If I manually change the include path to point to the newer location, the errors go away.
Were the Visual Studio 2010 SP1 installers supposed to update the PlatformSDK folder where Visual Studio is installed? Or is that always going to be down-level as updates are applied?
How do I force the VC++ Directories paths to be the same across all projects (since VS is defaulting to the wrong / outdated location)?

Related

How to find the visual studio 2012 .exe

I've downloaded and installed Microsoft Visual Studio 2012 (In the official microsoft partner website) in a windows server 2012 R2 but im unable to access the .exe because i can't find it.
The installation ends correctly without error:
Problem is that i can't see the .exe at the location it should be.
I've done many search on my computer, unistall-reinstall-repair but impossible to find a solution.
In the 11.0 solution, only a "Blend" file is visible...
Any clue ?
Visual Studio 2012 is actually version number 11.0 as you can see here for version numbers.
That means (assuming you haven't installed it in the non-standard location - if that is even possible) you will want to look in:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
You will find the executable to be called:
devenv.exe
It was finally a problem of the ISO i took, i changed, redownload it and now it works.
Thank you for your help !

How to get Visual Studio 2008 to Program Files? (64-bit)

So I'm following the instructions to install MPIR (bigger integers library), which i chose before GMP, because of more information being availible on Windows download and just easier installation for typical user. Basically I found this simple tutorial: http://www.exploringbinary.com/how-to-install-and-run-gmp-on-windows-using-mpir/
The only thing I've done different from this tutorial is my Visual Studio 9.0 being stored in Program Files (x86) and when I then proceed to open Visual Studio 2008, it can't find any projects in my solution 'mpir'.
And so I need not to compromise the steps stated in the tutorial (must have Visual Studio in the exact directory) and then see how things will work out.
This is my current Visual Studio 2008 (Express Edition All-in-One DVD ISO) download: https://go.microsoft.com/fwlink/?LinkId=104679 , which i then open using WinRAR and run the setup aplication that allows me to choose from four (C#, C++, Basic, Web Developer). I choose C++ and proceed to change the destination folder, which is set to Program Files (x86) to Program Files, but after the installation I always end up with Visual Studio being in Program Files (x86). (I can create a file with random name and Visual Studio installs in that file, also I can move Visual Studio from Program Files (x86) or random file to Program Files, but then Visual Studio won't be detected and I won't be able to open 'mpir.sln' in it.)

Why older visual studio versions installed on my PC?

Recently I had disk space issue and checked what is occupying on my disk and I found out that there are older VS version folders on my hard drive although I have never installed them and I cant find them in installed programs either.
VS 14.0 is the only one which I installed but where are VS 11.0 and VS 12.0 coming from. I haven't got any SQL Server installed which installs an express version as well.
How can I remove those folders (Is it safe to delete them simply?) because they aren't within the installed program list?
Such folders do not really indicate multiple versions of Visual Studio are installed.
A folder named "Microsoft Visual Studio 11.0" should be better understood as "Microsoft Visual Studio 11.0 Components". Anything (of course like Visual Studio 2012 itself) uses a little bit of the components, will have to install the dependencies which go to that folder.
For example, if you have Visual Studio 2015 and SQL Server Management Studio 2012 installed, then you will have 14.0 and 10.0. The latter uses the 10.0 version of Visual Studio Shell.
In your case, you probably have SQL Server Management Tools 2014 installed, don't you?

Error 'LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt' after installing Visual Studio 2012 Release Preview

I've installed Visual Studio 2012 Release Preview, and it appears to be fine, but now when I try to use Visual Studio 2010 to compile C++ projects, I get the following error message:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
I'm not 100% sure of this, but it seems to be related to projects that have .rc (resource) files in them.
I've tried repairing Visual Studio 2010 from Add/Remove programs and rebooting, but this has no effect.
I also get the same error if I use Visual Studio 2012 RC to compile the C++ projects when set to use the Visual Studio 2010 toolset. Upgrading to the Visual Studio 2011 toolset fixes the problem (but of course I don't want to do this for production code).
Update: I've uninstalled Visual Studio 2012, rebooted, and the problem still persists! Help!
This MSDN thread explains how to fix it.
To summarize:
Either disable incremental linking, by going to
Project Properties
-> Configuration Properties
-> Linker (General)
-> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
or install VS2010 SP1.
Edits (#CraigRinger): Note that installing VS 2010 SP1 will remove the 64-bit compilers. You need to install the VS 2010 SP1 compiler pack to get them back.
This affects Microsoft Windows SDK 7.1 for Windows 7 and .NET 4.0 as well as Visual Studio 2010.
If disabling incremental linking doesn't work for you, and turning off "Embed Manifest" doesn't work either, then search your path for multiple versions of CVTRES.exe.
By debugging with the /VERBOSE linker option I found the linker was writing that error message when it tried to invoke cvtres and it failed.
It turned out that I had two versions of this utility in my path. One at C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cvtres.exe and one at C:\Windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe. After VS2012 install, the VS2010 version of cvtres.exe will no longer work. If that's the first one in your path, and the linker decides it needs to convert a .res file to COFF object format, the link will fail with LNK1123.
(Really annoying that the error message has nothing to do with the actual problem, but that's not unusual for a Microsoft product.)
Just delete/rename the older version of the utility, or re-arrange your PATH variable, so that the version that works comes first.
Be aware that for x64 tooling builds you may also have to check C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64 where there is another cvtres.exe.
Check the version of cvtrs.exe:
dir "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe"
Wrong version:
date: 03/18/2010
time: 01:16 PM
size: 31,048 bytes
name: cvtres.exe
Correct version:
date: 02/21/2011
time: 06:03 PM
size: 31,056 bytes
name: cvtres.exe
If you have wrong version you should copy the correct version from:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe
and replace the one here:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
i.e.
copy "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe"
According to this thread in MSDN forums: VS2012 RC installation breaks VS2010 C++ projects, simply, take cvtres.exe from VS2010 SP1
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
or from VS2012
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\cvtres.exe
and copy it over the cvtres.exe in VS2010 RTM installation (the one without SP1)
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
This way, you will effectively use the corrected version of cvtres.exe which is 11.0.51106.1.
Repeat the same steps for 64-bit version of the tool in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cvtres.exe.
This solution is an alternative to installation of SP1 for VS2010 - in some cases you simply can't install SP1 (i.e. if you need to support pre-SP1 builds).
If you have installed Visual Studio 2012 RC, then it installed .NET 4.5 RC.
Uninstall .NET 4.5 RC, and install the version you need (4.0 for VS 2010). This should clear up any problems you are having.
This solved the same problem. There is no need to uninstall Visual Studio.
It's because of .NET Framework 4.5 is replacing .NET Framework 4.0.
I uninstalled Visual Studio 2010 several times with no luck. When I removed .NET Framework 4.5 and reinstalled Visual Studio 2010 it went fine.
See Uninstall Visual Studio 11 completely to do a fresh install.
For me, setting 'Generate Manifest' to 'No' fixed it. (Also fixed with /INCREMENTAL:NO)
If you're using x64, here's a resource will help:
This happens because Microsoft .NET 4.5 is incompatible with Visual C++ 10. The workaround is to ensure that you run the .NET version of cvtres.exe rather than the Visual C++ version. I did this by renaming the Visual C++ versions of those files and copying the .NET versions in their place.
1. C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cvtres.exe
2. C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cvtres.exe
1. C:\windows\Microsoft.NET\Framework\v4.0.30319\cvtres.exe
2. C:\windows\Microsoft.NET\Framework64\v4.0.30319\cvtres.exe
I solved this problem eventually by doing a full uninstall of VS2012 RC, followed by a full uninstall of VS2010, then a reinstall from scratch of VS2010.
It took forever, but I'm now able to compile C++ projects in VS2010 again.
The issue was magically resolved for me by removing .NET 4.5, and replacing it with .NET 4.0. I then had to repair Visual Studio 2010 - it being corrupted along the way somehow.
I had previously installed, and then un-installed, Visual Studio 2012 - which may be related to the issue.
I have not installed Visual Studio 2012, but I still got this error in Visual Studio 2010. I got this resolved after installing Visual Studio 2010 SP1.
I had the same problem with Microsoft Visual Studio 2010 Ultimate and it was solved by the method described in this youtube video
The video suggests to rename the file cvtres.exe in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin (in my Win7X64 matchine) to cvtres-old.exe
It didn't work for me after Enable Incremental Linking -> "No (/INCREMENTAL:NO)", but it works for me after I deleted the rc file.
+1 to user Short for an answer that worked for me!
I tried to do some debugging of this with msbuild /v:diag, and I'm seeing that MSBuild is trying to embed a manifest in the executable, with <somename>.dll.embed.manifest.res on the linker command line, where that is a resource file built from <somename>.dll.embed.manifest. But the manifest file is an empty Unicode text file. (That is, a two-byte file with the Unicode 0xFEFF prefix)
So the root problem seems to have something to do with that manifest file not being generated, or it being used when <somename>.dll.intermediate.manifest should have been used.
An alternate solution seems to be to turn off the "Embed Manifest" option under Properties, Manifest Tool, Input and Output.
To summarize:
Step1
Project Properties
-> Configuration Properties
-> Linker (General)
-> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
if step1 not work, do Step2
Project Properties
-> Configuration Properties
-> Manifest Tool (Input and Output)
-> Enable Incremental Linking -> "No"
if step2 not work, do Step3
Copy file one of:
C:\Program Files (x86)\Microsoft Visual Studio
11.0\VC\bin\cvtres.exe
C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\bin\cvtres.exe
C:\Program Files (x86)\Microsoft Visual Studio
13.0\VC\bin\cvtres.exe
Then, replace to C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\bin\cvtres.exe
With me, do 3 step it work
As of January 2014, for some reasons I got installed .NET Framework 4.5.1, I don't know if due to a third party software installation or to an automatic update.
On January 29th, I got installed one component and I started receiving the
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
message. At that time, I solved by avoiding the incremental link.
On Jan. 31st, I got installed another component of .NET Framework 4.5.1 and the incremental link trick did not work anymore. I then installed the Visual Studio 2010 SP1, but afterwards the problem became:
Error 6 error LNK1104: cannot open file 'msvcrtd.lib'.
I think the SP1 messed up my Visual Studio 2010 installation.
So I uninstalled .NET Framework 4.5.1, installed .NET Framework 4.0 and uninstalled and then reinstalled Visual Studio 2010. That worked for me.
Even inspite of installing Service pack you are getting the error then try removing/renaming the cvtres.exe in the C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin folder. This has worked for me.
I set Enable Incremental Linking to "No (/INCREMENTAL:NO)" and it doesn't work for me.
Next I've changed:
Project Properties
-> Configuration Properties
-> General
-> Platform Toolset -> "Visual Studio 2012 (v110)"
and it works for me :)
Reinstalling CMake worked for me. The new copy of CMake figured out that it should use Visual Studio 11 instead of 10.
I was using the Windows SDK for core Win32 programming and had .NET 4.5 installed for "unknown" reasons. I have uninstalled that and installed 4.0 like previous answers and yeah, it worked for me too.
Just am flabbergasted that I had to use the useless .NET framework for building Win32 apps using the SDK.
I solved this by doing the following:
In a command prompt, type msconfig and press enter.
Click services tab.
Look for "Application Experience" and put tick mark (that is, select this to enable).
Click OK. And restart if necessary.
Thus the problem will go forever. Do build randomly and debug your C++ projects without any disturbance.
For those of you looking for a solution for this problem with the OpenGL SuperBible 6th source code samples, the solution is building in Release instead of Debug. All projects have disabled the incremental linking option in the Release version.
My problem was that I've had two paths on my PC that contained the same libraries. Both paths were added to the Additional Library Directories in Configuration Properties -> Linker -> General. Removing one of the paths solved the problem.
I had the same problem after updating of .NET:
I uninstalled the .NET framework first,
downloaded visual studio from visualstudio.com and selected "repair".
NET framework were installed automatically with visual studio -> and now it works fine!
I tried a few times and finally solved the problem by uninstalling several times the VS2010. I think I hadn't uninstalled all the files and that's why it didn't work for the first time.
In the installation of VS2012, it is said that if you have VS2010 SP1 you can't work on the same project in both programs. It is recommended to have only one program.
Thanks!

PROBLEM encountered visual studio 2008 installation

I installed Visual Studio 2008 package FULL option. It worked with out any problem. I installed Vstudio 2008 and MSDN in separate folder in the D drive. 2 days later in order to remove my projects i uninstalled every thing and also i deleted visual studio 2008, visual studio 2005 folders from C:\Documents and Settings\IRCTC\My Documents. (I believe these 2 folders were automatically created when we install visual studio) also I cleared %path% and path (c/windows/path). Again I installed VISUAL STUDIO 2008 but now I can't able to create window application (other web, vb also), what is the solution for this ...
ERROR that shown is
c:/documents and settings/IRCTC/local settings/temp/g1zzsdl.bak/temp/windowsFormsApplication.csproj cannot be opened because project type (.csproj) is not supported by this version of visual studio.......
Whether any system file corrupted (windows temp or .net folber in windows).....
No other installation problem found in my system.....
please help.....
What are the files/folders required for the installation......
When you get that error is usually because:
You are trying to open a project created with a previous version of Visual Studio (not your case)
There was a bit of a screw-up during the installation (sounds like your case)
I'd uninstall the thing and reinstall completely first thing.
If it still doesn't work, it could be related to VS templates and you might wanna try and run from Visual Studio 2008 command prompt:
devenv /InstallVSTemplates
If it still doesn't work, open Visual Studio, in the menu, Open Tools->Options->Projects and Solutions->General. At this point you will notice the path of Project Templates is set to "C:\Documents and Settings[yourUserName]\My Documents\Visual Studio 9\Templates\ProjectTemplates" or something very similar to that. In order to fix it you gotta set that path to C:\Program Files\Microsoft Visual Studio 9\Common7\IDE\Project Templates or the same path according to wherever you installed Visual Studio
I don't think is related to VS project Templates though - see this link
Try and see what happens!
Why didn't you use visual studio's uninstall function available from the control panel|add/remove programs?
I would uninstall the latest installation as described above, and try again.

Resources