GithubActions CI Windows VM 不再有 fsi.exe 了吗?或者它改变了位置 [英] GithubActions CI Windows VMs don't have fsi.exe anymore? or it changed location

查看:15
本文介绍了GithubActions CI Windows VM 不再有 fsi.exe 了吗?或者它改变了位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在您告诉我在 .NETCore/.NET5(或更高版本)中运行 .fsx 脚本的方式是 dotnet fsi 之前,仅供参考:我已经知道了.我还不能升级,所以我仍在使用旧的 .NET 4.x 框架运行我的 .fsx 脚本.

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.

为了做到这一点,并在 GithubActions CI 下运行它们,我有这个方便的 fsi.bat 文件:

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.

不知何故,GitHub(或者我应该说微软...)决定升级他们用于 GitHub Actions 的生产虚拟机,现在我所有的构建都失败了.

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

所以我有三个问题:

  1. 现在在什么地方?我没看到 VS2020 已经发布了吗?
  2. 有什么更好的方法可以让 fsi.exe 在升级后不会中断?
  3. 如何选择更稳定且不会不时带来重大变化的 GitHubActions VM?不要只是告诉我在 Twitter 上对 Nat Friedman 大喊大叫 :)

推荐答案

最近我的位置好像也变了:

It looks like the location changed recently for me also:

  • VS2019 16.9.3 版本:...MicrosoftFSharpfsi.exe
  • VS2019 16.10.0 版本:...MicrosoftFSharpToolsfsi.exe

因此他们出于某种原因将其移至 Tools 目录.

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

我个人所做的是启动Visual Studio 2019 Developer Command Prompt";并从那里执行 fsi,所以确切的位置并不重要.也许您可以通过调用相同的命令文件来编写类似的脚本?它在 ...Common7ToolsVsDevCmd.bat 中.

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.

这篇关于GithubActions CI Windows VM 不再有 fsi.exe 了吗?或者它改变了位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆