@@ -10,7 +10,7 @@ of patent rights can be found in the PATENTS file in the same directory.
1010<Project ToolsVersion =" 4.0" DefaultTargets =" Build;Test;Package" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
1111 <PropertyGroup >
1212 <Major >2</Major >
13- <Minor >5 </Minor >
13+ <Minor >6 </Minor >
1414 <Build >0</Build >
1515 <Revision >0</Revision >
1616 <DevNuGetServer >http://reactjs.net/packages/</DevNuGetServer >
@@ -21,30 +21,28 @@ of patent rights can be found in the PATENTS file in the same directory.
2121 <SolutionFile >src\React.sln</SolutionFile >
2222 </PropertyGroup >
2323 <ItemGroup >
24+ <PackageAssemblies Include =" Cassette.React" />
25+ <PackageAssemblies Include =" React.AspNet" />
2426 <PackageAssemblies Include =" React.Core" />
27+ <PackageAssemblies Include =" React.MSBuild" />
28+ <PackageAssemblies Include =" React.Owin" />
2529 <PackageAssemblies Include =" React.Web" />
2630 <PackageAssemblies Include =" React.Web.Mvc4" />
2731 <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" />
3532 </ItemGroup >
3633
3734 <Import Project =" src/React.tasks.proj" />
3835
3936 <Target Name =" RestorePackages" DependsOnTargets =" Clean" >
37+ <!-- NuGet packages for .xproj projects -->
4038 <Exec
4139 WorkingDirectory=" $(MSBuildProjectDirectory)"
42- Command=" tools\NuGet\nuget.exe restore $(SolutionFile) "
40+ Command=" dotnet restore"
4341 />
44- <!-- NuGet packages for ASP.NET Core projects -->
42+ <!-- NuGet packages for "legacy" projects (eg. React.Samples.Mvc4) -->
4543 <Exec
4644 WorkingDirectory=" $(MSBuildProjectDirectory)"
47- Command=" dotnet restore src\React.AspNet src\React.Sample.Mvc6 "
45+ Command=" tools\NuGet\nuget.exe restore $(SolutionFile) "
4846 />
4947 <!-- npm packages -->
5048 <Exec
@@ -66,32 +64,23 @@ of patent rights can be found in the PATENTS file in the same directory.
6664 </Time >
6765 <!-- Prepend date to build version if a dev build-->
6866 <PropertyGroup Condition =" $(BuildType) == 'Release'" >
69- <FullBuild >$(Build)</ FullBuild >
67+ <BuildSuffix ></ BuildSuffix >
7068 </PropertyGroup >
7169 <PropertyGroup Condition =" $(BuildType) != 'Release'" >
72- <FullBuild >$(Build)- dev-$(Date)</FullBuild >
70+ <BuildSuffix > dev-$(Date)</BuildSuffix >
7371 </PropertyGroup >
74- <!-- Set version for .csproj projects -->
72+ <!-- Set version for assemblies -->
7573 <AssemblyInfo
7674 CodeLanguage=" CS"
7775 OutputFile=" src\SharedAssemblyVersionInfo.cs"
7876 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 )"
8179 />
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 -->
9281 <UpdateAspNetProjectVersion
93- Files=" @(AspNetCoreProjectJson) "
94- Version=" $(Major).$(Minor).$(FullBuild) "
82+ Files=" src/%(PackageAssemblies.Identity)/project.json "
83+ Version=" $(Major).$(Minor).$(Build)-* "
9584 />
9685 </Target >
9786
@@ -101,7 +90,7 @@ of patent rights can be found in the PATENTS file in the same directory.
10190 do it here. See https://github.com/aspnet/XRE/issues/1301
10291 -->
10392 <DeleteTree Directories =" src/artifacts" />
104- <DeleteTree Directories =" bin /%(PackageAssembliesAspNetCore .Identity)/Release " />
93+ <DeleteTree Directories =" src /%(PackageAssemblies .Identity)/bin " />
10594 </Target >
10695
10796 <Target Name =" Build" DependsOnTargets =" RestorePackages;UpdateVersion" >
@@ -110,48 +99,22 @@ of patent rights can be found in the PATENTS file in the same directory.
11099 <Exec WorkingDirectory =" src/React.Sample.Webpack" Command =" node_modules/.bin/webpack" />
111100 </Target >
112101
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-
121102 <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"
136106 />
137107 </Target >
138108
139- <Target Name =" Package" DependsOnTargets =" Build;GenerateNuSpecs " >
109+ <Target Name =" Package" DependsOnTargets =" Build" >
140110 <!-- Delete old packages -->
141111 <RemoveDir Directories =" $(PackageOutputDir)" />
142112
143113 <!-- Create new packages -->
144114 <MakeDir Directories =" $(PackageOutputDir)" />
145115 <Exec
146116 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)"
155118 />
156119 </Target >
157120
0 commit comments