Skip to content

Solution file argument isn't being passed #82

@chb0github

Description

@chb0github

Maybe I am missing something, but based on everything I see, this should produce results and yet, it doesn't seem to be passing the solution file along to the CLI despite being set. It's also not picking up the nuget on the path - which isn't so crucial, but curious

import com.ullink.NuGetRestore


plugins {
    id("com.ullink.nuget") version "2.20" apply false
}

subprojects {
    apply(plugin = "com.ullink.nuget")
    val solution =projectDir.walkTopDown().find { it.extension == "sln" }!!

    tasks {

        val restore by creating(NuGetRestore::class) {
            setSolutionDirectory(solution.parentFile.path)
            setSolutionFile(solution.path)
            verbosity = "detailed"
            sources = setOf(
                "https://www.nuget.org/api/v2",
                "http://prism-prod-oct/NuGetLocalServer/nuget"
            )
            println("executable: ${executable}")
            println("Args: ${args}")
            println("task solution file: ${this.solutionFile}")
        }

    }
}
PS C:\Users\cbongiorno\dev\sterling\prism\prism-wfadaptors> gradle nugetRestore

> Configure project :
executable: null
Args: [restore]
tasksolution file: C:\Users\cbongiorno\dev\sterling\prism\prism-wfadaptors\workflowadaptor-cwi_fl_lake_ui\CWI_FL_LAKE_UISol\CWI_FL_LAKE_UISol.sln
solution file found: C:\Users\cbongiorno\dev\sterling\prism\prism-wfadaptors\workflowadaptor-cwi_fl_lake_ui\CWI_FL_LAKE_UISol\CWI_FL_LAKE_UISol.sln
executable: null
Args: [restore]
tasksolution file: C:\Users\cbongiorno\dev\sterling\prism\prism-wfadaptors\workflowadaptor-cwi_ri_statewide_ui\CWI_RI_STATEWIDE_UISol\CWI_RI_STATEWIDE_UISol.sln
solution file found: C:\Users\cbongiorno\dev\sterling\prism\prism-wfadaptors\workflowadaptor-cwi_ri_statewide_ui\CWI_RI_STATEWIDE_UISol\CWI_RI_STATEWIDE_UISol.sln

> Task :workflowadaptor-cwi_fl_lake_ui:nugetRestore FAILED
The folder 'C:\Users\cbongiorno\dev\sterling\prism\prism-wfadaptors\workflowadaptor-cwi_fl_lake_ui' does not contain an msbuild solution or packages.config file to restore.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':workflowadaptor-cwi_fl_lake_ui:nugetRestore'.
> Process 'command 'C:\Users\cbongiorno\.gradle\caches\nuget\5.5.0\NuGet.exe'' finished with non-zero exit value 1

PS C:\Users\cbongiorno\dev\sterling\prism\prism-wfadaptors> gcm nuget

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     nuget.exe                                          5.5.1.0    C:\ProgramData\chocolatey\bin\nuget.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions