forked from mysql/mysql-for-vs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Nuget.proj
177 lines (128 loc) · 12.7 KB
/
Nuget.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<Project DefaultTargets="NugetPackage" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<OutputPathCore>NugetPkgs\$(Configuration)\MySql.Data</OutputPathCore>
<OutputPathCoreEF>NugetPkgs\$(Configuration)\MySql.Data.Entity</OutputPathCoreEF>
<OutputPathWeb>NugetPkgs\$(Configuration)\MySql.Web</OutputPathWeb>
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">Nuget\nuget.exe</NuGetExePath>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>
<Import Project="$(MSBuildExtensionsPath)\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks"/>
<Target Name="NugetPackage" DependsOnTargets="PackageClean;BuildNugetPackageMySqlData;BuildNugetPackageEntity;BuildNugetPackageMySqlDataWeb">
</Target>
<Target Name="PackageClean">
<RemoveDir Directories ="NugetPkgs\$(Configuration)" ContinueOnError ="true"/>
<RemoveDir Directories ="NugetPkgs" ContinueOnError ="true"/>
<MakeDir Directories="NugetPkgs" />
</Target>
<Target Name="BuildNugetPackageMySqlData">
<MakeDir Directories="$(OutputPathCore)" />
<MakeDir Directories="$(OutputPathCore)\Package" />
<MakeDir Directories="$(OutputPathCore)\lib\net40" />
<MakeDir Directories="$(OutputPathCore)\lib\net20" />
<MakeDir Directories="$(OutputPathCore)\lib\net20-cf" />
<Copy
DestinationFolder="$(OutputPathCore)\lib\net40"
SourceFiles="Source\MySql.Data\bin\$(Configuration)\MySql.data.dll" />
<Copy
DestinationFolder="$(OutputPathCore)\lib\net20"
SourceFiles="VS2008\Source\MySql.Data\bin\$(Configuration)\MySql.data.dll" />
<Copy
DestinationFolder="$(OutputPathCore)\lib\net20-cf"
SourceFiles="VS2008\Source\MySql.Data.CF\bin\$(Configuration)\MySql.Data.CF.dll" />
<Copy DestinationFolder="$(OutputPathCore)\content" SourceFiles="CHANGES" />
<Copy SourceFiles="Release Notes.txt" DestinationFiles="$(OutputPathCore)\Readme.txt" />
<Exec Command=""$(NuGetExePath)" spec -a "$(OutputPathCore)\lib\net40\mysql.data.dll"" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.nuspec" XPath="//package/metadata/licenseUrl" Value="http://www.mysql.com/about/legal/licensing/index.html" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.nuspec" XPath="//package/metadata/projectUrl" Value="http://www.mysql.com/downloads/connector/net/" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.nuspec" XPath="//package/metadata/iconUrl" Value="http://www.mysql.com/common/logos/logo-mysql-110x57.png" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.nuspec" XPath="//package/metadata/tags" Value="MySql MySql.Data" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.nuspec" XPath="//package/metadata/releaseNotes" Value="Review readme.txt for details." />
<ItemGroup>
<file Include="Source\MySql.Data\bin\$(Configuration)\MySql.Data.dll"/>
<file Include="VS2008\Source\MySql.Data\bin\$(Configuration)\MySql.Data.dll"/>
<file Include="VS2008\Source\MySql.Data.CF\bin\$(Configuration)\MySql.Data.CF.dll"/>
<file Include="$(OutputPathCore)\Readme.txt"/>
</ItemGroup>
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="RemoveElement" File="MySql.Data.nuspec" Element="dependencies" XPath="//package/metadata/dependencies" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddElement" File="MySql.Data.nuspec" Key="" Value="" Element="files" XPath="//package" InsertAfterXPath="//package" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddElement" File="MySql.Data.nuspec" Key="src" Value="%(file.Identity)" Element="file" XPath="//package/files" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddAttribute" File="MySql.Data.nuspec" XPath="//package/files/*[1]" Key="target" Value="lib\net40" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddAttribute" File="MySql.Data.nuspec" XPath="//package/files/*[2]" Key="target" Value="lib\net20" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddAttribute" File="MySql.Data.nuspec" XPath="//package/files/*[3]" Key="target" Value="lib\net20-cf"/>
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddAttribute" File="MySql.Data.nuspec" XPath="//package/files/*[4]" Key="target" Value=""/>
<Exec Command=""$(NuGetExePath)" pack MySql.Data.nuspec -OutputDirectory "$(OutputPathCore)\Package" -NoPackageAnalysis" />
<Delete Files ="MySql.Data.nuspec" />
</Target>
<Target Name="BuildNugetPackageEntity">
<MakeDir Directories="$(OutputPathCoreEF)" />
<MakeDir Directories="$(OutputPathCoreEF)\Package" />
<MakeDir Directories="$(OutputPathCoreEF)\lib\net40" />
<MakeDir Directories="$(OutputPathCoreEF)\lib\net20" />
<Copy
DestinationFolder="$(OutputPathCoreEF)\lib\net40"
SourceFiles="Source\MySql.Data.Entity\bin\$(Configuration)\MySql.Data.Entity.dll" />
<Copy
DestinationFolder="$(OutputPathCoreEF)\lib\net20"
SourceFiles="VS2008\Source\MySql.Data.Entity\bin\$(Configuration)\MySql.data.Entity.dll" />
<Copy DestinationFolder="$(OutputPathCoreEF)\content" SourceFiles="CHANGES" />
<Copy SourceFiles="Release Notes.txt" DestinationFiles="$(OutputPathCoreEF)\Readme.txt" />
<MSBuild.ExtensionPack.Framework.Assembly TaskAction="GetInfo" NetAssembly="Source\MySql.Data\bin\$(Configuration)\MySql.data.dll">
<Output TaskParameter="OutputItems" ItemName="Info"/>
</MSBuild.ExtensionPack.Framework.Assembly>
<Exec Command=""$(NuGetExePath)" spec -a "$(OutputPathCoreEF)\lib\net40\mySql.data.entity.dll"" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.Entity.nuspec" XPath="//package/metadata/dependencies/dependency/@id" Value="MySql.Data" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.Entity.nuspec" XPath="//package/metadata/dependencies/dependency/@version" Value="%(Info.AssemblyVersion)" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.Entity.nuspec" XPath="//package/metadata/licenseUrl" Value="http://www.mysql.com/about/legal/licensing/index.html" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.Entity.nuspec" XPath="//package/metadata/projectUrl" Value="http://www.mysql.com/downloads/connector/net/" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.Entity.nuspec" XPath="//package/metadata/iconUrl" Value="http://www.mysql.com/common/logos/logo-mysql-110x57.png" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.Entity.nuspec" XPath="//package/metadata/tags" Value="MySql MySql.Data.Entity" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Data.Entity.nuspec" XPath="//package/metadata/releaseNotes" Value="Review readme.txt for details." />
<ItemGroup>
<fileEF Include="Source\MySql.Data.Entity\bin\$(Configuration)\MySql.Data.Entity.dll"/>
<fileEF Include="VS2008\Source\MySql.Data.Entity\bin\$(Configuration)\MySql.Data.Entity.dll"/>
<fileEF Include="$(OutputPathCoreEF)\Readme.txt"/>
</ItemGroup>
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddElement" File="MySql.Data.Entity.nuspec" Key="" Value="" Element="files" XPath="//package" InsertAfterXPath="//package" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddElement" File="MySql.Data.Entity.nuspec" Key="src" Value="%(fileEF.Identity)" Element="file" XPath="//package/files" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddAttribute" File="MySql.Data.Entity.nuspec" XPath="//package/files/*[1]" Key="target" Value="lib\net40" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddAttribute" File="MySql.Data.Entity.nuspec" XPath="//package/files/*[2]" Key="target" Value="lib\net20" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddAttribute" File="MySql.Data.Entity.nuspec" XPath="//package/files/*[3]" Key="target" Value=""/>
<Exec Command=""$(NuGetExePath)" pack MySql.Data.Entity.nuspec -OutputDirectory "$(OutputPathCoreEF)\Package" -NoPackageAnalysis" />
<Delete Files ="MySql.Data.Entity.nuspec" />
</Target>
<Target Name="BuildNugetPackageMySqlDataWeb">
<MakeDir Directories="$(OutputPathWeb)" />
<MakeDir Directories="$(OutputPathWeb)\Package" />
<MakeDir Directories="$(OutputPathWeb)\lib\net40" />
<MakeDir Directories="$(OutputPathWeb)\lib\net20" />
<Copy
DestinationFolder="$(OutputPathWeb)\lib\net40"
SourceFiles="Source\MySql.Web\bin\$(Configuration)\MySql.Web.dll" />
<Copy
DestinationFolder="$(OutputPathWeb)\lib\net20"
SourceFiles="VS2008\Source\MySql.Web\bin\$(Configuration)\MySql.Web.dll" />
<Copy DestinationFolder="$(OutputPathWeb)\content" SourceFiles="CHANGES" />
<Copy SourceFiles="Release Notes.txt" DestinationFiles="$(OutputPathWeb)\Readme.txt" />
<Exec Command=""$(NuGetExePath)" spec -a "$(OutputPathWeb)\lib\net40\MySql.Web.dll"" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Web.nuspec" XPath="//package/metadata/dependencies/dependency/@id" Value="MySql.Data" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Web.nuspec" XPath="//package/metadata/dependencies/dependency/@version" Value="%(Info.AssemblyVersion)" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Web.nuspec" XPath="//package/metadata/licenseUrl" Value="http://www.mysql.com/about/legal/licensing/index.html" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Web.nuspec" XPath="//package/metadata/projectUrl" Value="http://www.mysql.com/downloads/connector/net/" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Web.nuspec" XPath="//package/metadata/iconUrl" Value="http://www.mysql.com/common/logos/logo-mysql-110x57.png" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Web.nuspec" XPath="//package/metadata/tags" Value="MySql MySql.Web" />
<XmlUpdate Namespace="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" XmlFileName="MySql.Web.nuspec" XPath="//package/metadata/releaseNotes" Value="Review readme.txt for details." />
<ItemGroup>
<fileweb Include="Source\MySql.Web\bin\$(Configuration)\MySql.Web.dll"/>
<fileweb Include="VS2008\Source\MySql.Web\bin\$(Configuration)\MySql.Web.dll"/>
<fileweb Include="$(OutputPathWeb)\Readme.txt"/>
</ItemGroup>
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddElement" File="MySql.Web.nuspec" Key="" Value="" Element="files" XPath="//package" InsertAfterXPath="//package" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddElement" File="MySql.Web.nuspec" Key="src" Value="%(fileweb.Identity)" Element="file" XPath="//package/files" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddAttribute" File="MySql.Web.nuspec" XPath="//package/files/*[1]" Key="target" Value="lib\net40" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddAttribute" File="MySql.Web.nuspec" XPath="//package/files/*[2]" Key="target" Value="lib\net20" />
<MSBuild.ExtensionPack.Xml.XmlFile TaskAction="AddAttribute" File="MySql.Web.nuspec" XPath="//package/files/*[3]" Key="target" Value=""/>
<Exec Command=""$(NuGetExePath)" pack MySql.Web.nuspec -OutputDirectory "$(OutputPathWeb)\Package" -NoPackageAnalysis" />
<Delete Files ="MySql.Web.nuspec" />
</Target>
</Project>