The other answers i've seen proved to be ineffective.
I'm using c++ and it gives me error(red squiggle) when i include vector or string.
It tells me that my include path is not updated so i click on the lightbulb and try to edit intellisense configurations.
In this window there's an include path section, inside the box there's this string: ${workspaceFolder}/**.
So is this string the problem?
I've tried to put in this box the following path as well:
/usr/local/include but it doesn't change anything...
Please what should i change about this include path??
What is there supposed to be in it?
Press Ctrl+Shift+P to open the Command Palette
Start typing "C/C++" and then choose Edit Configurations (UI) from the list of suggestions. This opens the C/C++ Configurations page. When you make changes here, VS Code writes them to a file called c_cpp_properties.json in the .vscode folder.
Find the Compiler path setting. VS Code will attempt to populate it with a default compiler based on what it finds on your system. For Clang on macOS, the path should look like this: /usr/bin/clang.
The Compiler path setting is the most important setting in your configuration. The extension uses it to infer the path to the C++ standard library header files. When the extension knows where to find those files, it can provide lots of useful information to you as you write code.
Set IntelliSense mode to ${default}, which on macOS is clang-x64.
You only need to modify the Include path setting if your program includes header files that are not in your workspace or in the standard library path.
On macOS, you must set the macFrameworkPath to point to the system header files.
Visual Studio code places these settings in .vscode/c_cpp_properties.json.
Original documentation here!
I have discovered Property Manager in Visual Studio 2010. However there are two project properties that I haven't found how to set a default value for. Under Project Defaults in the project property pages dialog window, there is Configuration Type property whose default value is Application (.exe). I would like the default to be Dynamic Library (.dll). The other property is Character Set whose default value is Use Multi-Byte Character Set but I would like it to be Use Unicode Character Set.
Please note that I have also discovered the file Microsoft.Cpp.props but it contains a warning not to edit the file's contents - so I would prefer not to.
Is it possible to set the defaults I desire and if so, how do I do it?
If I run my app on an UWP device I get the following warning in the Output window:
MakePRI : warning 0xdef00522: Resources found for language(s) 'en,de' but no resources found for default language(s): 'de-DE,en-US'. Change the default language or qualify resources with the default language. http://go.microsoft.com/fwlink/?LinkId=231899
Don't know if this is related, but I also get
1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2459,5): warning : APPX4001: Build property AppxBundlePlatforms is not explicitly set and is calculated based on currently building architecture. Use 'Create App Package' wizard or edit project file to set it.
This page states, that I have language specific resources, which I haven't qualified with the language tag. How can I find out, which resources these are?
I have images in the Assets folder, but they are language independent ones. Furthermore, I've set the default language in the Package.appxmanifest to de-DE. If I search for the language abbrevation from the warning, I can only find a priconfig.xml and AppxManifest.xml, both in the Debug output folder.
What should I do to remove this warning?
Edit:
The warning seems to disappear if I add a AppResources.en-US.resx file (currently I have en-US set as default language in Package.appxmanifest). Additionally, I have a file for AppResources.de.resx and AppResources.resx (should be en). But why does the sample project doesn't need such a file, despite there should be the same settings? What I'm missing?
The warning seems to disappear if I add a AppResources.en-US.resx file (currently I have en-US set as default language in Package.appxmanifest). Additionally, I have a file for AppResources.de.resx and AppResources.resx (should be en). But why does the sample project doesn't need such a file, despite there should be the same settings? What I'm missing?
As you said, the AppResources.resx is en. And you could expand the Properties node in the Portable Class Library (PCL) project and double-click on the AssemblyInfo.cs file. Add the following line to the file to set the neutral resources assembly language to English:
[assembly: NeutralResourcesLanguage("en")]
This informs the resource manager of the app's default culture, therefore ensuring that the strings defined in the language neutral RESX file (AppResources.resx) will be displayed when the app is running in one the English locales.
You have set en-US as default language in Package.appxmanifest, However, there is no such file corresponding to it. So it will throw warning.
The default language of the sample project is en-US, and there is no such file corresponding to it. It also throw the same warning in my side. if you modify the default language to en, the warning disappear. Because it has set AppResources.resx as en in AssemblyInfo.cs file.
Foe more you could refer to AssemblyInfo, Supported languages.
Just to extend answer from Nico Zhu - MSFT
if you are using .Net Standard there is no assemblyInfo.cs file because everything is stored in the csproj file. So just go to properties of the shared project and change the Project neutral language to whatever your resx default file is.
or you can right click on the project and edit the project and the line below.
For me problem was,after converting from PCL to Net Standard, suddently UWP application wasnt picking the default resource file which was en-US. I recognized because i was having this setting in assmeblyInfo.cs and since It was removed, it didnt work. But somehow it works fine for Android project.
<PropertyGroup>
<NeutralLanguage>en-US</NeutralLanguage>
</PropertyGroup>
I am dumbfounded as to why my icon/app name will not change on the iPhone home screen when I change languages in the settings.
I have the proper code in my French info.plist for example
"CFBundleDisplayName" = "Your_Product_Name";
"CFBundleName" = "Your_Product_Name";
But it still won't change.
The only way I've been able to change it is under Build Settings -> Product Name. But that shows the same name across all languages.
Any idea how to get the proper name for the correct language? Thanks!
You're on the right way, but still missing a step before getting it working :)
You need to add a setting in your "app"-Info.plist:
Add the "Application has localized display name" setting and set it to YES.
Assuming you have created your InfoPlist.strings correctly (you should have one InfoPlist.strings in your fr.lproj directory, and another one in the en.lproj directory, each of them containing the appropriate CFBundleName and CFBundleDisplayName settings), your app name should now be translated according to the device's language settings.
You can also check this pretty good tutorial about iOS localization to get you started: http://www.raywenderlich.com/2876/localization-tutorial-for-ios
I'm trying to build gtest on Visual Studio 2010. After converting the solution file, I tried to build, and I got the following warning messages.
Warning 1 warning MSB8012:
TargetPath(C:\Users\sucho\Desktop\gtest-1.5.0\msvc\gtest/Debug\gtest.lib) does not match
the Library's OutputFile property value (C:\Users\sucho\Desktop\gtest-1.5.0\msvc\gtest\
Debug\gtestd.lib).
This may cause your project to build incorrectly.
To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property
values match the value specified in %(Lib.OutputFile).
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets
The message says I need to setup variables $(OutDir), $(TargetName) and $(TargetExt), together with property values specified in %(Lib.OutputFile).
How can I do that with Visual Studio (especially VS 2010)?
I see it. Right-click the gtest project, Properties, Configuration properties, General. Ensure that the Debug configuration is selected (upper left combo). Change the Target Name property to
$(ProjectName)d
Note the added "d" to change the name from gtest to gtestd. The warning is otherwise benign.
I think no one has the right answer, i solved this way: in project properties pages, check if linker->General->Output file match configuration properties->General->target name & configuration properties->General->target extension.
You don't need to add any 'd', of course, is more simple set to Inherit from parent or project defaults, for all 3 variables.
Example:
Linker → General → Output File = "myproject.exe"
then:
Configuration Properties → General → Target Name = "myproject"
configuration properties → General → Target Extension = ".exe"
The warning is spurious -- assuming you're using Google Test, it works just fine
You can make it go away however. Right click on the offending project and select properties. Select "Librarian" in the tree view on the left hand side, and change the "Output File" item on the right by clicking on the box next to output file, and selecting "Inherit from parent or project defaults".
The background to this is that Microsoft changed the meaning of the $(TargetName) macro. It used to mean "whatever filename you put in Linker | Output File, minus the extension". They changed it to "by default, the name of your project". (This is something you should never do, in my view; they should have added a new macro).
Whereas VS2008 and earlier were able to parse the file name out of the Linker setting, apparently they were not able to parse it out in the migration to newer versions, leaving our configurations broken.
The warning itself is probably not important, but if you use $(TargetName), say by passing it to a batch file, this change will break your batch process.
For us, the solution has been to copy the file name (minus extension) from Linker | Output File to General | Target Name, and then set Linker | Output File to "inherit from parent/default". This is because we use suffixes like "d" (for debug), "u" for Unicode, _64 for 64-bit and so forth.
On the other hand, if your output file always matches the name of the project, then all you need to do is set Linker | Output File to "inherit default" and you're done, in principle - providing that the output directory you want for your compiled file matches General | Output Directory.
This change is absolutely infuriating because it involves moving literally hundreds of settings around, all due to sheer laziness on Microsoft's part, as far as I can see.
I was just trying to compile an application in Visual Studio 2019 that I had last compiled in Visual Studio 2005. I encountered the same warning.
I thought I would show what I did visually with screen shots.
Solution Name v Target Name
As you can see, my variables were both set to Import Text:
I could have just set the $(TargetName) to ImportText to solve my issue. However, we will leave those values as they are.
Linker / General Output File
This is how I had the output file setup:
Notice that I had overridden the output target name as ImportText. This was over 10 years ago and I did not have as much experience.
General / Target Name
So all I had to do was make the same adjustment here:
Now it compiles file.
This kind of errors typically arise when upgrading old project to new version of Visual Studio (like in your case to VS2010) and also if project settings may have been manually changed (for example changing executable name). We know VS2010 uses these macros $(ProjectName) $(TargetName) $(OutDir) $(TargetExt) to control release/debug outputs but it is often mystery where to change them. We than typical resort to changing the name of output files directly through Project >> Properties. This means we now have to change the output files separately for debug and release build and if there was any dependencies, we will get error like This may cause your project to build incorrectly..
These macros/properties are VS2010 defaults but you can set them yourself in .vcproj files by editing it in notepad. Note search first for the property in the .vcproj file first, if its there than change its value, if not define it like below.
<PropertyGroup Label="My Values">
<ProjectName>New_Project_Name</ProjectName>
</PropertyGroup>
Above I have defined a new <property group> to keep these values but you can define them anywhere. I define this at the top of the file right after debug/release configuration group so its visible everywhere. Make sure your project properties are setup properly to use them correctly (they should be what is VS2010 default settings). If you have changed them you should copy it from new test project. You can of course add the other Macros you want to set values for in the above group as well.
You can also verify the new values of this macros through project properties. For example click in Configuration Properties >> General and than in 'Target Name' box. Select edit. It will bring up a dialog box with the button 'MACROS >>'. Click that and it will show you what the value of each macro is. It should correctly reflect the new values that you set in .vcproj file.
Just as Hans Passant posted, you need to modify the TargetName property manually. This is different between VS2005/2008 and VS2010. Please refer to http://social.msdn.microsoft.com/Forums/en-US/vcprerelease/thread/3c03e730-6a0e-4ee4-a0d6-6a5c3ce4343c