Itiviti / gradle-msbuild-plugin

Gradle plugin for msbuild execution, supports C# project files for now
Apache License 2.0
101 stars 58 forks source link

resolveProject() makes the assumption there is a main project #96

Closed Foggzie closed 5 years ago

Foggzie commented 5 years ago

When using the getProjects() method in Msbuild, there's a warning that a certain project doesn't exist "Project ${projectName} not found in solution". The constructor of Msbuild seems to be making the assumption that there is both a project and solution file with a name that matches whatever project.name resolves to but this isn't a standard convention with solution; the warning seems to be out of place.

gluck commented 5 years ago

This plugin assumes you're interested in building a particular project out of your solution (usually the main project, though it could be the unit test project as well), if it has a different name than your (gradle) project name, you can specify it with msbuild { projectName = 'foobar'}. If you're only interested in building the solution, with no interest over a particular project, you can disable it with msbuild { projectName = ''}.

LMK if that clarifies the behavior.

Foggzie commented 5 years ago

Alright, that seems like an easy workaround! We're building collections of miscellaneous assemblies and don't have a main project. Thank you for the response!