1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+ <Project ToolsVersion =" 4.0" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
3
+ <!--
4
+ You Need to install Community Tasks for MSBuild to run any of this build script:
5
+ https://github.com/loresoft/msbuildtasks/releases
6
+ -->
7
+ <Import Project =" $(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
8
+
9
+ <PropertyGroup >
10
+ <!-- <geoAPIVersion Condition=" '$(geoApiVersion)' == '' ">1.7.4-pre</geoAPIVersion>-->
11
+ <fwVersion Condition =" '$(fwVersion)' == '' " >net40-client</fwVersion >
12
+ </PropertyGroup >
13
+
14
+ <!-- MOVED to GeoAPI.Reference.targets
15
+ <ItemGroup>
16
+ <Reference Include="GeoAPI">
17
+ <HintPath>$(MSBuildProjectDirectory)\..\packages\GeoAPI.$(geoAPIVersion)\lib\$(fwVersion)\GeoAPI.dll</HintPath>
18
+ </Reference>
19
+ </ItemGroup>
20
+ -->
21
+
22
+ <ItemGroup >
23
+ <File Include =" $(MSBuildProjectDirectory)\GeoAPI.version" />
24
+ </ItemGroup >
25
+
26
+ <Target Name =" ReadVersion" >
27
+
28
+ <ReadLinesFromFile File =" $(MSBuildProjectDirectory)\GeoAPI.version" >
29
+ <Output TaskParameter =" Lines" ItemName =" VersionInfo" />
30
+ </ReadLinesFromFile >
31
+ <Message Text =" File: $(MSBuildProjectDirectory)\GeoAPI.version
32
+ Version: @(VersionInfo)" />
33
+ </Target >
34
+
35
+
36
+ <PropertyGroup >
37
+ <n1 >$([System.String]::Concat("$(","MSBuildProjectDirectory",")"))</n1 >
38
+ <n2 >$([System.String]::Concat("$(","fwVersion",")"))</n2 >
39
+ </PropertyGroup >
40
+
41
+ <Target Name =" WriteVersion" Condition =" '$(geoAPIVersion)' != '' " >
42
+ <ItemGroup >
43
+ <gr Include =" < ?xml version=" 1.0" encoding=" utf-8" ?> " />
44
+ <gr Include =" < Project ToolsVersion=" 4.0" xmlns=" http://schemas.microsoft.com/developer/msbuild/2003"> " />
45
+ <gr Include =" < PropertyGroup> " />
46
+ <gr Include =" < fwVersion Condition=" '$(n2)' == '' "> net40-client< /fwVersion> " />
47
+ <gr Include =" < /PropertyGroup> " />
48
+ <gr Include =" < ItemGroup> " />
49
+ <gr Include =" < Reference Include=" GeoAPI"> " />
50
+ <gr Include =" < HintPath> $(n1)\..\packages\GeoAPI.$(geoAPIVersion)\lib\$(n2)\GeoAPI.dll< /HintPath> " />
51
+ <gr Include =" < /Reference> " />
52
+ <gr Include =" < /ItemGroup> " />
53
+ <gr Include =" < /Project> " />
54
+ <!--
55
+ <gr Include=""/>
56
+ -->
57
+ </ItemGroup >
58
+ <WriteLinesToFile File =" $(MSBuildProjectDirectory)\GeoAPI.version" Lines =" $(geoAPIVersion)" Overwrite =" true" />
59
+ <WriteLinesToFile File =" $(MSBuildProjectDirectory)\GeoAPI.Reference.targets" Lines =" @(gr)" Overwrite =" true" />
60
+ </Target >
61
+
62
+ <Target Name =" FindPC" >
63
+ <ItemGroup >
64
+ <pc Include =" $(MSBuildProjectDirectory)\..\**\packages.config" />
65
+ </ItemGroup >
66
+
67
+ <Message Text =" @(pc)" />
68
+ </Target >
69
+ </Project >
0 commit comments