curiosity-ai/h5

H5 wont build in Jenkins with MSBUILD

Closed this issue · 2 comments

When I used Bridge.net i remember that i installed Bridge.net extension (in Visual Studio Manage Extensions) and Jenkins (running as LOCAL SYSTEM) build Bridge.net without problem.

When I using H5, i installed the H5 compiler with the Visual Studio Developer Promt with:
dotnet tool update --global h5-compiler
It installs and compiles directly in Visual Studio in the Jenkins server.

When I now build the project in Jenkins it tells me that the H5 is not installed. I am trying to run dotnet tool update in jenkins as bat command but I get strange errors like:
In an uninitialized command prompt, please 'set VSCMD_DEBUG=[value]' and then re-run

is there anyone who has used H5 in jenkins?

I got it to work now. I added this bat script before MSBuild is running for the Jenkins project:

REM Install H5 compiler, reinstall it if it already exist.
pushd "%ProgramFiles%\Microsoft Visual Studio\2022\Community\Common7\Tools\"
call VsDevCmd.bat
dotnet tool update --global h5-compiler

Now it seems to reinstall H5 everytime jenkins is building the project, but it works for now and it compiles.
If anyone has a better solution, let me know :)

Hi @Riccsson , that's exactly how we use it as well. You'll need to install the tool before building. It's also possible to use it as a local tool on your project, so it's usually installed automatically on package restore, but the practical effect is the same - i.e. no time savings from doing either way.