Problems converting Visual Studio 2005 solution to VS 2010 - visual-studio-2010

Convertion fails with the error messages for the projects like the following:
VCConvertEngine.dll encountered an error.
VCConvertEngine could not convert attribute ConfigurationType = 4 under Configuration Debug|Win32.
VCConvertEngine could not convert attribute CharacterSet = 1 under Configuration Debug|Win32.
The expression "[System.IO.Path]::Combine(D:\Work\iVisit2010\branches\echo\src\common\, "D:\Work\iVisit2010\branches\echo\src\\bins\Win32\Debug"\common.lib)" cannot be evaluated. Illegal characters in path. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets
Project upgrade failed.
Could anyone help, please? (The solution contains many projects.)

Suggestion : use VC2008 Express to convert first, and after using VC2008 project convert to VC2010.

Related

Visual Studio Express 2013 to 2017

I am having issues porting visual Studio Express solutions over to Visual Studio 2017. I have attempted to follow the advice in this article which has not solved the issue.
When I load my solution in 2017, I get an error stating "one or more projects in the solution were not loaded correctly" with the following output:
C:\Users\mikegjohn\Documents\Service Hub\Service_Hub\WindowsApplication1\Service_Hub.vbproj : error : The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\SSDT\Microsoft.Data.Tools.Schema.Sql.UnitTesting.targets" was not found. Also, tried to find "Microsoft\VisualStudio\v15.0\SSDT\Microsoft.Data.Tools.Schema.Sql.UnitTesting.targets" in the fallback search path(s) for $(MSBuildExtensionsPath32) - "C:\Program Files (x86)\MSBuild" . These search paths are defined in "C:\Users\mikegjohn\AppData\Local\Microsoft\VisualStudio\15.0_825df01c\devenv.exe.config". Confirm that the path in the declaration is correct, and that the file exists on disk in one of the search paths. C:\Users\mikegjohn\Documents\Service Hub\Service_Hub\WindowsApplication1\Service_Hub.vbproj
My solution explorer shows nothing and i cannot view any of the properties.
Can anyone point me in the right direction?
I managed to fix this with the help of Lex Li Jun. I reinstalled a number of SQL modules which were left out on the standard VS2017 package and this solved my problem!

Migration from VS6 to VS10: 'AfxCrtErrorCheck' in atlmfc

I am trying to compile the code originally written in Visual studio 6 to VS 10.
I read in one of the MSDN article that 'atlmfc' has been removed from VS10. what is the alternative for atlmfc in VS10 ?
error is pointing to atlchecked.h file.
error C2664: 'AfxCrtErrorCheck' : cannot convert parameter 1 from 'char *' to 'errno_t'
1> There is no context in which this conversion is possible
.
.
program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\atlcomcli.h(2235): error C2065: 'cVal' : undeclared identifier
These errors are in all the header files like atlcomcli.h, oaidl.h.
part 1) I guess that whatever is included in #ifdef has not been recognized in VS10, I might need to give correct path or include relevant header file. Surprisingly no solution on the net so far. If I compare with other solution it doesnt seem to be a problem since path is correct. I am picking all the atlmfc files from visual studio 10 version.
part 2) as Scott said code change is required but here the problem it points to is
#ifdef _AFX
#define ATLMFC_CRT_ERRORCHECK(expr) AFX_CRT_ERRORCHECK(expr)
#else
#define ATLMFC_CRT_ERRORCHECK(expr) ATL_CRT_ERRORCHECK(expr)
#endif
One of the article on the net says - http://msdn.microsoft.com/en-us/library/bb531344.aspx
"#ifdefs in the MFC header files are removed." What does that mean ? if that is removed any alternative for that in Visual studio 10 ?
Also can i directly convert VS6 code to VS10 or should i convert it to VS8 first and then migrate it to VS10 ? Pls help.
'atlmfc' is a folder name in the VC directory. It has not been removed in the versions of VC that cost money but it is removed in the "express" version, which is free. You must have a paid-for version of VC to use the MFC and ATL libraries.
I think VS10 will open and convert your VS6 project, although the result will still require you to make code changes.
Well, direct conversion from visual studio 6 to VS10 is not possible. Why will microsoft allow that ? :)
we have to go through VS5 and then VS10.
also the conversion is gonna be extraordinarily difficult with lot of code changes.
http://www.devx.com/cplus/10MinuteSolution/28908

Issue converting project visual studio 2008 to 2010

so I have downloaded a template from the tutorial website http://devmaster.net/posts/introduction-to-c-with-game-development-part-2-project-template
however I have a problem because the template was apparently made in Visual Studio 2008, and I have Visual Studio 2010. When I convert the project I get the error "Unable to start program'C:\c++\Debug\Template.exe' The system cannot find the file specified."
I looked in the original file before conversion and the \Debug\Template.exe file does exist, however after converting the file it gets deleted. I had a few warnings on my conversion and I found this:
"MSB8012: $(TargetPath) ('C:\c++\Debug\Template.exe') does not match the Linker's OutputFile property value 'Template_debug.exe' ('C:\c++\Template_debug.exe') in project configuration 'Debug|Win32'."
Any idea how to fix this?
Any help would be very appreciated
How about creating a fresh project in Visual Studio 2010 and adding the source files and dependencies. Then compile and run, always works!

Compatibility issues when upgrading a C++ project from VS 2005 to VS 2010 Express

I was given some files that were built in Visual Studio 2005 version.
When I tried to convert the .sln file to use in VS 2010 Express C++, however, I run into problems.
The error gives out the path and says that the file was not found even though the file is there. I know there shouldn't be any compatibility issues between the two unless I am missing something. Has anyone run into this type of problems?
The exact error message is:
"Conversion Report - GeoM\GeoM.vcproj: Converting project file
'C:\Users...\GeoM\GeoM.vcproj'. File 'C:\Users...\GeoM\GeoM.vcproj' was not found. \
Project upgrade failed.
The most likely explanation is that your C++ project has been configured to support compilation for a platform other than x86 (such as x64 or IA-64).
This is explained on the Visual C++ blog, in the Visual Studio 2010 C++ Project Upgrade Guide:
Make sure you have the required platforms installed before doing upgrade
Converting a project on a machine without all the available platforms for the project will result in a conversion error. For example, if you try to convert a project with Itanium Platform on Visual Studio Professional SKU, which does not support the Itanium platform, you will see a conversion error like the following:
Failed to upgrade 'Debug|<Itanium>'. Please make sure you have the
corresponding platform installed under '%vctargetspath%\platforms\Itanium'.
Cannot load the project due to a corrupt project file. The following error
has occurred during XML parsing:
File: D:\Sample\ConsoleApp\ConsoleApp.vcproj
Line: 28
Column: 5
Error Message:
System error: -2147154677.
The file 'D:\Sample\ConsoleApp\ConsoleApp.vcproj' has failed to load.
This is by design as the conversion needs to evaluate the properties in the missing platforms to do a successful conversion. You can verify which platforms are installed on your machine by looking in the following directories: %ProgramFiles%\MSBuild\Microsoft.cpp\V4.0\Platforms (or %ProgramFiles(x86)%\MSBuild\Microsoft.cpp\V4.0\Platforms on x64 machine) for the Platforms installed on the machine.
Since the Express version does not support compiling C++ applications for either of these platforms, the upgrade wizard is failing to convert your project and returning the described error message.
The only way this upgrade is going to succeed is if you use a full version of Visual Studio (with the appropriate platform compiler tools installed), or if you edit the solution/project files that you have to remove any mention of a non-x86 configuration. You should be able to do this with a simple text editor like Notepad, but as always, back up first in case you destroy something irreplaceable.

Generating VS 2005 .vcproj's by hand

I'm working on a script that generates Visual Studio 2005 C++ project files (.vcproj).
The script reads a makefile, then spits out a c++ project.
INPUT: makefile ---> OUTPUT: VS 2005 c++ project (.vcproj)
However, when I try to build the auto-generated project in VS 2005, error outputs: "Unspecified Error." Evidently, I am not generating the VS 2005 .vcproj file correctly.
Assuming that my c++ project file was malformed, I opened up VS 2005 and made a new C++ project. I actually copied the good, VS 2005-created project file to my non-working, malformed project file. I replaced the Name, Reference Includes (.libs), Compile Includes (.cc, .c), etc. in the good VS 2005 project with my malformed project file's information.
However, I still cannot get VS 2005 to compile my .vcproj. Perhaps VS 2005 is very particular about the content of its .vcproj's?
Please give me advice on how to manually generate a VS 2005 .vcproj.
Thanks!
The project files are in the MSBuild format, which is a XML file format with a schema (XSD). You can verify your generated files against this schema. Follow the instructions here:
http://blogs.msdn.com/b/msbuild/archive/2005/11/04/489212.aspx
to locate the schema files and then grab your favored tool schema verification tool to validate your tool's output. A discussion about schema validation tools is here:
XML Schema (XSD) validation tool?

Resources