diff --git a/modules/vstudio/tests/cs2005/projectsettings.lua b/modules/vstudio/tests/cs2005/projectsettings.lua
index 1567d4a404..ebea7ce7c2 100644
--- a/modules/vstudio/tests/cs2005/projectsettings.lua
+++ b/modules/vstudio/tests/cs2005/projectsettings.lua
@@ -197,6 +197,30 @@
]]
end
+
+--
+-- Lang version tests
+--
+
+ function suite.OnCSVersion()
+ csversion "6"
+ prepare()
+ test.capture [[
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {AE61726D-187C-E440-BD07-2556188A6565}
+ Exe
+ Properties
+ MyProject
+ MyProject
+ 6
+
+ ]]
+ end
+
--
-- Make sure the root namespace can be overridden.
diff --git a/modules/vstudio/vs2005_csproj.lua b/modules/vstudio/vs2005_csproj.lua
index 158b9cce12..816f0fc533 100644
--- a/modules/vstudio/vs2005_csproj.lua
+++ b/modules/vstudio/vs2005_csproj.lua
@@ -44,7 +44,8 @@
dotnetbase.targetFrameworkProfile,
dotnetbase.fileAlignment,
dotnetbase.bindingRedirects,
- dotnetbase.projectTypeGuids
+ dotnetbase.projectTypeGuids,
+ dotnetbase.csversion
}
end
diff --git a/modules/vstudio/vs2005_dotnetbase.lua b/modules/vstudio/vs2005_dotnetbase.lua
index 785f76d774..21321a311a 100644
--- a/modules/vstudio/vs2005_dotnetbase.lua
+++ b/modules/vstudio/vs2005_dotnetbase.lua
@@ -687,7 +687,6 @@
end
end
-
function dotnetbase.targetFrameworkVersion(cfg)
local action = p.action.current()
local framework = cfg.dotnetframework or action.vstudio.targetFramework
@@ -696,6 +695,11 @@
end
end
+ function dotnetbase.csversion(cfg)
+ if cfg.csversion then
+ _p(2,'%s', cfg.csversion)
+ end
+ end
function dotnetbase.targetFrameworkProfile(cfg)
if _ACTION == "vs2010" then
diff --git a/src/_premake_init.lua b/src/_premake_init.lua
index 5d5643278c..b01763f5a8 100644
--- a/src/_premake_init.lua
+++ b/src/_premake_init.lua
@@ -590,6 +590,12 @@
kind = "string",
}
+ api.register {
+ name = "csversion",
+ scope = "config",
+ kind = "string",
+ }
+
api.register {
name = "gccprefix",
scope = "config",