Path to my solution

rajindersingh's Avatar

rajindersingh

28 Mar, 2015 03:35 PM

Hi:

I am trying to update my service definition file. I use the UI to add a power shell script to update the servicedefinition.csdef file.

Before making this change I had this one cmd line in my before build script.

nuget restore

I replaced it with the following powershell script.

if($true)
{
      nuget restore
      $xml = [xml](Get-Content 'C:\projects\AGWebRTC\AGWebRTC\ServiceDefinition.csdef')
      $xml.ServiceDefinition.WebRole.SetAttribute("vmsize","Large")
      $xml.ServiceDefinition.WorkerRole.SetAttribute("vmsize","Large")
      $xml.Save('C:\projects\AGWebRTC\AGWebRTC\ServiceDefinition.csdef')
}

I get an error saying that solution file not found.

for some reason nuget restore does not work for me. it cannot find the solution file.
I have tried many different combinations but none of them seem to work.

Here is where my project located in TFS:
tfvc/DataYieldLLC/$/AgriSync Sprint/AGWebRTC

My Appveyor project name is AGWebRTC

I have tried these combinations and all failed:

1. nuget restore
2. nuget restore 'C:\projects\AgriSync Sprint\AGWebRTC\AGWebRTC.sln'
3. nuget restore 'C:\projects\AGWebRTC\AGWebRTC.sln'
4. nuget restore AGWebRTC.sln

I am supposed to point to project slug. I don't know what a project slug should be.
Since all the combinations fail with solution not found error could the error message be misleading.

  1. Support Staff 1 Posted by Feodor Fitsner on 28 Mar, 2015 06:24 PM

    Feodor Fitsner's Avatar

    You can use appveyor_build_folder variable like that:

    nuget restore "$env:appveyor_build_folder\AGWebRTC.sln"
    
  2. 2 Posted by rajindersingh on 28 Mar, 2015 08:54 PM

    rajindersingh's Avatar

    Thanks this worked for me.
    I will never assume that path to my solution is c:\projects\xxxxx again.

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:55 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