I have small app called ‘Tactics and Strategy’, created with Monogame 3.5. I tried to create build on appveyor (see https://ci.appveyor.com/project/siudeks/tactics-and-strategy/build/1.0.1) and there is an issue with MonoGame.Content.Builder.targets" was not found
Any idea how to fix it?
My aplication sources available at https://github.com/siudeks/tactics-and-strategy
The .targets file is installed with MonoGame, and is also available in the source. I don’t know how you would make a custom .targets file work with Appveyor.
So generally isn’t possible to compile my solution (and any other project created with monogame) without installing Monogame?
I was having the same issue and I found a way around it but it requires you to build your assets with the pipeline separately.
The issue boils down to the line at the bottom of your project file. That is what kicks off the Monogame stuff to compile your assets. Without the Monogame SDK installed on the CI server it won’t have the tools to do the compilation. So the solution I am using is to comment that line out and just add the .xnb files that the pipeline tool creates to the project.
Steps are as follows:
- Remove/comment out from your .csproj file
- Build your assets using the Monogame pipelline tool to generate the .xnb files.
- Under your Content folder in your project add all of the compiled .xnb files.
- Make sure you set Copy to Output Directory to Copy Always so they end up in the right place when you compile that app
- Make sure your .xnb files are in your version control so they end up on the CI server if you do it that way
That allowed for the CI server to build my project. Its a small inconvience to have to rebuild the files and add them in both the pipeline tool and your project but I can deal with it until something better comes along.
Hope this helps!