I am working with Visual Studio Code, and when I am starting to code in C, an error message shows up:
include errors detected. Please update your includePath. Squiggles
are disabled for this translation unit
(C:\Users\user\Desktop\c2\main.c)
Any help?
Well, in case you tend to tranfer your code from one system to another, some things may get messed up.
VSCODE creates a specific folder when you start a new project called -you guessed it- "vscode" where some useful information about JSON and the compiler are stored. If you move your project to a different pc and try to open it via vscode, it is likely that the info stored in VSCODE-directory will not apply to this system.
In my case, I had a path like: "Users/user1..." in a system that did not have any user named user1 so i had to configure the VSCODE directory or even delete it altogether and let VSCODE create a new one.
Related
Recently, whenever I change something in my code, rebuild, and attempt to debug, I get the error "This breakpoint will not currently be hit, No symbols have been loaded for this document."
But then as soon as I restart my computer, everything is fine and I can debug properly. Why is this happening? It's really frustrating having to restart my desktop every time I try to debug my code. I've looked all over stack overflow and MSDN and can't find any solution to my particular problem. Any help is appreciated
"This breakpoint will not currently be hit, No symbols have been loaded
for this document."
(As for this error message, it's common error which has different causes. I can't give the most direct correct answer for this issue, I can only give you some tips for trouble-shooting. In order to avoid losing contact in the round-trip comments, I post those content as answer instead of comments.)
Since VS2015 have been released for long time, I would think this issue is a particular one, not found similar issues online.
First of all, please create a new simple project to check if this issue occurs in new project when debugging.
If it persists in new project, I think this issue has something to do outside environment like VS settings, VS config files or Debug options.
You can try:
1.Go Tools=>Import and Export Settings=>Reset all settings =>No,just reset settings=>Finish
2.Repair VS IDE since it seems to work well in the past, and just got the issue recently, so maybe something is broken for your IDE(In Control Panel find VS2015, right-click=>change=>repair). Also, make sure you have the latest VS2015 Update3 instead of earlier versions.
And if it works well in new project, then maybe the issue is about the whole project or solution itself. You can try:
1.Navigate to solution folder, close all vs instance, delete the .vs, bin and obj folders and restart VS to check if it helps.
2.Make sure you've loaded the required symbols, check the content in your Modules window during debugging, there's possibility you don't load necessary symbols successfully.
3.Check the output folder after your rebuild, check in folder like bin\debug folder if you have both the .exe and .pdb files. And make sure the .exe and .pdb files are up-to-date after your rebuild by checking their Date Modified.
Hope it helps and more info about the project type, dependencies would be better:)
Whenever I try to delete (or even exclude) any file from my VS2015 C++ project, I get the following message:
File '...' cannot be removed. The most likely reason is that the file is under source code control and cannot be removed at this time.
Trying to search for this error message gives no results anywhere - am I the only one that has ever got it?
I use perforce, and all the files are checked out, so VS should not know anything about version control.
The only solution I can find is to remove the files from vcxproj file manually, which is very tedious.
Update: the problem seems to be with Perforce plugin. Disabling it allows me to remove files again. This is strange, because I never configured it for this specific project. I also tried to switch source control to None, but it kept resetting every time I restart VS.
I just ran into this issue with Visual Studio 2017. I did some pretty extensive troubleshooting, and found a workaround:
Open the solution/project for which you are seeing this problem.
Open a connection to a perforce depot - even though your solution isn't supposed to be managed by Perforce - by using this option: File / Open Connection to a Perforce Depot...
You should see either a warning dialog or a warning line in the Output tab under Perforce Source Control that says something like "Solution is not under your client's root folder". If you don't see either, you should probably either move your entire solution somewhere that isn't in your client spec (if possible), or exclude the entire solution folder from your perforce client spec. That way, P4VS shouldn't automatically add files in that solution to Perforce.
Navigate to:
Tools / Options / Source Control / Perforce - General
...and uncheck this option to suppress the annoying warning dialog from step 3 that would otherwise appear every time you open that solution:
Warn if solution is outside workspace root
Now, you should be able to remove files again without P4VS interfering. (Fair warning: This workaround may have other side effects that I don't know about, but it has worked for me so far.)
Nothing worked for me so I just opened the project file in a text editor and manually removed the offending files. At some point my build target had changed as well, so a possible reason for this happening was I was trying to remove the files while a different build target was selected to when they were added.
Using TFS in Visual Studio 2013, another Team member made many changes to the solution structure (moving files between projects, new projects, new dtsx files, updating most files, consolidating connection managers). After getting latest, whenever I open the solution the Output window now pops up and continuously lists the same error:
TF10121: The path '' is not found or not supported. Type or select a different path.
(this error repeats about once per second)
There is a similar post here for VS 2013 with similar error, though apparently not with the near constant repetition of the error and no help.
Pinning the Output window helps by at least preventing the constant stream of repeating errors from changing the focus while I work.
No change after reinstalling software.
Closing the solution stops the errors. Unloading all the projects stops the errors, but they resume when reloading.
Opening a file in the soln sometimes temporarily halts the errors.
Opening a local solution is fine, adding the solution to source control causes error to start
This seems to be an error with the workspace mappings. It may be that your workspace mapping contains a drive which is no longer available or another issue that breaks the workspace. Possible issues:
Drive no longer available
Inaccessible network drive
Permissions are blocking access to a folder
Your mapping may require you to run with Elevated Privileges.
The target mapping may be empty
From the File -> Source Control and edit the workspace. If editing doesn't solve it, try deleting the workspace completely and creating a new one.
We using VS SSIS 2012, in solution folder I have .vssscc file and it has very short config info. I saw two parameters have empty value like ""
"PROJECT_FILE_RELATIVE_PATH" = ""
"ORIGINAL_PROJECT_FILE_PATH" = ""
So I changed to
"PROJECT_FILE_RELATIVE_PATH" = "."
"ORIGINAL_PROJECT_FILE_PATH" = "."
And seems removed message. As you can see I have no explanation. Just tried and worked for me.
This happen to me in Visual Studio 2017 with a solution that contained a python project. One of the python environments was an old environment I deleted before. Once I removed that environment from the project the repeating error stopped.
I just barely installed Code::Blocks so that I can learn how to program in fortran with a real IDE (with debugging and other fun things). But I'm running into a puzzling problem while trying to get it to work--Code::Blocks seems to be unable to create any files at all.
Info: I'm running Linux Mint 17 and built Code::Blocks from source (version 13.12 for Debian, which seemed like the closest I could get). When I try to create a new project, it gives the following error for every single file in the project:
Warning
Couldn't save project path/filename
(Maybe the file is write-protected?)
This is when I run code::blocks from the terminal as a super user. When I simply run Code::Blocks without super user, I get the following:
Error
Couldn't create the project directory
path/
No idea what's going on here, and I can't find a similar question. Help?
I finally found the answer.
Do not create new file or new project in C
Try to create in other disks.
Folders situated in C are protected folders
and you can save your file or save as file just fine
I was facing the same problem but after following this below procedure I was able to run the program
Procedure:
In code-block go to the Setting, click on Tool chain executable then click on auto detect
This will solve the problem
One possible cause for your problem is that you specified an invalid path to a new project when starting one.
If you see "Invalid file path" in the "Resulting filename field", you generally should not hit "Next".
Below is a screenshot showing how your dialog should look when you've filled in the file path properly:
In case anyone is curious, I overlooked this initially in CodeBlocks 17.2 on Windows 10 before finding this question and posting this answer.
Linux mint 19.1 with a fresh install of Code::Blocks 16.01.
I was getting the same message as below when trying to create a project and the dialog box never showed the "invalid path" message.
"Couldn't create the project directory: /home/mydir/Code/CppTraining/HelloWorld/"
I found I was able to create the path after I removed one level of subfolders. It seems code::blocks doesn't like project paths to have more than one or two levels of subfolders?
If you're flipping back and forth from Linux to Windows, this problem may occur and it's extremely frustrating as a Linux user to debug.
Windows doesn't understand that the tilde "~/" means your home folder, so you actually have to type "C:\Users\<yourusername>\<path>"
, instead of just typing "~/<path>"
Hope this helps anyone that has run into this.
I have several programs that I have created in vb.net visual studios 2010. I have been working on these programs for months with no problems. Recently I started having an issue where I can no longer access my temp directory while debugging within VS. I can't use My.Settings anymore because these use those temp files. This is the error I get:
Failed to save settings: An error occurred loading a configuration file: Could not find a part of the path 'C:\Users\USERNAME\AppData\Local\PROGNAME\PROGNAME.exe_Url_gty0snnfox5ji5xgprklljwb0e0mthek\1.0.0.0\nl3u0fw2.tmp'. (C:\Users\USERNAME\AppData\Local\PROGNAME\PROGNAME.exe_Url_gty0snnfox5ji5xgprklljwb0e0mthek\1.0.0.0\user.config)*
This file is there though.
I also get an error when trying to use my web services. I get this error:
Access to the temp directory is denied. Identity 'DOMAIN\Username' under which XmlSerializer is running does not have sufficient permission to access the temp directory. CodeDom will use the user account the process is using to do the compilation, so if the user doesn�t have access to system temp directory, you will not be able to compile. Use Path.GetTempPath() API to find out the temp directory location.*
I used the Path.GetTempPath() as the error says and I am trying to access: >"C:\Users\USERNAME\AppData\Local\Temp\"
I have tried going to these folders and making sure that I have the security set to allow everyone complete control. I believe it is a problem with VS not my program because I get the same problem on all of my programs, some of which I haven't opened in months. I did a repair on VS.
I can't think of what might have changed to cause this to stop working all of a sudden. I traveled to a customers facility where I had to change some network settings, but everything should be set back as it was now. My temporary security certificate expired, but I created a new one and now the certificate I am using to sign these applications is in my trusted root on certificate manager and looks to be valid. I should also mention that this is a clickonce deployment and the deployement works fine on my computer and others, it is only while debugging that I have these issues.
I have been running this down for weeks and spent countless hours looking for a solution and have come to a brick wall. Does anyone have any suggestions?
Thanks ahead of time for your help and time! Please let me know if I can clarify anything.
It turns out that the problem was coming from the fact that somehow one of the folders in the filepath to my user.config file got changed. Somehow a .vshost got thrown in on one of the folder names. I still have no idea how this happened and what caused this to happen, and I am not 100% sure that I have gotten to the real root of the problem, but for now, I am able to debug again. I changed the file name back to what it was supposed to be and the errors have stopped. Now lets just hope the file name doesn't get changed back again.