Skip to content

Support for *.SLNX files #614

Closed
Closed

Description

@MovGP0

There is currenly no support for *.slnx files (Medium: Welcome to the new Visual Studio SLNX Solution File).

It's currenly a preview feature. Given that the file format is reasonably simple it should not be too complex to implement.

Current behavior

❯ dotnet outdated
Discovering projects...The directory 'c:\xxxx' does not contain any solutions or projects.

Activity

  1. WeihanLi commented on Feb 16, 2025

    @WeihanLi
    Contributor

    msbuild & dotnet-cli already added support for the slnx since 9.0.200

    dotnet/msbuild#10266
    dotnet/sdk#40913

  2. molostovvs commented on Mar 25, 2025

    @molostovvs

    @slang25
    It seems this issue can be closed, as #652 has implemented .slnx support

  3. Daeer-Projects commented on Mar 31, 2025

    @Daeer-Projects

    Although dotnet and MSBuild now support the new .slnx file type, my build on Azure doesn't work.

    • dotnet: 9.0.202.
    • dotnet-outdated: 4.6.8
    • Command: "C:\BuildAgent_work_tool\dotnet\dotnet.exe dotnet-outdated C:\BuildAgent_work\4\s\Alchemy.slnx -n -u -t -vl Major"
    • Error: "Discovering projects...The file 'C:\BuildAgent_work\4\s\Alchemy.slnx' is not a valid solution or project."

    My other build scripts work. This build is to automatically update packages and is the only one that doesn't work, not that we have moved to the new .slnx solution file type.

    Can you help me? Have I got part of the command wrong?

    From our .yml file:

    - task: DotNetCoreCLI@2
      displayName: 'Update Nuget'
      timeoutInMinutes: 120
      inputs:
        command: 'custom'
        custom: 'dotnet-outdated'
        projects: '$(solution)'
        arguments: '-n -u -t -vl Major'
    
  4. WeihanLi commented on Mar 31, 2025

    @WeihanLi
    Contributor

    Seems the message is from

    // At this point, we know the file passed in is not a valid project or solution
    throw new CommandValidationException(string.Format(CultureInfo.InvariantCulture, Resources.ValidationErrorMessages.FileNotAValidSolutionOrProject, path));

    Is there a build log that could be shared?

    seemed that's used the local dotnet tool, is it possible to list the dotnet tool version before executing the command:

    dump dotnet SDK info:

    dotnet --info
    

    list local tool

    dotnet tool list

    list global tool

    dotnet tool list -g
    
  5. Daeer-Projects commented on Mar 31, 2025

    @Daeer-Projects

    I found the problem.

    We're using a dotnet-tools.json file to get the tools used for our builds. It was still set to 4.6.4. I've updated that file and it now works.

    Thank you.
    :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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