Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add msbuild executable name #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sfenu
Copy link

@sfenu sfenu commented Feb 13, 2018

From direct testing and from Msbuild plugin page (https://plugins.jenkins.io/msbuild):
"Usage
To use this plugin, specify the location directory of MSBuild.exe on Jenkin's configuration page."

The command will work if full path to executable is included in the msbuild configuration, but then in that case a msbuild step in a freestyle job will not work.

From direct testing and from Msbuild plugin page (https://plugins.jenkins.io/msbuild): 
"Usage
To use this plugin, specify the location directory of MSBuild.exe on Jenkin's configuration page."

The command will work if full path to executable is included in the msbuild configuration, but then in that case a msbuild step in a freestyle job will not work.
@Jasonf1977
Copy link

Jasonf1977 commented Aug 27, 2018

It works fine as is, if your tool path is contains msbuild.exe already. Mine did so this mod would be wrong for me. I think this is a config issue not a problem with the example.

@sfenu
Copy link
Author

sfenu commented Aug 27, 2018

Yes, but if you include msbuild.exe in your tool path and then you use a msbuild step in a freestyle (not pipeline) job, the msbuild step in that freestyle job will not work. That means that for the example to work, you need a tool configuration which will create issues in freestyle jobs that use msbuild steps. That means that the example is wrong, in my opinion.

@Jasonf1977
Copy link

Jasonf1977 commented Aug 27, 2018 via email

@pvkamath
Copy link

pvkamath commented Feb 12, 2019

Not sure how the people using msbuild.exe in their paths are getting this to work. (see screenshot from Jenkins Build 2.138.X). How are your msbuild configs accepting the paths including msbuild.exe when Jenkins specifically expects a directory ?

I ran into this problem from Day 1 when I tried to use the syntax referred to in the tutorial. Note that my MSBuild installation does not have msbuild.exe at the end because it throws the error shown in the screenshot when I try to add it. And using the name of the installation does not work. Wasted more than an hour trying to get it to work till I tried the fix mentioned in this PR and it worked (Didn't see this PR till now, I arrived at my solution using the "Try This, Try That" approach).

So, the solution should be

  • Pipeline must deduce the name of the msbuild exe i.e. MSBuild.exe. This is the right approach because using the UI approach, one needs to only select the MSBuild install from the Global Tool Configuration, the name of the solution file and the build parameters.
  • The string "msbuild.exe" should be appended to the "${tool MSBuild}" part in the tutorial i.e. this PR must be merged into master.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants