Itiviti / gradle-msbuild-plugin

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

Plugin ID not found. #59

Closed gamma closed 8 years ago

gamma commented 8 years ago

I've set up the gradle script with the msbuild plugin as stated in the Readme.md. It does not work and throws "Plugin with id 'msbuild' not found".

It does not matter whether I use the 2.9 or 2.10 version and if I try it on Windows or OSX - it should at least be able to set up the plugin and start the process.

Any ideas on this?

gamma commented 8 years ago

I'm using the old plugin syntax since we have to put such stuff into tools files. I had to use:

apply plugin: com.ullink.MsbuildPlugin

to make it work.

gluck commented 8 years ago

You'll get this error if the plugin jar isn't in your dependencies. Did you include the following block before applying the plugin ?

buildscript {
    repositories {
      mavenCentral()
    }

    dependencies {
        classpath "com.ullink.gradle:gradle-msbuild-plugin:2.9"
    }
}

Note that alternatively you can use the newer plugins gradle syntax, cf https://plugins.gradle.org/plugin/com.ullink.msbuild

gamma commented 8 years ago

We're using artifactory as internal cache repository, so the build script syntax is a bit different, but it downloads the specified version. I think it is in the classpath then.

I tried the syntax from the plugins.gradle.org page, but it also fails. I have to use the syntax as I posted above. But thanks so far :)