Support for CSDialect

This commit is contained in:
thwatson 2018-07-27 10:51:48 -07:00 committed by Manu Evans
parent fec912ddac
commit e152b8ba85
4 changed files with 37 additions and 2 deletions

View File

@ -197,6 +197,30 @@
]]
end
--
-- Lang version tests
--
function suite.OnCSVersion()
csversion "6"
prepare()
test.capture [[
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{AE61726D-187C-E440-BD07-2556188A6565}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyProject</RootNamespace>
<AssemblyName>MyProject</AssemblyName>
<LangVersion>6</LangVersion>
</PropertyGroup>
]]
end
--
-- Make sure the root namespace can be overridden.

View File

@ -44,7 +44,8 @@
dotnetbase.targetFrameworkProfile,
dotnetbase.fileAlignment,
dotnetbase.bindingRedirects,
dotnetbase.projectTypeGuids
dotnetbase.projectTypeGuids,
dotnetbase.csversion
}
end

View File

@ -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,'<LangVersion>%s</LangVersion>', cfg.csversion)
end
end
function dotnetbase.targetFrameworkProfile(cfg)
if _ACTION == "vs2010" then

View File

@ -590,6 +590,12 @@
kind = "string",
}
api.register {
name = "csversion",
scope = "config",
kind = "string",
}
api.register {
name = "gccprefix",
scope = "config",