diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000..33eceafc --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,18 @@ +init: + - git config --global core.autocrlf true +branches: + only: + - dev + - /^(.*\/)?ci-.*$/ + - /^rel\/.*/ +configuration: + CodeAnalysis + Release +matrix: + fast_finish: true +build_script: + - cmd: .\build.cmd BuildPackages /P:Configuration=$(configuration) +clone_depth: 1 +test: off +deploy: off +os: Visual Studio 2017 diff --git a/.gitignore b/.gitignore index 5959320d..a43d7d4e 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ _[Ss]cripts *.dot[Cc]over *.pubxml *.zip +*launchSettings.json diff --git a/.nuget/packages.config b/.nuget/packages.config index 87036a1b..b297e3c6 100644 --- a/.nuget/packages.config +++ b/.nuget/packages.config @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..a9a61ca7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: csharp +sudo: false +dist: trusty +mono: none +os: + - linux +branches: + only: + - not.a.branch +script: + - echo Skipping builds for now. diff --git a/README.md b/README.md index d5ebc839..fc37f559 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Microsoft ASP.NET WebHooks +AppVeyor: [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/aspnet/webhooks?branch=dev&svg=true)](https://ci.appveyor.com/project/aspnetci/webhooks/branch/dev) + ASP.NET Web Hooks provide support for sending and receiving WebHooks. -Please see the blog [Introducing Microsoft ASP.NET WebHooks Preview](http://blogs.msdn.com/b/webdev/archive/2015/09/04/introducing-microsoft-asp-net-webhooks-preview.aspx) +Please see the blog [Introducing Microsoft ASP.NET WebHooks Preview](http://blogs.msdn.com/b/webdev/archive/2015/09/04/introducing-microsoft-asp-net-webhooks-preview.aspx) for an introduction to Microsoft ASP.NET WebHooks. Please see the initial [documentation](http://go.microsoft.com/fwlink/?LinkId=690277) for details. diff --git a/WebHooks.msbuild b/WebHooks.msbuild index 90007100..3d1cd47d 100644 --- a/WebHooks.msbuild +++ b/WebHooks.msbuild @@ -11,7 +11,7 @@ true true false - $(MSBuildThisFileDirectory)bin\$(Configuration)\test\TestResults\ + $(MSBuildThisFileDirectory)bin\Test\$(Configuration)\TestResults\ $(MSBuildThisFileDirectory)packages\Microsoft.Web.SkipStrongNames.1.0.0\tools\SkipStrongNames.exe $(MSBuildThisFileDirectory)tools\SkipStrongNames.xml .nuget\NuGet.exe @@ -101,7 +101,7 @@ - + TestAssembly=%(TestDLLsXunit.FullPath);XmlPath=$(TestResultsDirectory)%(TestDLLsXunit.FileName)-XunitResults.xml diff --git a/build.cmd b/build.cmd index d500b9ec..f50ed0cc 100644 --- a/build.cmd +++ b/build.cmd @@ -7,12 +7,32 @@ mkdir bin :Build -REM Find the most recent 32bit MSBuild.exe on the system. Require v12.0 (installed with VS2013) or later since .NET 4.0 -REM is not supported. Always quote the %MSBuild% value when setting the variable and never quote %MSBuild% references. -set MSBuild="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" -if not exist %MSBuild% @set MSBuild="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" -if not exist %MSBuild% ( - echo Could not find msbuild.exe. Please run this from a Visual Studio developer prompt +REM Find the most recent 32bit MSBuild.exe on the system. Require v15.0 (installed with VS2017) or later since .NET +REM Core projects are coming soon. +REM Use `vswhere` for the search since %ProgramFiles(x86)%\msbuild\15.0\Bin\MSBuild.exe almost never exists. +set vswhere="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" +if not exist %vswhere% ( + set VsWhere="%ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe" +) +if not exist %vswhere% ( + REM vswhere.exe not in normal locations; check the Path. + for %%X in (vswhere.exe) do ( + set vswhere="%%~$PATH:X" + ) +) +if not exist %vswhere% ( + echo Could not find vswhere.exe. Please run this from a Visual Studio developer prompt. + goto BuildFail +) + +set InstallDir= +for /f "usebackq tokens=*" %%i in (`%vswhere% -latest -prerelease -products * -requires Microsoft.Component.MSBuild -property installationPath`) do ( + set InstallDir=%%i +) +if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ( + set MSBuild="%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" +) else ( + echo Could not find MSBuild.exe. Please install the VS2017 BuildTools component or a workload that includes it. goto BuildFail ) diff --git a/src/Microsoft.AspNet.WebHooks.Common/Microsoft.AspNet.WebHooks.Common.csproj b/src/Microsoft.AspNet.WebHooks.Common/Microsoft.AspNet.WebHooks.Common.csproj index e67ee21c..b9ad03fa 100644 --- a/src/Microsoft.AspNet.WebHooks.Common/Microsoft.AspNet.WebHooks.Common.csproj +++ b/src/Microsoft.AspNet.WebHooks.Common/Microsoft.AspNet.WebHooks.Common.csproj @@ -98,9 +98,9 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + - +