I am trying to create a C++ Linux Console Application in Visual Studio, but so far it is behaving strangely. Upon creation, I get the following warning/error messages:
warning : Platform '[ARM64, 0]' referenced in the project file 'ConsoleApplication4' cannot be found.
warning : Platform '[ARM, 0]' referenced in the project file 'ConsoleApplication4' cannot be found.
warning : Platform '[x64, 0]' referenced in the project file 'ConsoleApplication4' cannot be found.
warning : Platform '[x86, 0]' referenced in the project file 'ConsoleApplication4' cannot be found.
error : Designtime build failed for project '' configuration 'Debug|x64'. IntelliSense might be unavailable. Check *.designtime.log files in your %TEMP% directory.
When I check the log file in my %TEMP% directory, I see the following errors:
error MSB4057: The target "GetClCommandLines" does not exist in the project.
error MSB4057: The target "GetProjectDirectories" does not exist in the project.
I've seen some other questions with similar error messages that involve changing project properties, but when I right-click on the project in Visual Studio and click Properties, I get a popup window saying there are no property pages for the selection.
I have also seen questions that discuss making edits to the .csproj file, but my project only contains a .vcxproj file (I suspect because this is a Linux project?). Additionally, I would expect to see "(Linux)" after my project name in my Solution explorer, but it is not there. The Solution explorer also does not list the main.cpp file under the project, despite the fact that it is present on disk in the project's directory (code-wise, it contains the default printf statement inside a main function, with an include for cstudio). It's almost like Visual Studio doesn't recognize the project as a Linux Console application, but I'm not sure how to make it recognizable.
I have tried this on Visual Studio 2017 and Visual Studio 2019. I have used the Visual Studio Installer program to ensure that the following workloads are installed:
Visual Studio core editor
.NET desktop development
Desktop development with C++
Linux development with C++
I have tried repairing each installation as well as a full uninstall/reinstall. I have also enabled Windows Subsystem for Linux, installed the latest .NET developer tools, and have PowerShell installed on my system. What am I missing?