SrejonKhan/AnotherFileBrowser

Error when building a project with this package on github actions

Closed this issue · 1 comments

I'm trying to use this package in a project, but it's failing to build on github action, with the following error:

[ 576/1043  0s] ILibrary/PackageCache/com.srejonkhan.another-file-browser@9a5882dde4/Runtime/FileBrowser.cs(2,7): error CS0246: The type or namespace name 'Ookii' could not be found (are you missing a using directive or an assembly reference?)

Library/PackageCache/com.srejonkhan.another-file-browser@9a5882dde4/Runtime/FileBrowser.cs(4,22): error CS0234: The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)

Library/PackageCache/com.srejonkhan.another-file-browser@9a5882dde4/Runtime/FileBrowser.cs(144,34): error CS0246: The type or namespace name 'IWin32Window' could not be found (are you missing a using directive or an assembly reference?)

Any idea why this happens? It works just fine when using it with the Unity editor locally, but for some reason it fails when building on github.

btw, Unity version 2021.3.24f1 and I'm not storing the Library folder on my github depot, so this is happening when Unity is creating the Library folder.

I found the problem. This package can only be built in a Windows machine, so github action needs to run on a Windows node, not the default Linux node that game-ci/unity-builder@v4 example uses.

If someone runs into this problem in the future, replace the line:

   runs-on: ubuntu-latest

by

    runs-on: windows-2022

And the error reported in this issue will not happen again.