0
I added an existing file to my project. With this, it fixes the Full Path of my file, and I can no longer change.
What I need to do is edit this value by using variables such as $(SolutionDir)
, so that the Compile project independent of the directory in which it was downloaded.
Example of the case:
I did include. The Full Path is as follows: C:\Users\Victor\Desktop\Contribs\roundto\src\roundto.c
When in fact I would need him to be available at:
$(SolutionDir)\..\..\src\roundto.c
Here is the step by step I use to add the files:
Have you tried removing the file and adding what is within the project structure?
– Jéf Bueno
@jbueno, if I do this, it will take the current directory of the file on my machine. If someone downloads my project, they’ll have to adjust according to his machine.
– Victor Tadashi
He won’t, young man. If you do the Include in Solution it will include normal.
– Jéf Bueno
Honestly, it doesn’t even make much sense. Do you have a real case that this occurs or are you guessing? The property
FullPath
is the concatenation project site with the file relative path– Jéf Bueno
@jbueno, I edited the question by quoting an example
– Victor Tadashi
Ah, it’s a C project. There may be some difference. In the other files the
FullPath
is this second way?– Jéf Bueno
@jbueno, it always gets the first one. The problem with this is that as the guys pull, they will have to delete and include the files again.
– Victor Tadashi
How bizarre this behavior. You can make a GIF showing how to add the files?
– Jéf Bueno
@jbueno, edited again, with process images
– Victor Tadashi
Instead of doing this, do the following: move the file (by the filesystem itself) to the desired folder within the solution, then click the "show all files" icon (it is above the explorer Solution) then go to the folder and you will see the file faded, click on it with the direct button and click on "Include in project".
– Jéf Bueno
@jbueno, Let’s go continue this discussion in chat.
– Victor Tadashi