✅ My solution contains absolute paths to projects inside the solution folder
I have a solution where all the projects are inside the solution's folder. But VS Community 2022 insists on writing their location in the solution file and other project files as absolute paths. Now when I check everything into Git, VS doesn't upload the projects that it was using absolute paths for. What can I do?
2 Replies
Well, I tried to change the paths I was seeing manually to relative paths. And it was looking like VS was accepting the new paths. But then I checked the error list. Seems it can't find files when compiling. If the paths were absolute, it now fails to find the compiler output files while compiling for dependencies. I verified the paths exist. But it's very confused. It's the DLL, pdb, and XML (documentation) that it can't find for the dependency. So if project A.csproj depends on B.csproj which is a DLL, it's not finding B.dll, B.pdb, and B.xml while compiling A.
I don't know if it matters, but the directory where my solution is at can be accessed from several different paths. Those include b:\Contents\Best Chat, e:\Contents\Projects\Best Chat, and c:\users\willp\Documents\Projects\Best Chat.
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.