Code Monkey home page Code Monkey logo

gradle-msbuild-plugin's Introduction

📢 DEPRECATED

gradle-dotnet-plugin is now available for building projects via dotnet command line tool chains. The plugin supports running nunit, code coverage, nuget restore and push.

Gradle MsBuild Plugin Build status Build Status

This plugin allows to compile an MsBuild project. It also supports project file parsing, and some basic up-to-date checks to skip the build. I doubt it'll work on anything else than .csproj files right now, but adding support for more will be easy.

Plugin applies the base plugin automatically, and hooks msbuild output folders into the clean task process. Below tasks are provided by the plugin:

Prerequisites

  • .Net Framework 4.6

msbuild

Prior to execution, this task will parse the provided project file and gather all its inputs (which are added to the task inputs):

  • included files (Compile, EmbeddedResource, None, Content)
  • ProjectReference (recursively gathers its inputs) // TODO: should use outputs instead ?
  • References with a HintPath

OutputPath (e.g. bin/Debug) & Intermediary (e.g. obj/Debug) are set as output directories for the task.

To apply the plugin:

// Starting from gradle 2.1
plugins {
  id 'com.ullink.msbuild' version '3.15'
}

or

buildscript {
    repositories {
        url "https://plugins.gradle.org/m2/"
    }

    dependencies {
        classpath 'com.ullink.gradle:gradle-msbuild-plugin:3.15'
    }
}
apply plugin:'com.ullink.msbuild'

and configure by:

msbuild {
  // mandatory (one of those)
  solutionFile = 'my-solution.sln'
  projectFile = file('src/my-project.csproj')

  // MsBuild project name (/p:Project=...)
  projectName = project.name

  // Verbosity (/v:detailed, by default uses gradle logging level)
  verbosity = 'detailed'

  // targets to execute (/t:Clean;Rebuild, no default)
  targets = ['Clean', 'Rebuild']


  // MsBuild resolution
  // it support to search the msbuild tools from vswhere (by default it searches the latest)
  version = '15.0'
  // or define the exact msbuild dir explicity
  msbuildDir = 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\bin'


  // Below values can override settings from the project file

  // overrides project OutputPath
  destinationDir = 'build/msbuild/bin'

  // overrides project IntermediaryOutputPath
  intermediateDir = 'build/msbuild/obj'

  // Generates XML documentation file (from javadoc through custom DocLet)
  generateDoc = false

  // Other msbuild options can be set:
  // loggerAssembly, generateDoc, debugType, optimize, debugSymbols, configuration, platform, defineConstants ...

  // you can also provide properties by name (/p:SomeProperty=Value)
  parameters.SomeProperty = 'Value'

  // Or, if you use built-in msbuild parameters that aren't directly available here,
  // you can take advantage of the ExtensionAware interface
  ext["flp1"] = "LogFile=" + file("${project.name}.errors.log").path + ";ErrorsOnly;Verbosity=diag"
}

assemblyInfoPatcher {
  // mandatory if you want to patch your AssemblyInfo.cs/fs/vb

  // replaces the AssemblyVersion value in your AssemblyInfo file.
  // when explicitly set to blank, AssemblyVersion will not be updated and will keep the existing value in your AssemblyInfo file
  // TODO: not yet normalized, beware than .Net version must be X.Y.Z.B format, with Z/B optionals
  version = project.version + '.0.0'

  // replaces the AssemblyFileVersion value in your AssemblyInfo file.
  // defaults to above version, fewer restrictions on the format
  // when explicitly set to blank, AssemblyFileVersion will not be updated and will keep the existing value in your AssemblyInfo file
  fileVersion = version + '-Beta'

  // replaces the AssemblyInformationalVersion value in your AssemblyInfo file.
  // defaults to above version, fewer restrictions on the format
  // when explicitly set to blank, AssemblyInformationalVersion will not be updated and will keep the existing value in your AssemblyInfo file
  informationalVersion = version + '-Beta'

  // replaces the AssemblyDescription in the your AssemblyInfo file.
  // when set to blank (default), AssemblyDescription will not be updated and will keep the existing value in your AssemblyInfo file
  description = 'My Project Description'

  // default to msbuild main project (of solution)
  projects = [ 'MyProject1', 'MyProject2' ]
}

Custom tasks

You can create custom msbuild and assemblyInfoPatcher tasks like so:

import com.ullink.Msbuild
import com.ullink.AssemblyInfoVersionPatcher

task compileFoo(type: Msbuild) {
    projectFile = "Foo.vcxproj"
    // Other properties
}

task versionPatchFoo(type: AssemblyInfoVersionPatcher) {
    projects = ['Foo']
    // Other properties
}

See also

Gradle NuGet plugin - Allows to restore NuGet packages prior to building the projects with this plugin, and to pack&push nuget packages.

Gradle NUnit plugin - Allows to execute NUnit tests from CI (used with this plugin to build the projects prior to UT execution)

Gradle OpenCover plugin - Allows to execute the UTs through OpenCover for coverage reports.

You can see these 4 plugins in use on ILRepack project (build.gradle).

License

All these plugins are licensed under the Apache License, Version 2.0 with no warranty (expressed or implied) for any purpose.

gradle-msbuild-plugin's People

Contributors

adescamps-ullink avatar adrianrus avatar akbertram avatar anooprdesai avatar bk-mz avatar darsen avatar eatdrinksleepcode avatar gc-itiviti avatar george-c29 avatar gluck avatar imanushin avatar jonathanmorley avatar kkalisz avatar lamarlugli avatar lugoues avatar marcozwyssig avatar ngyukman avatar pedrowitzel avatar peter-ng-ullink avatar rhautefeuille avatar romainhautefeuille avatar tekuser avatar thunderforge avatar timotei avatar ul-remy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gradle-msbuild-plugin's Issues

Please release a newer version to central

atm 2.11 from october 2015 is the latest release on central
I'd like to use the new informationalVersion feature which was added in november
please consider releasing a new version to central

Using the latest MSBuild (12.0)

When the Project tag has ToolsVersion="12.0", I'm getting the "Could not determine the dependencies of task" error, with this down in the stack trace:

Caused by: java.io.FileNotFoundException: C:\Program Files (x86)\MSBuild\12.0\Bin\amd64 (Access is denied)

Switching ToolsVersion to 4.0 fixes the problem, but we'll eventually want to use MSBuild version 12.0. Has there been any investigation of this issue yet? It seems like it might be as easy as adding one number to the list of possible tools versions, but things are rarely as easy as they seem.

Thanks.

ClassNotFoundException

Hello!

I'm trying to work the first time with the msbuild plugin and I can't even get a simple buildscript running.

My build.gradle:

apply plugin:'msbuild'

buildscript {
repositories {
maven {
url "http://artifacts/repos"
}
}
dependencies {
classpath 'com.ullink.gradle:gradle-msbuild-plugin:1.+'
}
}

msbuild {

solutionFile = 'ConsoleApplication1.sln'
configuration = 'Debug'
projectName = 'ConsoleApplication1'

}

It is downloading all dependencies, but I get the following error:
A problem occured evaluating root project 'ConsoleApplication1'.

Could not create task of type 'Msbuild'.

And the stacktrace at the end:
Caused by: java.lang.NoClassDefFoundError: com/sun/jna/PointerType
Caused by: java.lang.ClassNotFoundException: com.sun.jna.PointerType

Gradle however downloaded the net.java.dev.jna:jna:3.5.0 before the build, so I don't know how to get it working.

Thanks!

Use msbuild instead of xbuild on Linux/MacOS

Hi!

The current Mono system complains about the usage of xbuild due to deprecation. It also don't support all parameters that are supported by msbuild. Msbuild is the new recommended build tool for Mono.

Pls. consider defaulting to msbuild instead of xbuild on Linux and MacOS.

BTW, I need this feature so I'm willing to help if you give me some starting point.

Exception when trying to build with Jenkins on debian.

Hello, I am trying to use this plugin to automate builds with Jenkins on a debian server. I can build the project fine from the command line using the xbuild command, however when I try to use this gradle plugin to automate things it throws an exception. Does anyone have any idea why I am getting this error, and what steps I could take to fix it?

> Configure project :
Error during project file parsing: System.TypeInitializationException: The type initializer for 'Microsoft.Build.Collections.MSBuildNameIgnoreCaseComparer' threw an exception. ---> System.EntryPointNotFoundException: GetSystemInfo
  at (wrapper managed-to-native) Microsoft.Build.Shared.NativeMethodsShared:GetSystemInfo (Microsoft.Build.Shared.NativeMethodsShared/SYSTEM_INFO&)
  at Microsoft.Build.Shared.NativeMethodsShared+SystemInformationData..ctor () [0x00023] in <f5a454bed8554c01935324e6d7db5f08>:0 
  at Microsoft.Build.Shared.NativeMethodsShared.get_SystemInformation () [0x0001e] in <f5a454bed8554c01935324e6d7db5f08>:0 
  at Microsoft.Build.Shared.NativeMethodsShared.get_ProcessorArchitecture () [0x00000] in <f5a454bed8554c01935324e6d7db5f08>:0 
  at Microsoft.Build.Collections.MSBuildNameIgnoreCaseComparer..cctor () [0x00010] in <f5a454bed8554c01935324e6d7db5f08>:0 
   --- End of inner exception stack trace ---
  at Microsoft.Build.Collections.PropertyDictionary`1[T]..ctor (System.Int32 capacity) [0x00006] in <f5a454bed8554c01935324e6d7db5f08>:0 
  at Microsoft.Build.Evaluation.ProjectCollection..ctor (System.Collections.Generic.IDictionary`2[TKey,TValue] globalProperties, System.Collections.Generic.IEnumerable`1[T] 
Debian: 9
Mono: 4.6.2
Gradle: 4.9
gradle-msbuild-plugin: 2.21

C++ Builds

Any plans to support C++ builds on windows?

Warning message: Project XXX found in solution, disabling input/output optimizations

Hello,

I am using this plugin to build a Visual Studio C++ solution. This solution contains around 15 projects (vcxproj). I want to compile the whole solution so I set the "projectFile" and ignore the "projectName".
When I run gradle (no matter of the task to execute), I receive the warning message:

Project XXX found in solution, disabling input/output optimizations

First, there is a mistake in the message: it should be "Project XXX not found ..." because the code in the resolveProject method of Msbuild.groovy:

projectParsed = allProjects[getProjectName()]
if (projectParsed == null) {
parseProject = false
logger.warn "Project ${getProjectName()} found in solution, disabling input/output optimizations"
}

As you can see, the warning is displayed only if the projectName project is not found.

Secondly, msbuild supports the "incremental" build so there is no need of gradle optimisation. So I just would like to disable this warning in the case of a whole solution build. I think that if projectName is not defined (null or empty string) then there is no need to display the warning.

Thanks.

Attribute "label" in element "import" is unrecognized.

While parsing my solution:

Parsing file whatever.sln ...
Error during project file parsing: Microsoft.Build.BuildEngine.InvalidProjectFileException: The attribute "Label" in element <Import> is unrecognized.  c:\foo\bar.csproj

The csproj file contains:

<Import Project="$(SlowCheetahTargets)" Condition="Exists('$(SlowCheetahTargets)')" Label="SlowCheetah" />

With the offending attribute.

IMHO, the parser should ignore any non-known attribute.

XBuild resolver problem with Mono on OSX

I think I've stumbled upon a resolution error with the XBuildResolver code. I have Mono installed on OSX via Homebrew:

$ brew info mono
mono: stable 4.2.0.179 (bottled)
Cross platform, open source .NET development framework
http://www.mono-project.com/
/usr/local/Cellar/mono/4.2.0.179 (1010 files, 184M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/mono.rb
==> Caveats
To use the assemblies from other formulae you need to set:
  export MONO_GAC_PREFIX="/usr/local"

If I use which I can see:

$ which xbuild
/usr/local/bin/xbuild

xbuild is a "POSIX shell script text executable". The file itself looks like:

#!/bin/sh
exec /usr/local/Cellar/mono/4.2.0.179/bin/mono $MONO_OPTIONS /usr/local/Cellar/mono/4.2.0.179/lib/mono/xbuild/12.0/bin/xbuild.exe "$@"

At the moment with my simple test project I get the following output when run with --info level:

 $ gradle msbuild --info
Starting Build
Settings evaluated using settings file '/master/settings.gradle'.
Projects loaded. Root project using build file '/Users/novabyte/Projects/TestMSBuild/build.gradle'.
Included projects: [root project 'TestMSBuild']
Evaluating root project 'TestMSBuild' using build file '/Users/novabyte/Projects/TestMSBuild/build.gradle'.
All projects evaluated.
Selected primary task 'msbuild' from project :
Tasks to be executed: [task ':msbuild']
:msbuild (Thread[main,5,main]) started.
:msbuild
Executing task ':msbuild' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
Resolved xbuild to: /usr/local/lib/mono/xbuild/14.0/bin/xbuild.exe
Starting process 'command '/usr/local/lib/mono/xbuild/14.0/bin/xbuild.exe''. Working directory: /Users/novabyte/Projects/TestMSBuild Command: /usr/local/lib/mono/xbuild/14.0/bin/xbuild.exe /nologo /Users/novabyte/Projects/TestMSBuild/TestMSBuild.csproj /t:Build /v:normal /p:Project=TestMSBuild /p:IntermediateOutputPath=/Users/novabyte/Projects/TestMSBuild/build/msbuild/obj\ /p:OutputPath=/Users/novabyte/Projects/TestMSBuild/build/msbuild/bin\
Successfully started process 'command '/usr/local/lib/mono/xbuild/14.0/bin/xbuild.exe''
/usr/local/lib/mono/xbuild/14.0/bin/xbuild.exe: /usr/local/lib/mono/xbuild/14.0/bin/xbuild.exe: cannot execute binary file
:msbuild FAILED
:msbuild (Thread[main,5,main]) completed. Took 0.278 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':msbuild'.
> Process 'command '/usr/local/lib/mono/xbuild/14.0/bin/xbuild.exe'' finished with non-zero exit value 126

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 3.7 secs

I believe the problem is that the plugin is trying to invoke xbuild.exe directly on OSX which does not work without being called by the Mono runtime. I think the plugin should use the xbuild POSIX script to execute a build.

Add support of msbuild shipped with VS 2017+

In VS 2017 has been changed way to register tools in the system and now each VS installation creates a file in %ProgramData%\Microsoft\VisualStudio\Packages\_Instances\%installation_id%\state.json.

In the installationPath we can retrieve a VS installation path and check MsBuild availability in the MSBuild directory.

Cannot get property 'MSBuildProjectName' on null object when building a project file with assemblyInfoPatcher task

I have this error when the build is configuring. If I specify a solution file it works fine and if I specifify a project file and remove the task assemblyInfoPatcher it works fine.
The solution contains several projects.
The project and solution are attached: project_and_solution.zip

msbuild {
    //dependsOn << assemblyInfoPatcher
    //solutionFile = 'src/main/cs/' + project.name + '.sln'
    //projectName = project.name
    projectFile = 'src/main/cs/' + project.name + '.csproj'
    targets = ['Clean', 'Rebuild']
    configuration = 'Release'
    platform = 'Any CPU'
    destinationDir = "$buildDir/bin"
    intermediateDir = "$buildDir/msbuild/obj"
    generateDoc = true
    verbosity = 'quiet'
}

assemblyInfoPatcher {
    version = project.version - '-SNAPSHOT'
    fileVersion = project.version
}

The error (triggered by com.ullink.AssemblyInfoVersionPatcher$_closure5.doCall) :

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Omega.Core'.
> Cannot get property 'MSBuildProjectName' on null object

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'Omega.Core'.
        at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:79)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:74)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:61)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:532)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:93)
        at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)
        at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
        at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLauncher.java:125)
        at org.gradle.internal.Factories$1.create(Factories.java:22)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:122)
        at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:45)
        at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
        at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:33)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: java.lang.NullPointerException: Cannot get property 'MSBuildProjectName' on null object
        at com.ullink.ProjectFileParser.getProjectName(ProjectFileParser.groovy:22)
        at com.ullink.Msbuild.resolveProject(Msbuild.groovy:137)
        at com.ullink.Msbuild.getProjects(Msbuild.groovy:69)
        at com.ullink.Msbuild_Decorated.getProjects(Unknown Source)
        at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.getProperty(BeanDynamicObject.java:166)
        at org.gradle.api.internal.BeanDynamicObject.getProperty(BeanDynamicObject.java:109)
        at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:81)
        at com.ullink.Msbuild_Decorated.getProperty(Unknown Source)
        at com.ullink.AssemblyInfoVersionPatcher$_closure5_closure10.doCall(AssemblyInfoVersionPatcher.groovy:30)
        at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:130)
        at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:110)
        at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:488)
        at org.gradle.api.internal.AbstractTask.configure(AbstractTask.java:58)
        at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:59)
        at org.gradle.internal.Actions$FilteredAction.execute(Actions.java:202)
        at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:110)
        at org.gradle.api.internal.DefaultDomainObjectCollection.all(DefaultDomainObjectCollection.java:115)
        at org.gradle.api.internal.tasks.RealizableTaskCollection.all(RealizableTaskCollection.java:187)
        at org.gradle.api.internal.DefaultDomainObjectCollection.withType(DefaultDomainObjectCollection.java:126)
        at org.gradle.api.DomainObjectCollection$withType.call(Unknown Source)
        at com.ullink.AssemblyInfoVersionPatcher$_closure5.doCall(AssemblyInfoVersionPatcher.groovy:29)
        at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)
        at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
        at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
        at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
        at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
        at com.sun.proxy.$Proxy13.afterEvaluate(Unknown Source)
        at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:67)

MSBuild creating warning even if intermediateDir is end with slash

I have one project in C++.
Output Directory set to $(SolutionDir)$(Configuration)\
Intermediate Directory to $(Configuration)\
Still i am getting warning in MSbuild log

Log:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(345,5): warning MSB8004: Intermediate Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.

Support Java 9

Plugin uses gradle 4.2, which fails on computers with Java 9.0.1 only installed.

How to reproduce:

  1. Clear gradle caches
  2. Clone repository
  3. Execute gradlew.bat build

Error:

C:\git\gradle-msbuild-plugin [master ≡]> .\gradlew.bat build
Downloading https://services.gradle.org/distributions/gradle-4.2-bin.zip
...................................................................
Unzipping C:\g\wrapper\dists\gradle-4.2-bin\cl9xe1l8k8ophj72k8rv6xbu7\gradle-4.2-bin.zip to C:\g\wrapper\dists\gradle-4.2-bin\cl9xe1l8k8ophj72k8rv6xbu7

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from '9.0.1'.

Cannot execute ProjectFileParser.exe from user's temp dir in Windows 7

Hello,

I am using Windows 7 and gradle is not able to execute ProjectFileParser.exe from the users's temp directory (C:\Users\XXX\AppData\Local\Temp).

After a search on google, it seems that the problem comes from the security permission on the temp folder. The user should take ownership and full control of the temp folder.

Anyway, I think that it would be great to add a property (parserTempDir) to the MsBuild task. If this property is null we save the ProjectFileParser.exe in the user temp dir otherwise we save the file in the parserTempDir. So we can do something like that in Gradle:

msbuild {
parserTempDir = temporaryDir
...
}

With this, the ProjectFileParser will be saved in the build/tmp/msbuild directory.

WinPhone

Hello! How i can build winPhone project with your gradle plugin for msbuild?

Not compatible with 32-bit windows 7

Currently, using 2.9, the msbuild plugin fails with the following, only on 32-bit windows:

:msbuild FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':msbuild'.
> Cannot invoke method sort() on null object

This comes from missing safe navigation in MsbuildResolver.groovy:38. That was easy enough to fix.

Add Mage.exe and SignTool support

My project's release process needs to update both the app and deploy manifests and signing some executables. It would be nice if I had support to mage.exe and signtool.exe on this plugin.

Dependent Projects

I have a project with the NUnit unit tests in a subdirectory (UnitTests). I am trying to create a multiproject build where the root solution gets built first and the UnitTest solution gets built and run second. I tried creating a settings.gradle with a single "include 'UnitTests'" and then adding the following to the root build.gradle:

evaluationDependsOn(':UnitTests')

allprojects{
    id 'com.ullink.msbuild' version '2.9'
}

apply plugin:'msbuild'

msbuild {
 ...
}

In my UnitTests build.gradle I have the following:

plugins {
  id 'com.ullink.nunit' version '1.0'
}

dependencies {
    compile project(':')
}

apply plugin:'msbuild'

msbuild {
    ...
}

The problem is the dependencies in the UnitTests gradle file. This gives me the error:

    Could not find method compile() for arguments [root project 'QCoreTest'] on project ':UnitTests'.

I tried using 'msbuild' and 'build' (just trying anything really) but nothing works. How do I get the unit test project to build after the root project?

Mark

resolveProject() makes the assumption there is a main project

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.

Error during project file parsing: Microsoft.Build.Exceptions.InvalidProjectFileException: The tools version "14.1" is unrecognized. Available tools versions are "2.0", "3.5", "4.0".

After upgrading Visual Studio to version 2017 I receive the follow error:

Error during project file parsing: Microsoft.Build.Exceptions.InvalidProjectFileException: The tools version "14.1" is unrecognized. Available tools versions are "2.0", "3.5", "4.0".  C:\workspace_trunk\ProcessBridge.NET\ProcessBridge\ProcessBridge.csproj
   bei Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
   bei Microsoft.Build.Evaluation.Project.Data.InitializeForEvaluation(IToolsetProvider toolsetProvider)
   bei Microsoft.Build.Evaluation.Evaluator`4..ctor(IEvaluatorData`4 data, ProjectRootElement projectRootElement, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCache projectRootElementCache, BuildEventContext buildEventContext, ProjectInstance projectInstanceIfAnyForDebuggerOnly)
   bei Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation)
   bei Microsoft.Build.Evaluation.Project.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings)
   bei Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings)
   bei Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary`2 globalProperties, String toolsVersion)
   bei Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName)
   bei ProjectFileParser.ProjectHelpers.LoadProject(String fullPath, IDictionary`2 args)
   bei ProjectFileParser.ProjectHelpers.<>c__DisplayClass0_0.<GetProjects>b__1(ProjectInSolution p)
   bei System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   bei System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   bei System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   bei ProjectFileParser.ProjectHelpers.GetProjects(SolutionFile solution, IDictionary`2 args)
   bei ProjectFileParser.Program.ParseSolution(String file, JObject args)
   bei ProjectFileParser.Program.Parse(String file, JObject args)
   bei ProjectFileParser.Program.Main(String[] args)

With the follow debug lines:

msbuild {
   println getCommandLineArgs()
   println msbuild.msbuildDir
}

I can see the right msbuild tool version 15 from VS 2017. But the tool ProjectFileParser.exe seems to use a different version of the tool. How can I solve the problem? How the msbuild.exe are searched in the tool ProjectFileParser.exe?

destinationDir is not working.

When I set 'destinationDir' and run "gradle msbuild", I get the following error.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':msbuild'.
> The filename, directory name, or volume label syntax is incorrect

I'm using the version 1.9.

When I remove it, it succeeds.

My environment is

  • Gradle 2.0
  • Groovy 2.3.3
  • JVM 1.8.0 (Oracle Corporation 25.0-b70)
  • Windows 7 6.1 amd64

Feature request: Build multiple configurations

At the moment it seems, that one must add a single configuration to the msbuild configuration block.

What I need is a task, which builds my visual studio solution with both configurations 'Release' and 'Debug', so that I can upload both artifacts to maven with one gradle call.

Therefore, I ask for a possibility to define multiple configurations in the msbuild configuration. e.g.:

msbuild {
  ...
  targets = ['Clean', 'Rebuild']
  configurations = ['Release', 'Debug']
}

I already tried to call msbuild mutliple times, but the latter did unforunately not work, as the task 'msbuild' is only executed once (in the example, gradle clean build builds only the msbuild with configuration Release):

task buildRelease() << {
  msbuild.configuration = 'Release'
  tasks["msbuild"].execute()
}

task buildDebug() << {
  msbuild.configuration = 'Debug'
  tasks["msbuild"].execute()
}

tasks["msbuild"].outputs.upToDateWhen { false }

tasks["build"].dependsOn buildDebug
tasks["build"].dependsOn buildRelease
buildDebug.dependsOn buildRelease

XBuildResolver fails on OSX with Mono 4.4.0

On my OSX system (El Capitan), I have the following framework versions in my Mono 4.4.0 installation:

/Library/Frameworks/Mono.framework/Versions/4.4.0/lib/mono:
2.0-api
3.5-api
4.0
4.0-api
4.5
4.5-api

Note the "-api" suffix on several of the versions. I am not entirely sure what they are for, but they seem to be normal for Mono 4.4.0. XBuildResolver fails to handle these suffixes correctly and throws an exception. The problem is that XBuildResolver initially uses the undocumented Groovy class VersionNumber to filter the list of directories under /lib/mono; it then assumes that it can parse any of the matching directory names as Floats. However VersionNumber allows a "-qualifier" to be appended to the version, which matches the "-api" in the directories above; but the "-api" cannot be parsed as a Float, causing the exception.

task 'msbuild' fails when gradle-properties-plugin is used

If to add gradle-properties-plugin to the build, msbuild task fails without clear reason:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':msbuild'.
> Trying to evaluate a GString containing a Closure taking 2 parameters

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':msbuild'.
   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
...
   at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: groovy.lang.GroovyRuntimeException: Trying to evaluate a GString containing a Closure taking 2 parameters
   at org.gradle.process.internal.ExecHandleBuilder.getArgs(ExecHandleBuilder.java:90)
...
   at org.gradle.api.Project$exec$6.call(Unknown Source)
   at com.ullink.Msbuild.build(Msbuild.groovy:129)
   at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)

Gradle-properties-plugin is here: https://github.com/stevesaliman/gradle-properties-plugin
Full build log and build.gradle:

log.txt

build.gradle.txt

Error 0x57: The "version" parameter is not supported\MSBuild

With the new version 2.19 of the plugin on our build system we receive:

:msbuild FAILED
   Task: :msbuild took 1843ms

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':msbuild'.
> java.io.FileNotFoundException: C:\jenkins\workspace\Build-PDFC-ProcessBridge-NET\PDFCProcessBridge.NET\Visual Studio Locator version 2.3.7+gfb01ddad81
  Copyright (C) Microsoft Corporation. All rights reserved.
  
  Error 0x57: The "version" parameter is not supported\MSBuild

.....

Caused by: java.io.FileNotFoundException: C:\jenkins\workspace\Build-PDFC-ProcessBridge-NET\PDFCProcessBridge.NET\Visual Studio Locator version 2.3.7+gfb01ddad81
Copyright (C) Microsoft Corporation. All rights reserved.

Error 0x57: The "version" parameter is not supported\MSBuild
	at com.ullink.MsbuildResolver.findMsbuildByVsWhere(MsbuildResolver.groovy:36)
	at com.ullink.MsbuildResolver$findMsbuildByVsWhere.callStatic(Unknown Source)
	at com.ullink.MsbuildResolver.setupExecutable(MsbuildResolver.groovy:62)
	at com.ullink.IExecutableResolver$setupExecutable$0.call(Unknown Source)
	at com.ullink.Msbuild.getCommandLineArgs(Msbuild.groovy:156)
	at com.ullink.Msbuild_Decorated.getCommandLineArgs(Unknown Source)
	at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:479)
	at org.gradle.internal.metaobject.BeanDynamicObject.tryInvokeMethod(BeanDynamicObject.java:191)
	at org.gradle.internal.metaobject.CompositeDynamicObject.tryInvokeMethod(CompositeDynamicObject.java:98)
	at org.gradle.internal.metaobject.MixInClosurePropertiesAsMethodsDynamicObject.tryInvokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.java:30)
	at org.gradle.internal.metaobject.ConfigureDelegate.invokeMethod(ConfigureDelegate.java:80)
	at com.ullink.Msbuild$_build_closure7.doCall(Msbuild.groovy:151)
	at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:71)
	at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:160)
	at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:106)
	at org.gradle.util.ConfigureUtil$1.execute(ConfigureUtil.java:123)
	at org.gradle.api.internal.file.DefaultFileOperations.exec(DefaultFileOperations.java:187)
	at org.gradle.api.internal.project.DefaultProject.exec(DefaultProject.java:1076)
	at org.gradle.api.internal.project.DefaultProject.exec(DefaultProject.java:1071)
	at org.gradle.api.Project$exec$4.call(Unknown Source)
	at com.ullink.Msbuild.build(Msbuild.groovy:150)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
	... 41 more

Order of msbuild projects

I have a build that involves two csproj files and one wixproj (to build the installer). In the build.gradle, the two csproj projects are defined first, and then the wixproj configuration is added. But when I try running the build, it tries building the installer first. This fails, of course, because none of the files it is looking for have been built.

Is there a way to force the projects to build in a specified order?

Thanks.

Regression in 2.13+: Builds fail with "the tools version is unrecognized" error.

I have a build that runs find with plug-in 2.12. I'm using VS 2015 and MS Build 14.0.

Here is my full msbuild configuration:

msbuild {
        // .csproj, relative to the project root
        projectFile = file("src/main/asp.net/${vsProject}.csproj")

        // MsBuild project name (/p:Project=...)
        projectName = "${vsProject}"

        // Verbosity (/v:detailed, by default uses gradle logging level)
        //verbosity = 'detailed'

        // targets to execute (/t:Clean;Rebuild, no default)
        targets = ['Clean', 'Rebuild']

        // ### Project setting overrides ###

        // overrides project OutputPath
        destinationDir = "${buildDir}/msbuild/bin"

        // overrides project IntermediaryOutputPath
        intermediateDir = "${buildDir}/msbuild/obj"

        // Generates XML documentation file (from javadoc through custom DocLet)
        generateDoc = false

        // overrides project build configuration
        configuration = msbuildConfig

        // Other msbuild options can be set:
        // loggerAssembly, debugType, optimize, debugSymbols, platform, defineConstants ...

        // /Project setting overrides

        // ### Build properties (/p:SomeProperty=Value) ###

        parameters.DeployOnBuild = 'true'
        parameters.PublishProfile = 'Local Build Dir' // Publishes to build/site/
        parameters.VisualStudioVersion = '14.0' // VS 2015
    }

In 2.13+ builds fail with:

Error during project file parsing: Microsoft.Build.Exceptions.InvalidProjectFileException: The tools version "14.1" is unrecognized. Available tools versions are "14.0", "2.0", "3.5", "4.0".

This might have to do something with children projects. I have two child projects defined and configured in a similar way (to above). If I disable children projects, my main project passes.

Error : Could not determine the dependencies of task ':msbuild'.

Hello,

Firstly, thanks for this msbuild plugin.

I have an error when trying to launch my build file. Here it is :

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "com.ullink.gradle:gradle-msbuild-plugin:1.7" //or 1.6, same problem
}
}

apply plugin:'msbuild'

msbuild {
// mandatory
projectFile = 'MyProject.csproj'

// Verbosity (/v:detailed, by default uses gradle logging level)
verbosity = 'quiet'

configuration = 'Release'
platform = 'Windows Phone'
}

My project is a Windows Phone project. I get the following error : Could not determine the dependencies of task ':msbuild'. With the stack traces activated, I get another information :

Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.io.FileNotFoundException: C:\Program Files\MSBuild\Microsoft\Silverlight for Phone\v4.0\Microsoft.Silverlight.WindowsPhone71.Overrides.targets (Le chemin d'accès spécifié est introuvable).

Indeed, this file does not exist, but it does exist in C:\Program Files (x86).... (same path after). Is this a bug ? Could I configure the path myself ?

Thanks for your help and support !

Msbuild fails to create a task when running on Mac OSX

Is there a known issue on osx where it fails to create the a task?

  • What went wrong:
    A problem occurred evaluating root project 'TxtToCsAndCpp'.

    Failed to apply plugin [id 'msbuild']
    Could not create task of type 'Msbuild'.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Full stacktrace:

  • Exception is:
    org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'TxtToCsAndCpp'.
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:148)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
    at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:59)
    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:504)
    at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:83)
    at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)
    at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:129)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:47)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:35)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:71)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:69)
    at org.gradle.util.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:69)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:70)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.DaemonHygieneAction.execute(DaemonHygieneAction.java:39)
    at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:119)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:46)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:246)
    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
    Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'msbuild']
    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:117)
    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:36)
    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:80)
    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:131)
    at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:37)
    at org.gradle.api.Project$apply.call(Unknown Source)
    at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
    at org.gradle.api.Script$apply.callCurrent(Unknown Source)
    at build_853a5ahbglwsm3yzm6j20rnci.run(/Users/ailic/workspace/gradleBuildDev/Tools/UnityTxtParser/TxtToCsAndCpp/build.gradle:11)
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
    ... 42 more
    Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'Msbuild'.
    at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:126)
    at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:121)
    at org.gradle.api.internal.AbstractTask.injectIntoNewInstance(AbstractTask.java:138)
    at org.gradle.api.internal.project.taskfactory.TaskFactory.createTaskObject(TaskFactory.java:121)
    at org.gradle.api.internal.project.taskfactory.TaskFactory.createTask(TaskFactory.java:81)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory.createTask(AnnotationProcessingTaskFactory.java:99)
    at org.gradle.api.internal.project.taskfactory.DependencyAutoWireTaskFactory.createTask(DependencyAutoWireTaskFactory.java:39)
    at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:52)
    at org.gradle.api.internal.project.AbstractProject.task(AbstractProject.java:871)
    at org.gradle.api.Project$task$5.call(Unknown Source)
    at com.ullink.MsbuildPlugin.apply(MsbuildPlugin.groovy:8)
    at com.ullink.MsbuildPlugin.apply(MsbuildPlugin.groovy)
    at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:188)
    at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInternal(DefaultPluginContainer.java:137)
    at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:103)
    at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:115)
    ... 51 more
    Caused by: java.io.IOException: Cannot run program "mono": error=2, No such file or directory
    at com.ullink.XbuildResolver.(XbuildResolver.groovy:8)
    at com.ullink.Msbuild.(Msbuild.groovy:40)
    at com.ullink.Msbuild_Decorated.(Unknown Source)
    at org.gradle.api.internal.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:48)
    at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
    at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:124)
    ... 66 more
    Caused by: java.io.IOException: error=2, No such file or directory
    ... 72 more

Bad handling of path parameters in a Linux environment

Under Msbuild.groovy we have the code

        ['OutDir', 'OutputPath', 'BaseIntermediateOutputPath', 'IntermediateOutputPath', 'PublishDir'].each {
            if (cmdParameters[it] && !cmdParameters[it].endsWith('\\')) {
                cmdParameters[it] += '\\'
            }
        }

which doesn't look right on a Unix environment.
I have a case similar to the documented help:

// overrides project OutputPath
destinationDir = 'build/msbuild/bin'
// overrides project IntermediaryOutputPath
intermediateDir = 'build/msbuild/obj'

These paths will be modified to contain a '' in the end, causing the output to be copied to the wrong directory with the wrong name, e.g. (file 'bin\some_lib.dll' will be placed under build/ instead of build/bin/some_lib.dll)

Could not find property 'files' on task ':msbuild'.

Gradle fails to start when the projects property in assemblyInfoPatcher section of build.graddle is set to non empty array of strings. I tried to trace a problem and found that it appears at AssemblyInfoVersionPatcher (31:66), but I have no idea how to fix it.

Here is a gradle stacktrace

Project files not found by AssemblyInfoPatcher if in different directory from solution

I have a source tree like so, where the solution file defines the paths to its constituent projects:

<root>
   +---rootProject.sln
   +---src
        |
        +---project-a
        |       +---project-a.csproj
        +---project-b
                +---project-b.csproj

This minimal configuration appears to successfully build every project in the solution:

msbuild {
  solutionFile = 'rootProject.sln'
  targets = ['Clean', 'Rebuild']
  configuration = 'Release' // this should be included in the Readme
}

And, I was hoping that setting the assembly versions for all of the projects would be as simple as:

assemblyInfoPatcher {
  version = project.version + '.0'
  fileVersion = version + '.' + buildNumber
  projects = 'project-a', 'project-b'
}

...but no matter what I configure for the patcher, even if I omit the projects configuration, the patcher always complains:

Project project-a not found in solution

So, it appears that the patcher is not expecting or using the path information that is specified in the project entries for the solution file.

Support more fields at AssemblyInfoVersionPatcher task

Hi,

Currently, AssemblyInfoVersionPatcher supports customizing those fields:

  1. AssemblyVersion
  2. AssemblyFileVersion
  3. AssemblyInformationalVersion
  4. AssemblyDescription

There are additional fields I would like to customize as part of product build:
5. AssemblyTitle
6. AssemblyCompany
7. AssemblyProduct
8. AssemblyCopyright
9. AssemblyTrademark

Is it possible to modify or extend current AssemblyInfoVersionPatcher such that it will get a map as @ Input, where I put all desired fields?
Declaring additional input members is fine as well

Thank you very much!

Error during project file parsing: System.InvalidCastException: Unable to cast object of type 'System.Xml.XmlComment' to type 'System.Xml.XmlElement'.

I'm getting this exception:
16:57:34.499 [DEBUG] [org.gradle.api.Project] Msbuild plugin detected. Will add defaults from it. 16:57:34.500 [INFO] [org.gradle.api.Task] Parsing file my_lib.sln ... 16:57:35.031 [ERROR] [org.gradle.api.Task] Error during project file parsing: System.InvalidCastException: Unable to cast object of type 'System.Xml.XmlComment' to type 'System.Xml.XmlElement'. 16:57:35.031 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessProjectChildren(XmlElement projectElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.031 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessImportElement(XmlElement importElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.032 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessProjectChildren(XmlElement projectElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.032 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessMainProjectElement() 16:57:35.032 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.InternalLoadFromXmlDocument(XmlDocument projectXml, ProjectLoadSettings projectLoadSettings) 16:57:35.032 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.Load(String projectFileName, BuildEventContext buildEventContext, ProjectLoadSettings projectLoadSettings) 16:57:35.032 [ERROR] [org.gradle.api.Task] at ProjectFileParser.PlatformProjectHelper.Load(Project project, String file) 16:57:35.032 [ERROR] [org.gradle.api.Task] at ProjectFileParser.platform_helpers.MsbuildPlatform.Load(Project project, String file) 16:57:35.033 [ERROR] [org.gradle.api.Task] at ProjectFileParser.Program.Parse(String file) 16:57:35.033 [ERROR] [org.gradle.api.Task] at ProjectFileParser.Program.Main(String[] args) 16:57:35.033 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessProjectChildren(XmlElement projectElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.033 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessImportElement(XmlElement importElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.033 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessProjectChildren(XmlElement projectElement, String projectDirectoryLocation, Boolean importedProject) 16:57:35.034 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.ProcessMainProjectElement() 16:57:35.034 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.InternalLoadFromXmlDocument(XmlDocument projectXml, ProjectLoadSettings projectLoadSettings) 16:57:35.034 [ERROR] [org.gradle.api.Task] at Microsoft.Build.BuildEngine.Project.Load(String projectFileName, BuildEventContext buildEventContext, ProjectLoadSettings projectLoadSettings) 16:57:35.034 [ERROR] [org.gradle.api.Task] at ProjectFileParser.PlatformProjectHelper.Load(Project project, String file) 16:57:35.034 [ERROR] [org.gradle.api.Task] at ProjectFileParser.platform_helpers.MsbuildPlatform.Load(Project project, String file) 16:57:35.034 [ERROR] [org.gradle.api.Task] at ProjectFileParser.Program.Parse(String file) 16:57:35.035 [ERROR] [org.gradle.api.Task] at ProjectFileParser.Program.Main(String[] args) 16:57:35.037 [ERROR] [org.gradle.BuildExceptionReporter] 16:57:35.037 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 16:57:35.037 [ERROR] [org.gradle.BuildExceptionReporter] 16:57:35.037 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 16:57:35.038 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred configuring root project 'my_lib'. 16:57:35.038 [ERROR] [org.gradle.BuildExceptionReporter] > Project file parsing failed

This is my gradle plugin setup:
plugins { id "com.ullink.nuget" version "2.13" id "com.ullink.msbuild" version "2.11" id 'at.bxm.svntools' version "1.3" id 'nu.studer.credentials' version "1.0.1" }

the C# solution is visual studio 2015 update 1

Plugin ID not found.

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?

msbuild error: attribute "Version" in element <PackageReference> is unrecognized.

Hi,

I'm trying to use this plugin to build a C#/.NET project, originally created in VS2017 using the
'gradle clean msbuild' command. I am using a Mac.

Here is my build.gradle file:

`plugins {
id 'com.ullink.msbuild' version '2.19'
}

msbuild {
solutionFile = 'csharp/Basic/Producer/DEBProducer/DEBProducer.csproj'
targets = ['Clean','Rebuild']
}
`

Here is my gradle version
`gradle --version


Gradle 4.8.1

Build time: 2018-06-21 07:53:06 UTC
Revision: 0abdea078047b12df42e7750ccba34d69b516a22

Groovy: 2.4.12
Ant: Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM: 1.8.0_131 (Oracle Corporation 25.131-b11)
OS: Mac OS X 10.13.6 x86_64`

This is my msbuild version:
msbuild -version Microsoft (R) Build Engine version 15.6.0.0 (xplat-master/ca830585 Sun Mar 25 19:24:09 EDT 2018) for Mono Copyright (C) Microsoft Corporation. All rights reserved.

Originally I was getting this error:
The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
After adding the line the project element in my .csproj i received the following error:

The attribute "Version" in element <PackageReference> is unrecognized.

After a good amount of googling, every solution to this error I've come across is to upgrade from VS2015 to VS2017, however VS2017 is the Visual Studio version I am using. It appears to me that it may be using an older version of msbuild (I could be wrong), is it possible set the required version of ms build?

Thank you for your help!

Can't build the plug-in from source

I'm getting the following error when doing:

.../gradle-msbuild-plugin-master>gradle

I tried it on two different OSes:

  1. Mac / OS X Mavericks with Gradle 2.1 and Groovy SDK installed
  2. Windows 8.1 with Gradle 2.0

InvalidProjectFileException error during project file parsing

Hi!

I've an issue during the execution of msbuild Build target, which was working with older VS versions before.

Environment:

  • Windows 10 Pro 1803
  • Visual Studio Community 2017 15.8.1

This is important to us now, so I can provide help, also coding help if necessary!

Error during project file parsing: Microsoft.Build.Exceptions.InvalidProjectFileException: Invalid static method invocation syntax: "[Microsoft.Build.Utilities.ToolLocationHelper]::GetPathToStandardLibraries($(TargetFrameworkIdentifier), $(TargetFrameworkVersion), $(TargetFrameworkProfile), $(PlatformTarget), $(TargetFrameworkRootPath), $(TargetFrameworkFallbackSearchPaths))". Method 'Microsoft.Build.Utilities.ToolLocationHelper.GetPathToStandardLibraries' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(a, b)). C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject[T1,T2](IElementLocation elementLocation, String resourceName, T1 arg0, T2 arg1)
at Microsoft.Build.Evaluation.Expander2.Function1.Execute(Object objectInstance, IPropertyProvider1 properties, ExpanderOptions options, IElementLocation elementLocation) at Microsoft.Build.Evaluation.Expander2.PropertyExpander1.ExpandPropertyBody(String propertyBody, Object propertyValue, IPropertyProvider1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties usedUninitializedProperties)
at Microsoft.Build.Evaluation.Expander2.PropertyExpander1.ExpandPropertiesLeaveTypedAndEscaped(String expression, IPropertyProvider1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties usedUninitializedProperties) at Microsoft.Build.Evaluation.Expander2.PropertyExpander1.ExpandPropertiesLeaveEscaped(String expression, IPropertyProvider1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties usedUninitializedProperties)
at Microsoft.Build.Evaluation.Expander2.ExpandIntoStringLeaveEscaped(String expression, ExpanderOptions options, IElementLocation elementLocation) at Microsoft.Build.Evaluation.Evaluator4.EvaluatePropertyElement(ProjectPropertyElement propertyElement)
at Microsoft.Build.Evaluation.Evaluator4.EvaluatePropertyGroupElement(ProjectPropertyGroupElement propertyGroupElement) at Microsoft.Build.Evaluation.Evaluator4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
at Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) at Microsoft.Build.Evaluation.Evaluator4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
at Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) at Microsoft.Build.Evaluation.Evaluator4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
at Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) at Microsoft.Build.Evaluation.Evaluator4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
at Microsoft.Build.Evaluation.Evaluator4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement) at Microsoft.Build.Evaluation.Evaluator4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
at Microsoft.Build.Evaluation.Evaluator4.Evaluate(ILoggingService loggingService, BuildEventContext buildEventContext) at Microsoft.Build.Evaluation.Project.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings) at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings) at Microsoft.Build.Evaluation.Project.Initialize(IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings)
at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary2 globalProperties, String toolsVersion)
at ProjectFileParser.ProjectHelpers.LoadProject(String fullPath, IDictionary`2 args)
at ProjectFileParser.Program.ParseProject(String file, JObject args)
at ProjectFileParser.Program.Parse(String file, JObject args)
at ProjectFileParser.Program.Main(String[] args)

Could not find method assemblyInfoPatcher()

Hi,

I'm trying to build a very simple project with the sample build file provided.

Could not find method assemblyInfoPatcher() for arguments [build_6ayt6vpk7zunfhrs63upg3ynr$_run_closure2@59e2a4]

buildscript {
    repositories {
      mavenCentral()
    }

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

apply plugin:'msbuild'

msbuild {
  // mandatory (one of those)
  solutionFile = 'SampleProj.sln'

  // MsBuild project name (/p:Project=...)
  projectName = project.name

  // Verbosity (/v:detailed, by default uses gradle logging level)
  verbosity = 'detailed'

  // targets to execute (/t:Clean;Rebuild, no default)
  targets = ['Clean', 'Rebuild']

  // Below values can override settings from the project file

  // overrides project OutputPath
  destinationDir = 'build/msbuild/bin'

  // overrides project IntermediaryOutputPath
  intermediateDir = 'build/msbuild/obj'

  // Generates XML documentation file (from javadoc through custom DocLet)
  generateDoc = false

  // Other msbuild options can be set:
  // loggerAssembly, generateDoc, debugType, optimize, debugSymbols, configuration, platform, defineConstants ...

  // you can also provide properties by name (/p:SomeProperty=Value)
  parameters.SomeProperty = 'Value'

  // Or, if you use built-in msbuild parameters that aren't directly available here,
  // you can take advantage of the ExtensionAware interface
  ext["flp1"] = "LogFile=" + file("${project.name}.errors.log").path + ";ErrorsOnly;Verbosity=diag"
}

assemblyInfoPatcher {
  // mandatory if you want to patch your AssemblyInfo.cs/fs
  // TODO: not yet normalized, beware than .Net version must be X.Y.Z.B format, with Z/B optionals
  version = project.version + '.0.0'

  // defaults to above version, fewer restrictions on the format
  fileVersion = version + '-Beta'
}

What could I be missing?

Thanks in advance!

Specify the destination of dll-files

I want to create my dll-files in a folder of my choice, but even if I define destinationDir, they are always created in the default folder

My task looks as follows:
task createReleaseDllForWin32(type: Msbuild){
onlyIf{ OperatingSystem.current().windows }
solutionFile = "path/to/solutionfile.sln"
configuration = 'Release'
platform = "Win32"
targets = ['Clean','Build']
destinationDir = "build/msbuild/bin"
}

Support MSBuild 15

Problem

Currently, there is no possibility to build projects, with new format of 'csproj' file, shipped from .NET Core.
Build support of new project format came with MSBuild 15.

See project example:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net45</TargetFramework>
    
    <RootNamespace>Example</RootNamespace>
    <AssemblyName>Example</AssemblyName>

    <PackageId>Example</PackageId>    
    <Authors>Konstantin Posudevskiy</Authors>
    <IncludeSymbols>true</IncludeSymbols>
    <IncludeSource>true</IncludeSource>    
    <NoPackageAnalysis>true</NoPackageAnalysis>
    <PackageTags>.NET</PackageTags>
  </PropertyGroup> 

  <ItemGroup>
    <PackageReference Include="Antlr4" Version="4.3.0" />
  </ItemGroup>
</Project>

Now I receive next exception message:

Error during project file parsing: Microsoft.Build.Exceptions.InvalidProjectFileException: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.

That is exception stack:

   at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
   at Microsoft.Build.Construction.ProjectParser.Parse()
   at Microsoft.Build.Construction.ProjectRootElement..ctor(String path, ProjectRootElementCache projectRootElementCache, BuildEventContext buildEventContext)
   at Microsoft.Build.Construction.ProjectRootElement.CreateProjectFromPath(String projectFile, IDictionary`2 globalProperties, String toolsVersion, ILoggingService loggingService, ProjectRootElementCache projectRootElementCache, BuildEventContext buildEventContext)
   at Microsoft.Build.Construction.ProjectRootElement.<OpenProjectOrSolution>c__AnonStorey0.<>m__0(String path, ProjectRootElementCache cache)
   at Microsoft.Build.Evaluation.ProjectRootElementCache.Get(String projectFile, OpenProjectRootElement openProjectRootElement, Boolean isExplicitlyLoaded)
   at Microsoft.Build.Construction.ProjectRootElement.OpenProjectOrSolution(String fullPath, IDictionary`2 globalProperties, String toolsVersion, ILoggingService loggingService, ProjectRootElementCache projectRootElementCache, BuildEventContext buildEventContext, Boolean isExplicitlyLoaded)
   at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName, IDictionary`2 globalProperties, String toolsVersion)
   at Microsoft.Build.Evaluation.ProjectCollection.LoadProject(String fileName)
   at ProjectFileParser.ProjectHelpers.LoadProject(String fullPath, IDictionary`2 args)
   at ProjectFileParser.Program.ParseProject(String file, JObject args)
   at ProjectFileParser.Program.Parse(String file, JObject args)
   at ProjectFileParser.Program.Main(String[] args)

MSBuild fails when intermediateDir is specified due to missing trailing slash

I am getting this error when I try to specify the 'intermediateDir' for a 'msbuild' task:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(618,5): error : The IntermediateOutputPath must end with a trailing slash.

I was able to get a fix working locally. I can send a patch if you like, but essentially all that really needed to be done was add the slash. My patch has a few other small tweaks as well if you're interested.

MSBuild could not be found if .Net 4.7.1 SDK is installed

Plugin is unable to find msbuild v15+ on computer with:

  • MS VS 2017 Build Tools installed (e.g. Visual Studio is not installed, just Build Tools)
  • .Net SDK 4.7.1 installed

In this case plugin finds MSBuild v14 only (e.g. it will unable to build short new csproj projects)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.