2011-02-16 20:16:07 +00:00
|
|
|
--
|
|
|
|
-- tests/actions/vstudio/cs2005/projectsettings.lua
|
|
|
|
-- Validate generation of root <PropertyGroup/> in Visual Studio 2005+ .csproj
|
2012-07-10 20:44:44 +00:00
|
|
|
-- Copyright (c) 2009-2012 Jason Perkins and the Premake project
|
2011-02-16 20:16:07 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
T.vstudio_cs2005_projectsettings = { }
|
|
|
|
local suite = T.vstudio_cs2005_projectsettings
|
|
|
|
local cs2005 = premake.vstudio.cs2005
|
|
|
|
|
|
|
|
|
|
|
|
--
|
2013-04-25 20:05:08 +00:00
|
|
|
-- Setup
|
2011-02-16 20:16:07 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
local sln, prj
|
2013-04-25 20:05:08 +00:00
|
|
|
|
2011-02-16 20:16:07 +00:00
|
|
|
function suite.setup()
|
2012-10-26 20:58:46 +00:00
|
|
|
_ACTION = "vs2005"
|
|
|
|
sln = test.createsolution()
|
2011-02-16 20:16:07 +00:00
|
|
|
language "C#"
|
2013-04-25 20:05:08 +00:00
|
|
|
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
2011-02-16 20:16:07 +00:00
|
|
|
end
|
2013-04-25 20:05:08 +00:00
|
|
|
|
2011-02-16 20:16:07 +00:00
|
|
|
local function prepare()
|
2012-10-26 20:58:46 +00:00
|
|
|
prj = premake.solution.getproject_ng(sln, 1)
|
2013-04-25 20:05:08 +00:00
|
|
|
cs2005.projectProperties(prj)
|
2011-02-16 20:16:07 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Version Tests
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.OnVs2005()
|
|
|
|
prepare()
|
|
|
|
test.capture [[
|
2012-07-10 20:44:44 +00:00
|
|
|
<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>
|
|
|
|
</PropertyGroup>
|
2011-02-16 20:16:07 +00:00
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function suite.OnVs2008()
|
|
|
|
_ACTION = "vs2008"
|
|
|
|
prepare()
|
|
|
|
test.capture [[
|
2012-07-10 20:44:44 +00:00
|
|
|
<PropertyGroup>
|
|
|
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
|
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
|
|
<ProductVersion>9.0.21022</ProductVersion>
|
|
|
|
<SchemaVersion>2.0</SchemaVersion>
|
|
|
|
<ProjectGuid>{AE61726D-187C-E440-BD07-2556188A6565}</ProjectGuid>
|
|
|
|
<OutputType>Exe</OutputType>
|
|
|
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
|
|
<RootNamespace>MyProject</RootNamespace>
|
|
|
|
<AssemblyName>MyProject</AssemblyName>
|
|
|
|
</PropertyGroup>
|
2011-02-16 20:16:07 +00:00
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function suite.OnVs2010()
|
|
|
|
_ACTION = "vs2010"
|
|
|
|
prepare()
|
|
|
|
test.capture [[
|
2012-07-10 20:44:44 +00:00
|
|
|
<PropertyGroup>
|
|
|
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
|
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
|
|
<ProductVersion>8.0.30703</ProductVersion>
|
|
|
|
<SchemaVersion>2.0</SchemaVersion>
|
|
|
|
<ProjectGuid>{AE61726D-187C-E440-BD07-2556188A6565}</ProjectGuid>
|
|
|
|
<OutputType>Exe</OutputType>
|
|
|
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
|
|
<RootNamespace>MyProject</RootNamespace>
|
|
|
|
<AssemblyName>MyProject</AssemblyName>
|
|
|
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
2012-09-27 14:15:27 +00:00
|
|
|
<TargetFrameworkProfile></TargetFrameworkProfile>
|
2012-07-10 20:44:44 +00:00
|
|
|
<FileAlignment>512</FileAlignment>
|
|
|
|
</PropertyGroup>
|
2011-02-16 20:16:07 +00:00
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Framework Tests
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.OnFrameworkVersion()
|
|
|
|
framework "3.0"
|
|
|
|
prepare()
|
|
|
|
test.capture [[
|
2012-07-10 20:44:44 +00:00
|
|
|
<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>
|
|
|
|
<TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
|
|
|
|
</PropertyGroup>
|
2011-02-16 20:16:07 +00:00
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2012-10-26 20:58:46 +00:00
|
|
|
--
|
|
|
|
-- Make sure the root namespace can be overridden.
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.canOverrideRootNamespace()
|
|
|
|
namespace "MyCompany.%{prj.name}"
|
|
|
|
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>MyCompany.MyProject</RootNamespace>
|
|
|
|
<AssemblyName>MyProject</AssemblyName>
|
|
|
|
</PropertyGroup>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|