0
votes

I have a VS 2015 C++ project on a remote directory that I want to share between 2 computers. On one computer it loads fine (it has Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3 Microsoft .NET Framework Version 4.6.01055) on the other computer it fails to load (it also has Microsoft Visual Studio Community 2015 Version 14.0.25431.01 Update 3 Microsoft .NET Framework Version 4.6.01055). When it fails to load I get the (not very informative message)

TargetImager.vcxproj: The application which this project type is based on 
was not found. Please try this link for further information

[The link is completely useless!]

I opened the project file in the solution (can't remember how I managed to do this) and it presents a number of warnings eg.

Severity Code Description Project File Line Suppression State Warning The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'PlatformToolSet' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property, VisualStudioVersion, MinimumVisualStudioVersion, AdditionalFileItemNames, AllowUnsafeBlocks, AppConfigForCompiler, ApplicationIcon, ApplicationRevision, ApplicationVersion, AppDesignerFolder, AspNetConfiguration, AssemblyKeyContainerName, AssemblyKeyProviderName, AssemblyName, AssemblyOriginatorKeyFile, AssemblyOriginatorKeyFileType, AssemblyOriginatorKeyMode, AssemblyType, AutoGenerateBindingRedirects, AutorunEnabled, BaseAddress, BootstrapperComponentsLocation, BootstrapperComponentsUrl, BootstrapperEnabled, CharacterSet, CheckForOverflowUnderflow, CLRSupport, UseDebugLibraries, CodePage, Configuration, ConfigurationName, ConfigurationOverrideFile, CreateDesktopShortcut, CreateWebPageOnPublish, CurrentSolutionConfigurationContents, DebugSecurityZoneURL, DebugSymbols, DebugType, DefaultClientScript, DefaultHTMLPageLayout, DefaultTargetSchema, DefineConstants, DefineDebug, DefineTrace, DelaySign, DisableLangXtns, DisallowUrlActivation, CodeAnalysisAdditionalOptions, CodeAnalysisApplyLogFileXsl, .... Miscellaneous Files H:\CodeProjects\QTProjects\TargetImager\TargetImager.vcxproj 20

Here is the section of the project file XML

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <PlatformToolSet>v140</PlatformToolSet>

It doesn't like this PlatformToolSet setting for instance. I don't get it because it is a setting in the property pages on VS2015 that can be selected. I anyway changed this property clicked apply then changed it back clicked apply. It is still there in the project file as before with same error message, I also changed the setting to v140_xp just to verify that it was seeing the new property which it was.

The story is that I was working on one computer with VS 2015, then I wanted to run something on another remote computer, however by then VS 2015 was replaced with VS 2017 and I installed VS 2017 on the remote. I built the project on VS2017 but then went back to the local PC with VS2015 to do some QT stuff (QT plugin is not yet available on VS2017). This was OK but then it refused to load on the remote VS2017 PC. So I uninstalled VS2017 and replaced it with VS2015, the project still doesn't load on the remote PC with VS2015.

Maybe somehow I have a VS 2017 project that for some reason loads on one computer with VS2015 and not the other, hence the settings that VS 2015 doesn't like.

So I try to create a new QT GUI project (I installed QtVsTools extension) on the remote machine that has problems with my project file. And now I get an error (the same error also occurs with a new win32 console application)

.../TarImager.vcxproj cannot be opened because its project type (.vcxproj) is not 
supported by this version of the application.

To open it please use a version of the project that supports it.

As far as I know .vcxproj has been supported since MS VS 2010

Any idea how I can debug this?

1
Have you checked the output window? This can give you more information before the line with error message - Hans
Have you tried rebuilding the project (or "solution") on the second computer? It sounds like it doesn't know where to look for the files. - z7r1k3
It wont even load up the project, I cannot therefore see project properties or any files. What I have done is load the project file into the solution and then it flagged a number of warnings - ejectamenta
That warning doesn't mean anything. You are looking at the .vcxproj file with the XML editor, it generates warnings when the XML content doesn't match the schema. PlatformToolset did not exist back in 2003. Focus on the error message, it tells you that the C++ tooling is not available. So VS2015 is simply not installed correctly. IIRC it was already an option to skip installing C++ support in the VS2015 installer. Then again, wildly reinstalling VS versions for no particular good reason does point to other problems, maybe the machine's registry is too corrupted. - Hans Passant
Your probably right, Windows also seems to thing that VS2017 is still installed even though I uninstalled it. also I had to install the VS2015 redistributable even though VS2015 had been fresh installed, I am trying a repair. - ejectamenta

1 Answers

0
votes

The visual studio install had become corrupted, I repaired the installation then was able to create projects again. If you get weird project loading errors, then maybe your VS install is messed up.