@@ -15,7 +15,7 @@ of patent rights can be found in the PATENTS file in the same directory.
1515 <Revision >0</Revision >
1616 <DevNuGetServer >http://reactjs.net/packages/</DevNuGetServer >
1717 <MSBuildCommunityTasksPath >$(MSBuildProjectDirectory)\tools\MSBuildTasks</MSBuildCommunityTasksPath >
18- <PackageOutputDir >output</PackageOutputDir >
18+ <PackageOutputDir >$(MSBuildProjectDirectory)\ output</PackageOutputDir >
1919 <BuildType Condition =" '$(BuildType)' == ''" >Dev</BuildType >
2020
2121 <SolutionFile >src\React.sln</SolutionFile >
@@ -31,18 +31,18 @@ of patent rights can be found in the PATENTS file in the same directory.
3131 <PackageAssemblies Include =" System.Web.Optimization.React" />
3232 </ItemGroup >
3333
34- <Import Project =" src/React.tasks.proj " />
35-
36- <Target Name =" RestorePackages" DependsOnTargets =" Clean" >
37- <!-- NuGet packages for .xproj projects -->
34+ <Import Project =" $(MSBuildProjectDirectory)\tools\MSBuildTasks\MSBuild.Community.Tasks.Targets " />
35+
36+ <Target Name =" RestorePackages" DependsOnTargets =" Clean;UpdateVersion " >
37+ <!-- NuGet packages for "legacy" projects (eg. React.Samples.Mvc4) -->
3838 <Exec
3939 WorkingDirectory=" $(MSBuildProjectDirectory)"
40- Command=" dotnet restore"
40+ Command=" tools\NuGet\nuget.exe restore $(SolutionFile) "
4141 />
42- <!-- NuGet packages for "legacy" projects (eg. React.Samples.Mvc4) -->
42+ <!-- NuGet packages for modern .csproj projects -->
4343 <Exec
4444 WorkingDirectory=" $(MSBuildProjectDirectory)"
45- Command=" tools\NuGet\nuget.exe restore $(SolutionFile)"
45+ Command=" dotnet restore $(SolutionFile) /p:Version=$(VersionString )"
4646 />
4747 <!-- npm packages -->
4848 <Exec
@@ -64,25 +64,18 @@ of patent rights can be found in the PATENTS file in the same directory.
6464 </Time >
6565 <!-- Prepend date to build version if a dev build-->
6666 <PropertyGroup Condition =" $(BuildType) == 'Release'" >
67- <BuildSuffix ></BuildSuffix >
68- <BuildWithSuffix >$(Build)</BuildWithSuffix >
67+ <VersionString >$(Major).$(Minor).$(Build)</VersionString >
6968 </PropertyGroup >
7069 <PropertyGroup Condition =" $(BuildType) != 'Release'" >
71- <BuildSuffix >dev-$(Date)</BuildSuffix >
72- <BuildWithSuffix >$(Build)-$(BuildSuffix)</BuildWithSuffix >
70+ <VersionString >$(Major).$(Minor).$(Build)-dev-$(Date)</VersionString >
7371 </PropertyGroup >
7472 <!-- Set version for assemblies -->
7573 <AssemblyInfo
7674 CodeLanguage=" CS"
7775 OutputFile=" src\SharedAssemblyVersionInfo.cs"
7876 AssemblyVersion=" $(Major).$(Minor)"
79- AssemblyFileVersion=" $(Major).$(Minor).$(BuildWithSuffix).$(Revision)"
80- AssemblyInformationalVersion=" $(Major).$(Minor).$(BuildWithSuffix)"
81- />
82- <!-- Ensure version numbers in project.json files are in sync -->
83- <UpdateAspNetProjectVersion
84- Files=" src/%(PackageAssemblies.Identity)/project.json"
85- Version=" $(Major).$(Minor).$(Build)-*"
77+ AssemblyFileVersion=" $(VersionString).$(Revision)"
78+ AssemblyInformationalVersion=" $(VersionString)"
8679 />
8780 </Target >
8881
@@ -97,14 +90,14 @@ of patent rights can be found in the PATENTS file in the same directory.
9790
9891 <Target Name =" Build" DependsOnTargets =" RestorePackages;UpdateVersion" >
9992 <Exec WorkingDirectory =" src/React.Core" Command =" node_modules/.bin/gulp" />
100- <MSBuild Projects =" $(SolutionFile)" Targets =" Rebuild" Properties =" Configuration=Release;Platform=Any CPU;NoWarn=1607,7035" />
93+ <MSBuild Projects =" $(SolutionFile)" Targets =" Rebuild" Properties =" Configuration=Release;Platform=Any CPU;NoWarn=1607,7035,1701;Version=$(VersionString) " />
10194 <Exec WorkingDirectory =" src/React.Sample.Webpack" Command =" node_modules/.bin/webpack" />
10295 </Target >
10396
10497 <Target Name =" Test" DependsOnTargets =" Build" >
10598 <Exec
10699 WorkingDirectory=" $(MSBuildProjectDirectory)"
107- Command=" dotnet test --configuration Release --no-build tests/React.Tests"
100+ Command=" dotnet test --configuration Release --no-build tests/React.Tests/React.Tests.csproj "
108101 />
109102 </Target >
110103
@@ -116,7 +109,7 @@ of patent rights can be found in the PATENTS file in the same directory.
116109 <MakeDir Directories =" $(PackageOutputDir)" />
117110 <Exec
118111 WorkingDirectory=" $(MSBuildProjectDirectory)"
119- Command=" dotnet pack --output $(PackageOutputDir) --configuration Release --version-suffix $(BuildSuffix) -- no-build src/%(PackageAssemblies.Identity)"
112+ Command=" dotnet pack --output $(PackageOutputDir) --configuration Release --no-build src/%(PackageAssemblies.Identity) /p:Version=$(VersionString )"
120113 />
121114 </Target >
122115
0 commit comments