diff --git a/src/_premake_init.lua b/src/_premake_init.lua
index e1990829..f3d6e8d9 100644
--- a/src/_premake_init.lua
+++ b/src/_premake_init.lua
@@ -549,7 +549,7 @@
}
api.register {
- name = "framework",
+ name = "dotnetframework",
scope = "config",
kind = "string",
}
@@ -1073,6 +1073,7 @@
api.alias("buildoutputs", "buildOutputs")
api.alias("cleanextensions", "cleanExtensions")
api.alias("configfile", "configFile")
+ api.alias("dotnetframework", "framework")
api.alias("editandcontinue", "editAndContinue")
api.alias("fileextension", "fileExtension")
api.alias("propertydefinition", "propertyDefinition")
diff --git a/src/actions/vstudio/vs2005_csproj.lua b/src/actions/vstudio/vs2005_csproj.lua
index 53dae303..8ffdb6e5 100644
--- a/src/actions/vstudio/vs2005_csproj.lua
+++ b/src/actions/vstudio/vs2005_csproj.lua
@@ -480,7 +480,7 @@
function cs2005.targetFrameworkVersion(cfg)
local action = premake.action.current()
- local framework = cfg.framework or action.vstudio.targetFramework
+ local framework = cfg.dotnetframework or action.vstudio.targetFramework
if framework then
_p(2,'v%s', framework)
end
diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua
index bb0330a4..ce8453fc 100644
--- a/src/actions/vstudio/vs2010_vcxproj.lua
+++ b/src/actions/vstudio/vs2010_vcxproj.lua
@@ -110,7 +110,7 @@
local action = p.action.current()
local tools = string.format(' ToolsVersion="%s"', action.vstudio.toolsVersion)
- local framework = prj.framework or action.vstudio.targetFramework or "4.0"
+ local framework = prj.dotnetframework or action.vstudio.targetFramework or "4.0"
p.w('v%s', framework)
end
diff --git a/tests/actions/vstudio/cs2005/projectsettings.lua b/tests/actions/vstudio/cs2005/projectsettings.lua
index 6cb833dc..e1bd8513 100755
--- a/tests/actions/vstudio/cs2005/projectsettings.lua
+++ b/tests/actions/vstudio/cs2005/projectsettings.lua
@@ -135,6 +135,26 @@
end
+ function suite.OnDotNetFrameworkVersion()
+ dotnetframework "3.0"
+ prepare()
+ test.capture [[
+
+ Debug
+ AnyCPU
+ 8.0.50727
+ 2.0
+ {AE61726D-187C-E440-BD07-2556188A6565}
+ Exe
+ Properties
+ MyProject
+ MyProject
+ v3.0
+
+ ]]
+ end
+
+
--
-- Make sure the root namespace can be overridden.
--
diff --git a/tests/actions/vstudio/vc2010/test_globals.lua b/tests/actions/vstudio/vc2010/test_globals.lua
index 2aa3bdb2..127ce92b 100755
--- a/tests/actions/vstudio/vc2010/test_globals.lua
+++ b/tests/actions/vstudio/vc2010/test_globals.lua
@@ -65,7 +65,7 @@
function suite.frameworkVersionIsCorrect_onSpecificVersion()
clr "On"
- framework "4.5"
+ dotnetframework "4.5"
prepare()
test.capture [[