I am trying to build a .net 4.8.1 solution using msbuild with github actions and run it locally on my mac M1 using nektos/act.
When I execute the step Actions/setup-dotnet@v3 to setup .NET core it works.
When I execute the step microsoft/[email protected] to setup msbuild, it FAILS!.
error: ##[error]MSBuild.exe only works for Windows. I have tried various options, but none work.
Please advise.
on:
workflow_dispatch
jobs:
BuildOnWindows:
runs-on: windows-latest #windows-2019
env:
RUNNER_OS: x64
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: 'Test os'
run: echo $RUNNER_OS
# Other build steps for Windows
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x' # Specify the .NET SDK version you need
- name: Add msbuild to PATH
uses: microsoft/[email protected]
with:
#msbuild-architecture: arm64 #x64
vs-version: '[15.1]'```