Skip to content

Commit b9aab30

Browse files
committed
Fix fresh build and add AppVeyor config
1 parent 4c840f7 commit b9aab30

File tree

3 files changed

+25
-9
lines changed

3 files changed

+25
-9
lines changed

appveyor.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: '{build}'
2+
os: Visual Studio 2015
3+
install:
4+
- set PATH=%ProgramFiles(x86)%\MSBuild\14.0\Bin;%PATH%
5+
- dnvm update-self
6+
- dnvm install 1.0.0-beta7
7+
build:
8+
project: build.proj
9+
verbosity: normal
10+
test_script:
11+
- nunit-console.exe bin\ReleaseTests\React.Tests\React.Tests.dll
12+
artifacts:
13+
- path: output\*.nupkg

build.proj

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ of patent rights can be found in the PATENTS file in the same directory.
1616
<DevNuGetServer>http://reactjs.net/packages/</DevNuGetServer>
1717
<MSBuildCommunityTasksPath>$(MSBuildProjectDirectory)\tools\MSBuildTasks</MSBuildCommunityTasksPath>
1818
<PackageOutputDir>output</PackageOutputDir>
19+
<BuildType Condition="'$(BuildType)' == ''">Dev</BuildType>
1920

2021
<!-- Only build ASP.NET 5 projects if on MSBuild 14+ (VS2015+) -->
2122
<BuildAspNet5>false</BuildAspNet5>
@@ -39,11 +40,16 @@ of patent rights can be found in the PATENTS file in the same directory.
3940

4041
<Import Project="src/React.tasks.proj" />
4142

42-
<Target Name="RestorePackages">
43+
<Target Name="RestorePackages" DependsOnTargets="Clean">
4344
<Exec
4445
WorkingDirectory="$(MSBuildProjectDirectory)"
4546
Command="tools\NuGet\nuget.exe restore $(SolutionFile)"
4647
/>
48+
<!-- NuGet packages for ASP.NET 5 projects -->
49+
<Exec
50+
WorkingDirectory="$(MSBuildProjectDirectory)"
51+
Command="dnu restore --quiet --parallel"
52+
/>
4753
</Target>
4854

4955
<Target Name="UpdateVersion">
@@ -90,14 +96,11 @@ of patent rights can be found in the PATENTS file in the same directory.
9096
ASP.NET 5 projects don't delete generated .nupkg files when cleaned or rebuilt, so we need to
9197
do it here. See https://github.com/aspnet/XRE/issues/1301
9298
-->
93-
<ItemGroup>
94-
<OldAspNet5Packages Include="bin/%(PackageAssembliesAspNet5.Identity)/**/*.nupkg" />
95-
</ItemGroup>
96-
<Delete Files="@(OldAspNet5Packages)" />
99+
<DeleteTree Directories="src/artifacts" />
97100
</Target>
98101

99102
<Target Name="Build" DependsOnTargets="RestorePackages;UpdateVersion">
100-
<MSBuild Projects="$(SolutionFile)" Targets="Rebuild" Properties="Configuration=Release;Platform=Any CPU;NoWarn=1607" />
103+
<MSBuild Projects="$(SolutionFile)" Targets="Rebuild" Properties="Configuration=Release;Platform=Any CPU;NoWarn=1607,7035" />
101104
</Target>
102105

103106
<Target Name="ResetAspNetVersion" AfterTargets="Build">
@@ -143,7 +146,7 @@ of patent rights can be found in the PATENTS file in the same directory.
143146
<ItemGroup>
144147
<AspNet5Packages Include="bin/%(PackageAssembliesAspNet5.Identity)/Release/*.nupkg" />
145148
</ItemGroup>
146-
<Copy SourceFiles="@(AspNet5Packages)" DestinationFolder="output" />
149+
<Copy SourceFiles="@(AspNet5Packages)" DestinationFolder="$(PackageOutputDir)" />
147150
</Target>
148151

149152
<Target Name="Push">

dev-build.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@echo off
22
IF EXIST "%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" (
3-
"%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" build.proj /p:BuildType=Dev
3+
"%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" build.proj
44
) ELSE (
5-
"%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" build.proj /p:BuildType=Dev
5+
"%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" build.proj
66
)
77
pause

0 commit comments

Comments
 (0)