gradle-msbuild-plugin
gradle-msbuild-plugin copied to clipboard
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)
I have this problem as well. What is the intention behind adding \\
to the output paths?
as far as I remember this was required because msbuild tasks on windows didn't append the separator automatically (and generated paths using string concat were completely off). One would have to check if mono msbuild also requires this, and either add the proper sep for mono, or not add it at all.
Any idea which case it is ?