DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

tsubakimoto_s
tsubakimoto_s

Posted on

Create a large number of C# applications at once

I'm waiting for Visual Studio 2022!

One of the most important features of Visual Studio 2022 is that it will be 64-bit.

This means that Visual Studio will not run out of memory even when developing large applications.

The above blog also shows the launch of the solution, which includes 1600 projects.

I want to experience the same thing when Visual Studio 2022 is released so that I can create huge solutions at once.

NET Core provides a command line interface (CLI), so you can create solution files and project files all with commands.

Let's just keep on creating them with for statements!

SOLUTION_NAME=HugeDotnetSolution
dotnet new sln -o $SOLUTION_NAME
cd $SOLUTION_NAME

for i in `seq 1000`
do
  APP_NAME=ConsoleApp$i
  dotnet new console -n $APP_NAME --no-restore
  dotnet sln $SOLUTION_NAME.sln add $APP_NAME
done
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

🌚 Life is too short to browse without dark mode