Allow option to build solution and csproj files in a subfolder V2

Hello Unity Team,

Please add the feature to choose where to put the csproj Files.
Like in the Thread from 3 years ago, there is still the problem, that EVERY csproj File is generated in the root folder, which leads to cluttering and unnecessary subfolders in Visual Studio for every Project added to the solution. See the post of brks9622 for example, who summarizes the problem and giving a nice clean solution. (Just place the csproj file in the same folder as the asmdef files…)

Here is the original post: Allow option to build solution and csproj files in a subfolder

Got around 250 csproj files, which came from plugins, Unity itself and my program which could be easily managed, if they would be placed in the subfolders, instead of the root folder.

If there is a good reason, why you can’t add this feature, please let me know.

You should completely ignore .csproj and .sln files.

If you structure your files like this:

MyGame/MyGame/ <-- all the csprojs will end up here, out of sight
MyGame/MyGame/Assets
MyGame/MyGame/ProjectSettings
MyGame/MyGame/Packages```

Then set up your .gitignore correctly and never again think about it.

**PROPERLY CONFIGURING AND USING ENTERPRISE SOURCE CONTROL**

I'm sorry you've had this issue. Please consider using proper industrial-grade enterprise-qualified source control in order to guard and protect your hard-earned work.

Personally I use git (completely outside of Unity) because it is free and there are tons of tutorials out there to help you set it up as well as free places to host your repo (BitBucket, Github, Gitlab, etc.).

You can also push git repositories to other drives: thumb drives, USB drives, network drives, etc., effectively putting a complete copy of the repository there.

As far as configuring Unity to play nice with git, keep this in mind:

https://discussions.unity.com/t/736093/3

I usually make a separate repository for each game, but I have some repositories with a bunch of smaller test games.

Here is how I use git in one of my games, Jetpack Kurt:

https://discussions.unity.com/t/807568/3

Using fine-grained source control as you work to refine your engineering:

https://discussions.unity.com/t/826718/2

Share/Sharing source code between projects:

https://discussions.unity.com/t/719810/2

Setting up an appropriate .gitignore file for Unity3D:

https://discussions.unity.com/t/834885/5

Generally the ONLY folders you should ever source control are:

Assets/
ProjectSettings/
Packages/

NEVER source control Library/ or Temp/ or Logs/
NEVER source control anything from Visual Studio (.vs, .csproj, none of that noise)

Setting git up with Unity (includes above .gitignore concepts):

https://thoughtbot.com/blog/how-to-git-with-unity

It is only simple economics that you must expend as much effort into backing it up as you feel the work is worth in the first place. Digital storage is so unbelievably cheap today that you can buy gigabytes of flash drive storage for about the price of a cup of coffee. It's simply ridiculous not to back up.

If you plan on joining the software industry, you will be required and expected to know how to use source control.

Source control does require learning, but there are TONS of tutorials and courses and online reference.

**You should strive to use source control as well as you use your file/folder system.**

"Use source control or you will be really sad sooner or later." - StarManta on the Unity3D forum boards

This would be a great feature! +1

This is a blatant copy and paste that appears to have nothing to do with the OP feature request. Please try not to clutter up the forum without reading what the OP said :frowning:

1 Like

Ironically you quoted the one part of my post that ISN’T a boilerplate.

I use Unity professionally. I experienced the same problem OP did. I told him how I dealt with it.

Rather than hand-craft the same “how do I use source control?” answer, yes, it is boilerplate.

Do you have anything useful to add to the original poster’s questions today? We’re all awaiting you to post it.

It seems you’re trying to help educate a user on a question regarding the Unity game engine.

In the expansive world of game development, Unity stands as a powerful and widely-used engine, fostering a vibrant community of developers eager to share their knowledge, seek assistance, and collaborate. Game development forums dedicated to Unity serve as virtual hubs for this community, where novices and seasoned developers alike converge to exchange ideas, pose questions, and troubleshoot challenges. Effectively responding to questions on Unity forums requires a delicate balance of technical expertise, clarity, and a supportive demeanor. This essay will delve into the art of crafting informed and helpful responses on Unity game development forums, exploring key considerations, communication strategies, and the importance of fostering a collaborative environment.

Understanding the Question

Before embarking on a response, it is crucial to thoroughly comprehend the question posed by the forum user. Unity game development encompasses a broad spectrum of topics, ranging from scripting and coding to graphics, physics, and asset management. A misinterpretation of the question may lead to a misguided response, hindering the user’s progress and potentially causing frustration.

Careful examination of the question involves breaking it down into its constituent parts, identifying any specific error messages, and understanding the context of the issue. It may be beneficial to request additional information, such as the Unity version being used, relevant code snippets, or a detailed description of the problem’s manifestation within the game. This initial investigative phase lays the foundation for a targeted and accurate response.

Crafting a Clear and Concise Response

Once the question is thoroughly understood, the next step is to craft a response that is both clear and concise. Unity forums often host a diverse audience with varying levels of expertise, ranging from beginners to seasoned professionals. Tailoring the response to the user’s skill level is imperative to ensure that the information is accessible and comprehensible.

Begin by addressing the user with a polite greeting and express a willingness to assist. Avoid jargon and technical terms that may be overwhelming for beginners, opting instead for plain language that conveys the necessary information. Break down complex concepts into digestible chunks, providing step-by-step guidance when applicable.

For more advanced users, it is appropriate to delve into technical details and utilize industry-specific terminology. However, striking a balance between technical depth and accessibility remains crucial to cater to a broad audience.

Utilizing Code Snippets and Examples

In the realm of Unity game development, code often serves as the linchpin of problem-solving. When responding to a question, incorporating relevant code snippets and examples can significantly enhance the clarity and effectiveness of the response. Code snippets should be well-commented, explaining each section’s purpose and functionality.

Additionally, if the issue is related to a specific Unity feature or function, providing a concise example within the Unity Editor can be immensely beneficial. This visual aid not only reinforces the explanation but also offers a practical demonstration, aiding the user in implementing the solution within their own project.

Emphasizing Best Practices and Documentation

Encouraging best practices is integral to fostering a culture of effective collaboration within the Unity game development community. When responding to questions, it is beneficial to not only provide a solution to the immediate problem but also to emphasize industry best practices and point users toward relevant documentation.

Unity’s official documentation is a vast and invaluable resource that covers a myriad of topics, from scripting and physics to graphics and networking. Directing users to the appropriate documentation not only empowers them to understand the underlying principles but also cultivates a habit of independent learning, a vital skill in the ever-evolving landscape of game development.

Encouraging Collaboration and Community Spirit

Unity game development forums thrive on collaboration and a sense of community. Responding to questions is not merely about providing answers but also about fostering an environment where individuals feel supported and encouraged in their journey. Acknowledge the user’s efforts, regardless of their skill level, and commend them for seeking assistance.

In cases where the solution is not immediately apparent, inviting collaboration from other forum members can be a constructive approach. Encourage users to share their insights, experiences, and alternative solutions. This not only enriches the discussion but also exposes the original poster to diverse perspectives and approaches, contributing to their overall growth as a developer.

Maintaining Professionalism and Positivity

Effective communication on Unity game development forums extends beyond technical expertise. Maintaining a professional and positive tone is essential in creating a welcoming environment for all participants. Avoiding derogatory language, condescension, or dismissive remarks is crucial, regardless of the complexity of the question or the user’s experience level.

In instances where the user has made a mistake or overlooked a fundamental concept, approach the situation with tact and patience. Point out the error without belittling the user, and use it as an opportunity to reinforce key concepts. A positive and supportive response not only resolves the immediate issue but also contributes to the overall positive atmosphere of the forum.

Conclusion

Effectively responding to questions on Unity game development forums is a multifaceted endeavor that requires a combination of technical expertise, clear communication, and a supportive attitude. By understanding the question, crafting clear and concise responses, utilizing code snippets and examples, emphasizing best practices and documentation, encouraging collaboration, and maintaining professionalism, developers can contribute to a thriving and inclusive community.

Unity game development forums are more than virtual spaces for troubleshooting; they are dynamic ecosystems where knowledge is shared, skills are honed, and connections are forged. Nurturing a culture of collaboration and positivity within these forums ensures that developers, whether novice or experienced, continue to find the support and guidance they need to push the boundaries of their creativity and technical prowess.

Right. Then every .csproj would have a .meta file and appear in the Project hierarchy as asset.

Unless of course special condition code is programmed in the editor which filters out the .csproj. Special case handling is generally a bad idea.

I rarely, if ever, look at the root of the project. And most cases where I do so is because I have a need to delete all .csproj and .sln files in one go. Keep in mind: that is one of the near-silver-bullet troubleshooting steps for Visual Studio quirks, as is deleting the Library folder for some project quirks. If these .csproj were spread out across the Assets tree … “well then, good night” as we say in german. :smile:

2 Likes

Like in the last thread, it looks like you don’t get the point.
To make it as clear as possible:

I would like to use the sln files and the .csproj files and compile as much as possible in Visual Studio. I don’t want to hide them. I want to use them (or at least the sln), so I would like them to be ordered, not hidden or removed.

Thank you for the long tutorial, but I am using git and know how to set it up…
Nevertheless, this question is not about version control, because as you mentioned, you just have to setup the .gitignore(s) correctly to not upload the sln/csproj files.

You are right I haven’t thought about that. The generation of meta files and Unity handling the csproj files as Assets would be a problem. Adding a subfolder like “root → vs”, would just remove the clutter in the root folder, but wouldn’t change the hierarchy problems in VS.
The “easy to delete” argument is also valid, even though you could find a fast dirty workaround.
Just search for every csproj file and delete all, a simple batch file would be enough a button in Unity would be nice :wink:

Found a post in the Beta/Experimental Features Thread regarding the same issue discussed here:
https://discussions.unity.com/t/902938