Location of csproj files

We use a lot of packages, plugins and asmdefs. I also really want them to be in my visual studio solution.

As a result, the root folder of my project is absolutely full of generated .csproj files. If changes are being made here, would it be possible to move these to a subfolder? It makes navigating much easier.

Thanks in advance!

2 Likes

+1. It may be “Library/ScriptProjects”.

Hi, problem with placing the csproj’s at a not rooted location to the source files, like Library/ScriptProjects, is that then all source files then needs to be added as link, and tooling like extract class to separate file will not work properly.
We are working on a MSBuild workflow where csproj’s will be more as a normal C# project layout, so similar placement where the asmdef’s today. That would remove the file clutter/mess from the project folder

Thanks for the response.

So will my root directory still look like this? Just slightly lessfrom our own asmdefs8654640--1164951--upload_2022-12-12_16-43-3.png

@TJHeuvel-net you can limit that by changing your preferences to only generate csproj’s to your own, as it seem you have set it to do for all packages. Though is you want to move around and look at the package code, you need to have it enabled.

Thanks, but i am indeed interested in looking around these packages very often.

1 Like

Can you please detail that a bit?

Let’s say I have a Unity project folder containing a generated csproj file like:
/MyUnityProject/MyCode.csproj
and that csproj file contains rows like

If that csproj file instead was located in
/MyUnityProject/Assets/Scripts/SomeFolder/MyCode.csproj
the lines it contains would be more like

How does “link” come into play here?

@krs-two Yes if the csproj was at that location it would work just fine.
It was more if the csproj’s was located ie. under /MyUnityProject/Library/… then all file cs includes are links