I am trying to create a premake5.lua file for a Visual-Studio C# MonoGame project. I want to be able to make premake use the MonoGame project-template, instead of me having to manually dig through all the stuff that template creates for me and then putting that into premake. Currently I have the following premake5.lua file, which produces a project that compiles but has exceptions when running it...
workspace "TilemapEditor"
architecture "x86"
startproject "TilemapEditor"
configurations
{
"Debug",
"Release",
"Distribution"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
project "TilemapEditor"
location "TilemapEditor"
kind "WindowedApp"
language "C#"
links {"MonoGame.Framework", "System", "System.Windows.Forms", "System.Xml"}
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files { "%{prj.name}/src/**.cs", "Properties/AssemblyInfo.cs" }
defines { "WINDOWS" }
dotnetframework ("4.5")
filter "configurations:Debug"
symbols "On"
filter "configurations:Release"
symbols "Off"
I haven't found any function in the premake wiki that can do this.