Skip to content

Unable to install dotnet on Windows using vfox plugin #6

@dggsax

Description

@dggsax

Clarifier: I am new to the mise/vfox/asdf ecosystem, so apologies if I misunderstand something

Looking at issue #3 which was supposed to be fixed by #4, I think there is more to the fix.

On windows, when I run mise install dotnet using mise version 2025.8.7 windows-x64 (2025-08-06) I get the following output:

mise ERROR Failed to install tool: dotnet@latest

Individual error details:
  1. dotnet@latest:
     Error {
         msg: "failed to install vfox:[email protected]",
         source: LuaError(
             FromLuaConversionError {
                 from: "table",
                 to: "PreInstall",
                 message: Some(
                     "no version returned from vfox plugin",
                 ),
             },
         ),
     }

I did some debugging into this, for example if we look at pre_install.lua below:

function PLUGIN:PreInstall(ctx)
local releases = util:getAvailableByUserVersion(ctx.version)
for _, release in ipairs(releases) do
if strings.has_prefix(release.version, ctx.version) then
return release
end
end
return {}
end

The properties of a release (as populated by util:getAvailableByChannelReleaseUrl) are:

If we change the logic on line 13 to the following:

function PLUGIN:PreInstall(ctx) 
     local releases = util:getAvailableByUserVersion(ctx.version) 
  
     for _, release in ipairs(releases) do 
-         if strings.has_prefix(release.version, ctx.version) then 
+         if strings.has_prefix(release.addition[1].version, ctx.version) then 
             return release 
         end 
     end 
  
     return {} 
 end 

Then the installation works. I'm happy to submit a PR to fix this, and maybe make it so that rather than indexing the property by release.addition[1].version it's set as release.sdk-version, but wanted to open the issue to confirm that this is the correct path forward first.

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