Yml file isn't finding my solution file :(

Pure Krome's Avatar

Pure Krome

30 Jan, 2015 04:44 AM

I've got the following in my yml file...

#---------------------------------#
#       build configuration       #
#---------------------------------#

before_build:
  - nuget restore

build:
  project: XWing.sln
  parallel: true
  verbosity: minimal

and i'm always getting this error message...

641 
642 nuget restore
643 This folder contains more than one solution file.
644 Command exited with code 1

Ok, so even if i specify it in the UI, the same thing .. but that's because the build worker detects the presence of a yml file and uses that.

Is this a bug or am I just being an idiot (again).

  • Yes, the file is there. It's reporting that it's finding a few.
  • Yes, i've tried using the full path: `project: c:\projects\xwing\XWing.sln'
  1. Support Staff 1 Posted by Feodor Fitsner on 30 Jan, 2015 04:49 AM

    Feodor Fitsner's Avatar

    OK, first set Ignore appveyor.yml and check if setting SLN on UI works.

  2. 2 Posted by Pure Krome on 30 Jan, 2015 04:55 AM

    Pure Krome's Avatar

    Great idea! ok, lets try.


    settings:

    output:

    Build started
    git clone -q --branch=<snipped>C:\projects\xwing
    git checkout -qf <snipped>
    nuget restore
    This folder contains more than one solution file.
    Command exited with code 1
    
  3. Support Staff 3 Posted by Feodor Fitsner on 30 Jan, 2015 04:57 AM

    Feodor Fitsner's Avatar

    :) this comes from "nuget restore"

    -Feodor

  4. Support Staff 4 Posted by Feodor Fitsner on 30 Jan, 2015 05:05 AM

    Feodor Fitsner's Avatar

    Should be:

    nuget restore <solution>
    
  5. 5 Posted by Pure Krome on 30 Jan, 2015 05:24 AM

    Pure Krome's Avatar

    Woot! of course!

    Q: can i use environment variables here?

    eg

    environment:
      solutionFile: XWing.sln


    before_build: - nuget restore $(solutionFile) ....


    I tried that and it failed:
    nuget restore $(solutionFile)
    Cannot locate a solution file.

    
    
    
    for people searching via google:

    • nuget restore <YourSolution.sln>`
    
    
    
    nuget restore CLI
  6. 6 Posted by Pure Krome on 30 Jan, 2015 05:24 AM

    Pure Krome's Avatar

    (damn unable to edit previous post) :(

  7. Support Staff 7 Posted by Feodor Fitsner on 30 Jan, 2015 05:27 AM

    Feodor Fitsner's Avatar

    Nope, variables are not supported in project though for nuget restore you can use them as nuget restore %solutionFile%

  8. 8 Posted by Pure Krome on 30 Jan, 2015 05:40 AM

    Pure Krome's Avatar

    Ok. nuget restore %solutionFile% worked :)

    um - how did that work? what is %xxxx%? Can i do that in other places? Is that some generic dos environment thingy?

  9. Support Staff 9 Posted by Feodor Fitsner on 30 Jan, 2015 05:43 AM

    Feodor Fitsner's Avatar

    Because nuget restore %solutionFile% is just a shell command while syntax $(something) in other parts is processed by build agent.

    I agree adding variables support to "project" would be really nice.

  10. 10 Posted by Pure Krome on 30 Jan, 2015 06:05 AM

    Pure Krome's Avatar

    Sweet - Issue added.

  11. Pure Krome closed this discussion on 30 Jan, 2015 06:05 AM.

  12. Feodor Fitsner re-opened this discussion on 08 Mar, 2015 06:14 PM

  13. Support Staff 11 Posted by Feodor Fitsner on 08 Mar, 2015 06:14 PM

    Feodor Fitsner's Avatar

    It's been implemented.

  14. Pure Krome closed this discussion on 01 Apr, 2015 08:59 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac