Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution file generation for multiple projects inside a Cake-Build Script #128

Closed
janniksam opened this issue Apr 19, 2020 · 4 comments
Closed

Comments

@janniksam
Copy link

Our current build process is initially generating a solution file set of projects (entry points). That is, because our developers are developing in smaller solutions to keep the load times etc. decent. But during build we want to merge all our projects together and build one big solution.

That's why we create a CreateSln.ps1-PowerShell-Script for this task. Our build script begins by calling this script. The script will get a configuration file, where we listed all our "entry points" and will resolve and add all project references. When that is done, all *Test-projects and dependencies will also be added.

Our main problem currently is that the solution file is not a 100% conform to the standards and whenever we open it in Visual Studio, a lot of stuff is automatically changed by Visual Studio again, especially some project related guids.


Now that I have already talked a lot, let's get to my point: Right now we are looking for an alternative and I was wondering if this tool might fit our needs. Taking a quick glance into the documentation, unfortunately I cannot see any possibility to generate a solution file for not one but many project, is there a way?

Further more I would like to know: We would like to initiate the "solution generation" somewhere in our build script. Currently our build process is based on "Cake Build". We can reference the nuget package in our cake script, but I am not sure yet, how we would get the tool to run.

@janniksam janniksam changed the title Solution file generation for multiple projects Solution file generation for multiple projects inside a Cake-Build Script Apr 19, 2020
@janniksam
Copy link
Author

janniksam commented Apr 19, 2020

By the way:

It would be cool, if the core part of this tool (the solution/project models and the SlnFile.Save() logic) be extracted to a separate package, because it would be nice to be able to use it without the other parts of this tool. I could just feed in all my projects and use this models to help me build a correct solution file. (a nuget package called "Microsoft.VisualStudio.SlnGen.Core" or something similar)

@jeffkl
Copy link
Collaborator

jeffkl commented Apr 20, 2020

You should be able to specify the paths to multiple entry projects for solution generation:

slngen src\ConsoleApp\ConsoleApp.csproj test\UnitTest1\UnitTest1.csproj

@jeffkl
Copy link
Collaborator

jeffkl commented May 19, 2020

@janniksam have you had a chance to try this out? Does it do what you want?

@janniksam
Copy link
Author

I did rewrite the sln generation logic in one of my powershell scripts, so this is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants