Codeblocks Error 'Project File does not Exist' - codeblocks

When I have some other project open in CodeBlocks and I try to open a new project into the workspace by double clicking on the .cbp file from the explorer, it gives an error "Project File does not exist...". But the same project when I open using File->Open Project, it opens just fine.
How do I open the CodeBlocks project externally using the .cbp file without getting this error?

Try
a) Close all instances of CodeBlocks, then try to reopen the project.
OR
b) Open the project file by the menu File->Open

The path of your new project is too long.

Related

Visual studio wrong file path for Form1.cs file

I am trying to open a project which was created on one computer but has since been moved to another one due to the computer going caput. Now when I open the project and try opening the Form1.cs file, or any of the designer files, I get the error message saying "Cannot find the file 'C:...\Form1.cs'. It may have been moved or deleted". I have omitted the full path which is a reference to the old computer.
How do I change the file path so that my project can find it?
I have found another thread on this issue: Visual Studio retrieving an incorrect path to a project from somewhere
Have tried all of the suggestions (deleting .suo files, moving the project to a new folder, etc.) Nothing has worked so far. There is however in the accepted solution a reference to "Manage Workspaces" and "Source Control Explorer", which I literally can't even find in my Visual Studio window.
Help please!
Alexander
First: Open your sln file and see where it says your csproj file is located. It should read something like: "WindowsFormsApp1\WindowsFormsApp1.csproj"
Note: Everything in the parenthesis will be from the same directory as the sln file, so the true directory in this instance will be "sln_file_path\WindowsFormsApp1\WindowsFormsApp1.csproj"
As long as this is correct, then navigate to the csproj file and open it with notepad, but if this path is wrong, correct it before proceeding.
Second: Search the csproj file for the missing file, which in your case is Form1.cs
You should find something like: Compile Include="....\Erroneous_Directory\Form1.cs"
Typically all cs files will be in the same directory as the csproj file, so the line should simply read as follows: Compile Include="Form1.cs"
If the file is legitimately located in a separate directory, then provide the path, but if it is in the same directory, delete the path. Sometimes, when linking to a file in a different project, you will see this: (Link)Form1.cs(/Link), but if the file is in the same project and directory, this link line will need to be deleted.
Note: Chances are that this procedure will need to be repeated for two other files: Form1.Designer.cs and Form1.resx as well, so make sure the "Compile Include" lines for these two files are also correct before opening the solution

Atom tree view does not show all the files in the folder

When opening a local project in ATOM IDE, I find that there are missing files. I first thought it was due .gitignore. But deleting it didn't solve the issue. Is there anything I am missing?
Below are my local folder files and the project open in Atom IDE:
Local folder files:
Project opened in ATOM IDE: missing files are wallpaper.jpeg, Deewar.jpg and Style.css
I came across the same issue. I changed the settings of the tree-view package (go to "Atom" tab, "Preferences" - "Packages" and search for tree-view): turned off "Hide VCS ignored files".

Prevent Visual Studio from deleting output files from referenced projects

I've got a Class Library project and a Console project. Inside the Class Library project there's a folder called "ConfigSettings" containing a configuration file that's referenced by the App.config file. Its "Copy to Output Directory" is set to "Copy Always".
The Console project references this Class Library project. When the console project is built, the ConfigSettings folder is created in the correct place along with the external config file. However, every time I Debug the Console project, the external config file is deleted. The ConfigSettings folder however is left untouched. If I mark the file as read-only it is not deleted, and warning appears in Visual Studio's Error List:
Warning Unable to delete file "C:\<path>\<app>\bin\Debug\ConfigSettings\settings.config". Access to the path 'C:\<path>\<app>\bin\Debug\ConfigSettings\settings.config' is denied.
Is there a setting I can change that will prevent VS from removing this file when I Debug the project? I am using Visual Studio 2015.
This might not be the best solution possible, but I found here, if you do a "Clean solution" just before executing your solution, the files will remain.

How can I include a txt file in an Xcode project?

I added a file "IntegerArray.txt" as follows, first I went to File -> Add file to "project name", I selected my file and it was copied into the root folder of my project, the same one that contains the .xcodeproj file. Then I clicked on my project's .xcodeproj file in Xcode, after which I went to Build Phases -> Copy Files -> "IntegerArray.txt", however when I build my project, the following code doesn't work
let bundle = NSBundle.mainBundle()
let path = bundle.pathForResource("IntegerArray", ofType: "txt")
println(path)
I expect to see the path to the file as output, but instead I see nil.
So I want to copy a file to my project in such a way that the above code works. How can I do this?
If I have a normal Cocoa Application, then when I add files they are automatically copied to the built program's bundle. However, with Command Line Tool's this doesn't seem to be the case, I'm starting to suspect a bug with Xcode.
If you don't have a Resources directory in your project, select your project:
Then from the File Menu select Add Files:
In the window that opens click on the "New Folder" button in the lower left hand corner of the window.
A small pop-up window will open; type Resources in that window for the folder name then click the "Create" button. You should now have a Resources folder in your project.
Then the way I do it is to use Finder to copy the file into the Resources Directory of my project.
After the file is in the Resources Directory (in Finder), back in Xcode select the Resources directory in your project:
and use the File-> Add Files menu selection again. You should see your file highlighted (affineOutput.txt in this case):
Double Click on it and it will become part of the bundle.
As Milliways says, then check the Build Phases in your project to be sure the file is in the Copy Bundle Resources. If it's somewhere else, just drag it into the Copy Bundle Resources.
If you include in the Resources Folder it should be included.
You may need to select the Project and Target.
In Build Phases check is there is entry under Copy Bundle Resources

Suggestions Please: File in Xcode Project but Cannot be Found

I have a file that shows up in "Open Quickly" on Xcode and shows up no place in the project if I do "Reveal in Project Navigator". It does compile correctly into several targets.
If I add the file to the project, the project cannot compile because the file is already included. How can I find this inclusion?
Note: The file does NOT show up in "Open Quickly" on App Code, but I can navigate to it via Command-B.
In AppCode you can use Navigate | File... (Cmd+Shift+O) and check Include non-project files - the file should be shown in the list.
Also, you can open the file in editor, switch navigator to Files mode and use Navigate | Select in... (Alt+F1) | Project View - the file will be shown in its actual location.
After that use Manager Targets action from context menu to see what targets this file belong to.
This bizarre situation happens because you are importing a .m file in one of your #import statements. If you fix this, the project will no longer compile, because the file will not be automatically included.

Resources