2012-01-12 21:59:15 +00:00
|
|
|
--
|
2012-07-23 21:21:06 +00:00
|
|
|
-- vs2005_csproj.lua
|
2017-08-30 18:35:42 +00:00
|
|
|
-- Generate a Visual Studio 2005+ C# project.
|
|
|
|
-- Copyright (c) Jason Perkins and the Premake project
|
2012-07-23 21:21:06 +00:00
|
|
|
--
|
|
|
|
|
2014-02-08 15:44:57 +00:00
|
|
|
local p = premake
|
2017-04-25 05:44:13 +00:00
|
|
|
p.vstudio.cs2005 = {}
|
|
|
|
|
2014-02-08 15:44:57 +00:00
|
|
|
local vstudio = p.vstudio
|
2017-08-30 18:35:42 +00:00
|
|
|
local cs2005 = p.vstudio.cs2005
|
|
|
|
local dotnetbase = p.vstudio.dotnetbase
|
2014-02-08 15:44:57 +00:00
|
|
|
local project = p.project
|
|
|
|
local config = p.config
|
|
|
|
local fileconfig = p.fileconfig
|
|
|
|
local dotnet = p.tools.dotnet
|
2012-07-23 21:21:06 +00:00
|
|
|
|
2013-04-25 20:05:08 +00:00
|
|
|
cs2005.elements = {}
|
|
|
|
|
2017-08-30 18:35:42 +00:00
|
|
|
cs2005.elements.project = function ()
|
2016-03-21 09:12:25 +00:00
|
|
|
return {
|
2017-08-30 18:35:42 +00:00
|
|
|
dotnetbase.xmlDeclaration,
|
|
|
|
dotnetbase.projectElement,
|
|
|
|
dotnetbase.commonProperties,
|
|
|
|
dotnetbase.projectProperties,
|
|
|
|
dotnetbase.configurations,
|
|
|
|
dotnetbase.applicationIcon,
|
|
|
|
dotnetbase.references
|
2016-03-21 09:12:25 +00:00
|
|
|
}
|
|
|
|
end
|
2012-10-10 15:09:51 +00:00
|
|
|
|
2017-08-30 18:35:42 +00:00
|
|
|
cs2005.elements.projectProperties = function ()
|
|
|
|
return {
|
|
|
|
dotnetbase.configurationCondition,
|
|
|
|
dotnetbase.platformCondition,
|
|
|
|
dotnetbase.productVersion,
|
|
|
|
dotnetbase.schemaVersion,
|
|
|
|
dotnetbase.projectGuid,
|
|
|
|
dotnetbase.outputType,
|
|
|
|
dotnetbase.appDesignerFolder,
|
|
|
|
dotnetbase.rootNamespace,
|
|
|
|
dotnetbase.assemblyName,
|
|
|
|
dotnetbase.targetFrameworkVersion,
|
|
|
|
dotnetbase.targetFrameworkProfile,
|
|
|
|
dotnetbase.fileAlignment,
|
|
|
|
dotnetbase.bindingRedirects,
|
2018-07-27 17:51:48 +00:00
|
|
|
dotnetbase.projectTypeGuids,
|
|
|
|
dotnetbase.csversion
|
2017-08-30 18:35:42 +00:00
|
|
|
}
|
2013-04-25 20:05:08 +00:00
|
|
|
end
|
|
|
|
|
2017-08-30 18:35:42 +00:00
|
|
|
cs2005.elements.configuration = function ()
|
|
|
|
return {
|
|
|
|
dotnetbase.propertyGroup,
|
|
|
|
dotnetbase.debugProps,
|
|
|
|
dotnetbase.outputProps,
|
2017-09-19 16:13:09 +00:00
|
|
|
dotnetbase.compilerProps,
|
|
|
|
dotnetbase.NoWarn
|
2017-08-30 18:35:42 +00:00
|
|
|
}
|
2013-04-25 20:05:08 +00:00
|
|
|
end
|
|
|
|
|
2017-08-30 18:35:42 +00:00
|
|
|
function cs2005.generate(prj)
|
|
|
|
dotnetbase.prepare(cs2005)
|
|
|
|
dotnetbase.generate(prj)
|
2013-04-25 20:05:08 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
function cs2005.targets(prj)
|
|
|
|
local bin = iif(_ACTION <= "vs2010", "MSBuildBinPath", "MSBuildToolsPath")
|
|
|
|
_p(1,'<Import Project="$(%s)\\Microsoft.CSharp.targets" />', bin)
|
|
|
|
_p(1,'<!-- To modify your build process, add your task inside one of the targets below and uncomment it.')
|
|
|
|
_p(1,' Other similar extension points exist, see Microsoft.Common.targets.')
|
|
|
|
_p(1,'<Target Name="BeforeBuild">')
|
|
|
|
_p(1,'</Target>')
|
|
|
|
_p(1,'<Target Name="AfterBuild">')
|
|
|
|
_p(1,'</Target>')
|
|
|
|
_p(1,'-->')
|
|
|
|
end
|