(:
* This template is only for generating csharp donet project files
*
* @PROJECT_NAME@ - name of the Visual Studio project
* @PROJECT_INPUT@ - input XML document that drives the script.
:)
declare boundary-space preserve;
declare function local:getProjects()
{
doc("@PROJECT_INPUT@")/projects/project[@name="@PROJECT_NAME@"]
};
declare function local:genDllProjects($project)
{
let $guid := $project/@guid/string()
let $path := $project/files/@path/string()
let $files := $project/files/file
let $AssemblyName := $project/AssemblyName/string()
let $DocumentationFile := $project/DocumentationFile/string()
return
Debug
AnyCPU
{"{"}{$guid}{"}"}
Library
false
{$AssemblyName}
BerkeleyDB
2.0
v2.0
publish\
true
Disk
false
Foreground
7
Days
false
false
true
0
1.0.0.%2a
false
false
true
true
full
false
..\..\..\build_windows\AnyCPU\Debug\
DEBUG;TRACE
true
{$DocumentationFile}
419
pdbonly
true
..\..\..\build_windows\AnyCPU\Release\
TRACE
{$DocumentationFile}
419
{ for $file in $files
return (, "
")
}
False
.NET Framework 2.0 %28x86%29
true
False
.NET Framework 3.0 %28x86%29
false
False
.NET Framework 3.5
false
};
declare function local:genAppProjects($project)
{
let $guid := $project/@guid/string()
let $files := $project/files/file
let $path := $project/files/@path/string()
let $projectName := $project/@name/string()
let $ProjectReference := $project/../ProjectReference
let $PreBuildEvent := $project/PreBuildEvent/string()
return
Debug
AnyCPU
8.0.50727
2.0
{"{"}{$guid}{"}"}
Exe
Properties
{$projectName}
{$projectName}
true
full
false
..\..\..\build_windows\AnyCPU\Debug\
DEBUG;TRACE
prompt
4
pdbonly
true
..\..\..\build_windows\AnyCPU\Release\
TRACE
prompt
4
{ for $file in $files
return (, "
")
}
{"{"}{$ProjectReference/@ProjectUID/string()}{"}"}
{$ProjectReference/@ProjectName/string()}
{$PreBuildEvent}
};
declare function local:genTestProjects($project)
{
let $guid := $project/@guid/string()
let $files := $project/files/file
let $path := $project/files/@path/string()
let $projectName := $project/@name/string()
let $ProjectReference := $project/ProjectReference
let $PreBuildEvent := $project/PreBuildEvent/string()
return
Debug
AnyCPU
8.0.50727
2.0
{"{"}{$guid}{"}"}
Library
Properties
DotNetTest
DotNetTest
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
pdbonly
true
bin\Release\
TRACE
prompt
4
{ for $file in $files
return
if (exists($file/@SubType)) then
({$file/@SubType/string()}, "
")
else
(, "
")
}
{"{"}{$ProjectReference/@ProjectUID/string()}{"}"}
{$ProjectReference/@ProjectName/string()}
{$PreBuildEvent}
};
for $project in local:getProjects()
return
if ($project/type[string()="dll"]) then
local:genDllProjects($project)
else if ($project/type[string()="app"]) then
local:genAppProjects($project)
else if ($project/type[string()="test"]) then
local:genTestProjects($project)
else()