Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
985 views
in Technique[技术] by (71.8m points)

.net - GithubActions CI Windows VMs don't have fsi.exe anymore? or it changed location

Before you tell me that the way to run .fsx scripts in .NETCore/.NET5(or higher) is dotnet fsi, FYI: I know that already. I just can't upgrade yet, so I'm still running my .fsx scripts with the good-old .NET 4.x Framework.

To do this, and to run them under GithubActions CI, I had this handy fsi.bat file:

@ECHO OFF

SET ENTERPRISE="%ProgramFiles(x86)%Microsoft Visual Studio2019EnterpriseCommon7IDECommonExtensionsMicrosoftFSharpfsi.exe"
SET COMMUNITY="%ProgramFiles(x86)%Microsoft Visual Studio2019CommunityCommon7IDECommonExtensionsMicrosoftFSharpfsi.exe"
SET BUILDTOOLS="%ProgramFiles(x86)%Microsoft Visual Studio2019BuildToolsCommon7IDECommonExtensionsMicrosoftFSharpfsi.exe"

IF EXIST %ENTERPRISE% (
    SET RUNNER=%ENTERPRISE%
) ELSE (
    IF EXIST %COMMUNITY% (
        SET RUNNER=%COMMUNITY%
    ) ELSE (
        IF EXIST %BUILDTOOLS% (
            SET RUNNER=%BUILDTOOLS%
        ) ELSE (
            ECHO fsi.exe not found, is F# installed?
            EXIT /b 1
        )
    )
)

%RUNNER% %*

This was working fine... until yesterday.

Somehow GitHub (or should I say Microsoft...) decided to upgrade their production VMs for GitHub Actions and now all my builds are failing.

So I have three questions:

  1. What is the location now? I don't see that VS2020 has been released yet?
  2. Any better way to find fsi.exe moving forward that cannot break after upgrades?
  3. How to choose a more stable GitHubActions VM that doesn't bring breaking changes from time to time? Don't just tell me to yell at Nat Friedman on twitter :)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It looks like the location changed recently for me also:

  • VS2019 version 16.9.3: ...MicrosoftFSharpfsi.exe
  • VS2019 version 16.10.0: ...MicrosoftFSharpToolsfsi.exe

So they've moved it into a Tools directory for some reason.

What I do personally is start the "Visual Studio 2019 Developer Command Prompt" and execute fsi from there, so the exact location doesn't matter. Maybe you can script something similar by invoking the same command file? It's in ...Common7ToolsVsDevCmd.bat.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...