Spike UK
asked on
Error creating a new C++ project in ,net
When I try to create a new Windows 8.1 C++ project in .Net, I get receive the error:
A problem occurred creating the su project 'myApp,Windows'.
Unable to read the project file 'Myapp.windows.vcxproj'... .
Win32.user.props(0,0). The project file could not be loaded. Root element is missing.
A problem occurred creating the su project 'myApp,Windows'.
Unable to read the project file 'Myapp.windows.vcxproj'...
Win32.user.props(0,0). The project file could not be loaded. Root element is missing.
ASKER
Sorry- that was just a typo. No commas are used.
'Myapp.windows.vcxproj'here you were using a dot? can you try to only use MyApp and nothing else?
note, i don't think that dot characters are a problem. but probably you already have a Project with that name? or a folder name? or, the path you have chosen is on a remote server?
Sara
if the issues are not be solved by using a proper name, you may try to start visual studio 'as administrator'.
Sara
Sara
ASKER
The application isn't really called 'Myapp.windows.vcxproj' - that was for clarity (obviously a mistake).
I am creating a new project - and giving it a new unique name.
e.g. 'CompletelyNewApp1' - which give 'CompletelyNewApp1.windows .vcxproj'
The error occurs whatever I call it.
I can create C# applications OK.
I am creating a new project - and giving it a new unique name.
e.g. 'CompletelyNewApp1' - which give 'CompletelyNewApp1.windows
The error occurs whatever I call it.
I can create C# applications OK.
which visual version are you using?
if i create a CompletelyNewApp1 in vs2010 it creates CompletelyNewApp.sln and CompletelyNewApp1.vcxproj.
the .Windows was not added to my names. which kind of c++ project are you choosing (i took Empty CLR Project).
Sara
if i create a CompletelyNewApp1 in vs2010 it creates CompletelyNewApp.sln and CompletelyNewApp1.vcxproj.
the .Windows was not added to my names. which kind of c++ project are you choosing (i took Empty CLR Project).
Sara
it seems that the .vcxproj XML file created by vs is incorrectly written (or even empty). try to open it with a text editor.
see http://stackoverflow.com/questions/3772486/how-to-fix-root-element-is-missing-when-doing-a-visual-studio-vs-build
for issues with corrupt vcxproj files.
Sara
see http://stackoverflow.com/questions/3772486/how-to-fix-root-element-is-missing-when-doing-a-visual-studio-vs-build
for issues with corrupt vcxproj files.
Sara
ASKER
It's VS 2015
When I create the C++ solution, as a DLL (Universal Windows 8.1). the Name is entered as, for example Dll1 and the Solution name as Dll1.
with the location C:\Users\me\Documents\Visu al Studio 2015\Test\ the error occurs.
The error message appears
"A problem was encountered creating the sub project 'Dll1.Windows'.
Unable to read the project file "Dll1.Windows.vcxproj".
C:\Users\me\AppData\Local| microsoft\ MsBuild\v4 .0\Microso ft.Cpp.Win 32.user.pr ops(0,0): The project file could not be loaded. Root element is missing.
When I create the C++ solution, as a DLL (Universal Windows 8.1). the Name is entered as, for example Dll1 and the Solution name as Dll1.
with the location C:\Users\me\Documents\Visu
The error message appears
"A problem was encountered creating the sub project 'Dll1.Windows'.
Unable to read the project file "Dll1.Windows.vcxproj".
C:\Users\me\AppData\Local|
ASKER
No .vcxproj has been created in the project directory.
it looks as if the visual studio tools for 'Universal Windows 8.1' are not properly installed.
can you create other c++ projects? for example mfc or win32 projects?
what is your Windows platform? is it Windows 8.1?
Sara
can you create other c++ projects? for example mfc or win32 projects?
what is your Windows platform? is it Windows 8.1?
Sara
ASKER
I haven't managed to create any C++ projects.
Windows 10
Windows 10
i used visual 2015 community and installed tools for Windows 8.1 Universal.
after that i had no problems to to create a new dll1 project.
here the dll1.windows.vcxproj file:
you may try to open the file with your visual studio. i would assume that it doesn't work either.
i would suggest you to uninstall the vs2015 completely and do a proper installation with your current user,
Sara
after that i had no problems to to create a new dll1 project.
here the dll1.windows.vcxproj file:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{c33e46e9-185e-406a-92df-bb9813ef817f}</ProjectGuid>
<Keyword>DynamicLibrary</Keyword>
<RootNamespace>Dll1</RootNamespace>
<DefaultLanguage>de-DE</DefaultLanguage>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>8.1</ApplicationTypeRevision>
<ConvergedProjectType>CodeSharingDll</ConvergedProjectType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared" >
<Import Project="..\Dll1.Shared\Dll1.Shared.vcxitems" Label="Shared" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateManifest>false</GenerateManifest>
<IgnoreImportLibrary>false</IgnoreImportLibrary>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<CompileAsWinRT>false</CompileAsWinRT>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
you may try to open the file with your visual studio. i would assume that it doesn't work either.
i would suggest you to uninstall the vs2015 completely and do a proper installation with your current user,
Sara
ASKER
I haven't managed to create a windows.vcxproj file yet.
I'm going to uninstall VS2015 and re-install. I've already done this but will try again.
I'm going to uninstall VS2015 and re-install. I've already done this but will try again.
ASKER
Uninstalled VS2015 using VS2015 uninstall feature manually removed VS2015 C++ 8.1 components using Windows.
Re-installed using vs_community_ENU__16184521 40.1484239 807.exe
Installed without errors.
Still can't create C++ programs - the issue stiil exosts.
Re-installed using vs_community_ENU__16184521
Installed without errors.
Still can't create C++ programs - the issue stiil exosts.
ASKER
Tried creating a new C++ project whilst running as administrator -
Error reads:
Unable to read the project file "App11.vcxproj".
C:\Users\Me\AppData\Micros oft\MSBuid \v4.0\Micr osoft.Cpp
Win32.user.props(0,0):The project file could not be loaded. Root element is missing.
Error reads:
Unable to read the project file "App11.vcxproj".
C:\Users\Me\AppData\Micros
Win32.user.props(0,0):The project file could not be loaded. Root element is missing.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The solution gave didn't solve the problem but pointed me in the right direction
if so, you should give assist points to the comments that helped.
you also should be aware that the suggested clean deletion and reinstallation of VS also would have solved the issue, probably better than the 'repair' modus after manually removing files from a location where the setup had no access to.
Sara
ASKER
Apologies - i thought I had. The clean deletion and re installation of VS didn't solve the problem. I mentioned I had already tried this- it didn't solve the problem. After re-installing the error re-occurred. Only after deleting those files are repairing did the errors disappear. The files were also recreated.
I would suggest to use only alphabetical letters to avoid issues.
Sara