Itiviti / gradle-msbuild-plugin

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

How manage third party dependencies with msbuild plugin #11

Closed pubudut closed 10 years ago

pubudut commented 10 years ago

I would like to know how to manage third party dependencies such as log4net with plugin.

gluck commented 10 years ago

This plugin only allows for msbuild execution from gradle, it doesn't plug dependencies.

Most common dependency mgmt for msbuild projects is NuGet, a nice addition to this plugin could be to execute nuget package restore before the build, and maybe generate the packages.config file from gradle-like dependencies, but that's not supported as of now (PR would be welcomed though).

pubudut commented 10 years ago

Another thing I would like to clarify about the plugin is,msbuild and .Net Framework components should be available within a system to msbuild plugin work properly ?

gluck commented 10 years ago

yes

svermeulen commented 5 years ago

For newer versions of msbuild you can specify 'restore' as a target. For example:

task restoreFoo(type: com.ullink.Msbuild) {
  solutionFile = "src/test2.sln"
  targets = ['restore']
}

task compileFoo(type: com.ullink.Msbuild) {
  dependsOn restoreFoo
  solutionFile = "src/test2.sln"
  targets = ['Build']
}