@@ -10,7 +10,7 @@ of patent rights can be found in the PATENTS file in the same directory.
10
10
<Project ToolsVersion =" 4.0" DefaultTargets =" Build;Test;Package" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
11
11
<PropertyGroup >
12
12
<Major >2</Major >
13
- <Minor >5 </Minor >
13
+ <Minor >6 </Minor >
14
14
<Build >0</Build >
15
15
<Revision >0</Revision >
16
16
<DevNuGetServer >http://reactjs.net/packages/</DevNuGetServer >
@@ -21,30 +21,28 @@ of patent rights can be found in the PATENTS file in the same directory.
21
21
<SolutionFile >src\React.sln</SolutionFile >
22
22
</PropertyGroup >
23
23
<ItemGroup >
24
+ <PackageAssemblies Include =" Cassette.React" />
25
+ <PackageAssemblies Include =" React.AspNet" />
24
26
<PackageAssemblies Include =" React.Core" />
27
+ <PackageAssemblies Include =" React.MSBuild" />
28
+ <PackageAssemblies Include =" React.Owin" />
25
29
<PackageAssemblies Include =" React.Web" />
26
30
<PackageAssemblies Include =" React.Web.Mvc4" />
27
31
<PackageAssemblies Include =" System.Web.Optimization.React" />
28
- <PackageAssemblies Include =" Cassette.React" />
29
- <PackageAssemblies Include =" React.MSBuild" />
30
- <PackageAssemblies Include =" React.Owin" />
31
- <PackageAssembliesAspNetCore Include =" React.AspNet" />
32
- <AspNetCoreProjectJson Include =" src/wrap/**/project.json" />
33
- <AspNetCoreProjectJson Include =" src/React.AspNet/project.json" />
34
- <AspNetCoreProjectJson Include =" src/React.Sample.Mvc6/project.json" />
35
32
</ItemGroup >
36
33
37
34
<Import Project =" src/React.tasks.proj" />
38
35
39
36
<Target Name =" RestorePackages" DependsOnTargets =" Clean" >
37
+ <!-- NuGet packages for .xproj projects -->
40
38
<Exec
41
39
WorkingDirectory=" $(MSBuildProjectDirectory)"
42
- Command=" tools\NuGet\nuget.exe restore $(SolutionFile) "
40
+ Command=" dotnet restore"
43
41
/>
44
- <!-- NuGet packages for ASP.NET Core projects -->
42
+ <!-- NuGet packages for "legacy" projects (eg. React.Samples.Mvc4) -->
45
43
<Exec
46
44
WorkingDirectory=" $(MSBuildProjectDirectory)"
47
- Command=" dotnet restore src\React.AspNet src\React.Sample.Mvc6 "
45
+ Command=" tools\NuGet\nuget.exe restore $(SolutionFile) "
48
46
/>
49
47
<!-- npm packages -->
50
48
<Exec
@@ -66,32 +64,23 @@ of patent rights can be found in the PATENTS file in the same directory.
66
64
</Time >
67
65
<!-- Prepend date to build version if a dev build-->
68
66
<PropertyGroup Condition =" $(BuildType) == 'Release'" >
69
- <FullBuild >$(Build)</ FullBuild >
67
+ <BuildSuffix ></ BuildSuffix >
70
68
</PropertyGroup >
71
69
<PropertyGroup Condition =" $(BuildType) != 'Release'" >
72
- <FullBuild >$(Build)- dev-$(Date)</FullBuild >
70
+ <BuildSuffix > dev-$(Date)</BuildSuffix >
73
71
</PropertyGroup >
74
- <!-- Set version for .csproj projects -->
72
+ <!-- Set version for assemblies -->
75
73
<AssemblyInfo
76
74
CodeLanguage=" CS"
77
75
OutputFile=" src\SharedAssemblyVersionInfo.cs"
78
76
AssemblyVersion=" $(Major).$(Minor)"
79
- AssemblyFileVersion=" $(Major).$(Minor).$(FullBuild ).$(Revision)"
80
- AssemblyInformationalVersion=" $(Major).$(Minor).$(FullBuild )"
77
+ AssemblyFileVersion=" $(Major).$(Minor).$(Build)$(BuildSuffix ).$(Revision)"
78
+ AssemblyInformationalVersion=" $(Major).$(Minor).$(Build)$(BuildSuffix )"
81
79
/>
82
- <!--
83
- Set version for ASP.NET Core projects. In theory K_BUILD_VERSION should work but it doesn't seem
84
- to be functional yet :(. We work around this by physically writing the build number to the
85
- project.json files. For development builds we write the full version number (including
86
- build date) and reset it later so the dev build number isn't commited to the repo.
87
- -->
88
- <!-- SetEnvironmentVariable
89
- Name="K_BUILD_VERSION"
90
- Value="$(Build)"
91
- /-->
80
+ <!-- Ensure version numbers in project.json files are in sync -->
92
81
<UpdateAspNetProjectVersion
93
- Files=" @(AspNetCoreProjectJson) "
94
- Version=" $(Major).$(Minor).$(FullBuild) "
82
+ Files=" src/%(PackageAssemblies.Identity)/project.json "
83
+ Version=" $(Major).$(Minor).$(Build)-* "
95
84
/>
96
85
</Target >
97
86
@@ -101,7 +90,7 @@ of patent rights can be found in the PATENTS file in the same directory.
101
90
do it here. See https://github.com/aspnet/XRE/issues/1301
102
91
-->
103
92
<DeleteTree Directories =" src/artifacts" />
104
- <DeleteTree Directories =" bin /%(PackageAssembliesAspNetCore .Identity)/Release " />
93
+ <DeleteTree Directories =" src /%(PackageAssemblies .Identity)/bin " />
105
94
</Target >
106
95
107
96
<Target Name =" Build" DependsOnTargets =" RestorePackages;UpdateVersion" >
@@ -110,48 +99,22 @@ of patent rights can be found in the PATENTS file in the same directory.
110
99
<Exec WorkingDirectory =" src/React.Sample.Webpack" Command =" node_modules/.bin/webpack" />
111
100
</Target >
112
101
113
- <Target Name =" ResetAspNetVersion" AfterTargets =" AspNetPackages" >
114
- <!-- Resets the version number in ASP.NET Core project.json files so we don't commit -dev- version numbers -->
115
- <UpdateAspNetProjectVersion
116
- Files=" @(AspNetCoreProjectJson)"
117
- Version=" $(Major).$(Minor).$(Build)-*"
118
- />
119
- </Target >
120
-
121
102
<Target Name =" Test" DependsOnTargets =" Build" >
122
- <ItemGroup >
123
- <TestAssemblies Include =" bin/ReleaseTests/**/React.Tests*.dll" />
124
- </ItemGroup >
125
- <NUnit
126
- ToolPath=" src\packages\NUnit.Runners.2.6.3\tools"
127
- Assemblies=" @(TestAssemblies)"
128
- />
129
- </Target >
130
-
131
- <Target Name =" GenerateNuSpecs" >
132
- <TransformXml
133
- Source=" src/template.nuspec"
134
- Transform=" src/%(PackageAssemblies.Identity)/%(PackageAssemblies.Identity).nutrans"
135
- Destination=" src/%(PackageAssemblies.Identity)/%(PackageAssemblies.Identity).nuspec"
103
+ <Exec
104
+ WorkingDirectory=" $(MSBuildProjectDirectory)"
105
+ Command=" dotnet test --configuration Release --no-build tests/React.Tests"
136
106
/>
137
107
</Target >
138
108
139
- <Target Name =" Package" DependsOnTargets =" Build;GenerateNuSpecs " >
109
+ <Target Name =" Package" DependsOnTargets =" Build" >
140
110
<!-- Delete old packages -->
141
111
<RemoveDir Directories =" $(PackageOutputDir)" />
142
112
143
113
<!-- Create new packages -->
144
114
<MakeDir Directories =" $(PackageOutputDir)" />
145
115
<Exec
146
116
WorkingDirectory=" $(MSBuildProjectDirectory)"
147
- Command=" tools\NuGet\nuget.exe pack src/%(PackageAssemblies.Identity)/%(PackageAssemblies.Identity).csproj -IncludeReferencedProjects -Symbols -Prop Configuration=Release -OutputDirectory output"
148
- />
149
- </Target >
150
-
151
- <Target Name =" AspNetPackages" AfterTargets =" Package" >
152
- <Exec
153
- WorkingDirectory=" $(MSBuildProjectDirectory)"
154
- Command=" dotnet pack --output $(PackageOutputDir) --build-base-path bin/ --configuration Release --no-build src/%(PackageAssembliesAspNetCore.Identity)/project.json"
117
+ Command=" dotnet pack --output $(PackageOutputDir) --configuration Release --version-suffix $(BuildSuffix) --no-build src/%(PackageAssemblies.Identity)"
155
118
/>
156
119
</Target >
157
120
0 commit comments