I'm trying to open a new C++ project in Visual Studio(2012) but every time I create a new project this error pops up:
System.Collections.Generic.RandomizedStringEqualityComparer is not a
GenericTypeDefiniton. MakeGenericType may only be called on a type for which
Type.IsGenericTypeDefinition is true.
I've already changed the project path and restarted visual studio several times but no result.
Error Image
Try to reinstall or c++ compiler path was not set
Set Compiler Path or RunAsAdministrator
Now add the Compiler directory to your path:
Open the Control Panel (Start > Settings > Control Panel) and double-click the System program.
Click change settings links to open System Properties dialog.
Select the Advanced tab and click Environment Variables.
In the System Variables panel of the Environment Variables dialog, select the Path variable and click Edit.
Default Path of Compiler
Windows 7
C:\Program Files (x86)\Microsoft Visual Studio [Version]\VC\Bin\cl.exe
Windows XP
C:\Program Files\Microsoft Visual Studio [Version]\VC\Bin\cl.exe
Related
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?
Working in Visual Studio 2017; I have added a class library in my project. Now I want to add an app.config file.
When I try to add by "Add new Item" but config file is missing from item list.
How can I do it?
You probably forgot to install workload .NET desktop development.
Go to installation, click to modify and include the workload .NET desktop development.
Check image of installation screen
Just right click your class library. Click on Add -> New Item and you should find Application Configuration file
Note:
If you have a solution without any project or all project are unloaded, you would not find the Application Configuration File
If you are missing visual studio templates,then Close all instance of Visual Studio and Open visual studio command prompt and type,
devenv /installvstemplates
Press Enter. Let the process be complete and now open visual studio. You will get all missing templates under Visual Studio installed templates.
I couldn't add app.config using the GUI tools for my web project. However, I have added the app.config file manually and the build process picked it up and used it.
Error 3 error C3859: virtual memory range for PCH exceeded; please recompile with a command line option of '-Zm163' or greater C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xstring 1810
This http://msdn.microsoft.com/en-us/library/bdscwf1c.aspx is killing my butthole for real.
Im stuck at Click the c/c++ folder..
Click the C/C++ folder.
Click the Command Line property page.
Type the compiler option in the Additional Options box.
http://www.mediafire.com/view/skb2y7y45hp4svy
Your problem is that you in the "solution" level properties while you should be on the "Project" level properties.
you can easily get there by right click on the project in the "Solution Explorer" and then choose the last option in the menu "properties".
I'm not sure why I am getting these. I just migrated my dev machine to Windows 8 and it's a new installation of Visual Studio 2008. I'm debugging my C++/MFC project and when I try to step into a method as such:
CString str = L"Test string";
func1(str); //Stepping into this method with F11
void func1(LPCTSTR pStr)
{
}
I get this window:
It used to work before. What is missing now?
When I do the same thing, my debugger steps into C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include. Check that the VC folders are all set up correctly, go to Tools\Options in VS2008, expand Projects and Solutions, select VC++ Directories and choose Source files in the "Show directories for:" combo -- my entries are:
$(VCInstallDir)atlmfc\src\mfc
$(VCInstallDir)atlmfc\src\mfcm
$(VCInstallDir)atlmfc\src\atl
$(VCInstallDir)crt\src
I am trying to build a cpp project. On the project resources section there is a resource whose relative path is something like
$(QPID_BUILD_ROOT)\src\windows\resources\org.apache.qpid.messaging.rc
Where am I suppose to define this variable ? I mean where does VS2010 read this variables value from ?
These are environment variables. You can set them for user only, or for the whole system. You also can set what you want "ad-hoc", for example (assuming that your Visual Studio is installed in c:\Program Files\Microsoft Visual Studio 10 and that you want x86 build environment):
Go to start
Type cmd.exe
At the command prompt:
"c:\Program Files\Microsoft Visual Studio 10\VC\vcvarsall.bat" x86
set QPID_BUILD_ROOT=[some path]
Launch Visual Studio IDE: devenv
In the Visual Studio IDE you can use a dropdown list (e.g. on one of the VC++ directories) and the click Edit. In the dialog window click Macros - this will show you all the variables (including the one set above) currently available to Visual Studio.
Of course you don't have to set entire build environment (as shown in 3), this step is only needed to be able to just type devenv instead of typing the whole path to devenv.exe in 5.
Im assuming that you know how to set environment variables for user or the whole system and that you know that you need (at least) to lauch any application again (or even login/logout or reboot) in order for that application to inherit those new variables.