diff --git a/src/_premake_init.lua b/src/_premake_init.lua index b446cd2e..46258aed 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -258,6 +258,7 @@ "Unicode", "Unsafe", "WinMain", + "WPF", }, aliases = { Optimise = 'Optimize', @@ -615,7 +616,7 @@ scope = "config", kind = "directory-list", tokens = true, - } + } api.register { name = "uuid", diff --git a/src/actions/vstudio/vs2005_csproj.lua b/src/actions/vstudio/vs2005_csproj.lua index 77cbb3e7..b14882df 100644 --- a/src/actions/vstudio/vs2005_csproj.lua +++ b/src/actions/vstudio/vs2005_csproj.lua @@ -82,6 +82,7 @@ "targetFrameworkVersion", "targetFrameworkProfile", "fileAlignment", + "projectTypeGuids", } function cs2005.projectProperties(prj) @@ -415,6 +416,13 @@ end + function cs2005.projectTypeGuids(cfg) + if cfg.flags.WPF then + _p(2,'{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}') + end + end + + function cs2005.rootNamespace(cfg) _p(2,'%s', cfg.namespace or cfg.buildtarget.basename) end diff --git a/src/base/project.lua b/src/base/project.lua index 5163a63d..d6fd1c69 100755 --- a/src/base/project.lua +++ b/src/base/project.lua @@ -149,8 +149,6 @@ -- function project.getconfig(prj, buildcfg, platform) - -- prj = premake.oven.bakeProject(prj, prj.solution) - -- if no build configuration is specified, return the "root" project -- configurations, which includes all configuration values that -- weren't set with a specific configuration filter diff --git a/tests/actions/vstudio/cs2005/projectsettings.lua b/tests/actions/vstudio/cs2005/projectsettings.lua index cc039823..fb4112d6 100755 --- a/tests/actions/vstudio/cs2005/projectsettings.lua +++ b/tests/actions/vstudio/cs2005/projectsettings.lua @@ -138,3 +138,31 @@ ]] end + +-- +-- WPF adds an additional element. +-- + + function suite.projectTypeGuids_onWPF() + _ACTION = "vs2010" + flags { "WPF" } + prepare() + test.capture [[ + + Debug + AnyCPU + 8.0.30703 + 2.0 + {AE61726D-187C-E440-BD07-2556188A6565} + Exe + Properties + MyProject + MyProject + v4.0 + + + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + + ]] + end