Skip to content

Commit

Permalink
Target both .NET Core/Standard and Framework 4.5
Browse files Browse the repository at this point in the history
Enable CI builds on AppVeyor as well.
  • Loading branch information
tylerbutler committed Aug 3, 2018
1 parent 2b76273 commit bd62abb
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -3,5 +3,5 @@ solution: WopiValidator.sln
dotnet: 2.1
mono: none
script:
- dotnet build -c Release
- dotnet test ./test/WopiValidator.Core.Tests/WopiValidator.Core.Tests.csproj -c Release
- dotnet build -c Release -f netcoreapp2.0
- dotnet test ./test/WopiValidator.Core.Tests/WopiValidator.Core.Tests.csproj -c Release -f netcoreapp2.0
File renamed without changes.
7 changes: 4 additions & 3 deletions README.md
@@ -1,10 +1,11 @@
# WOPI Validator

[![Build Status](https://travis-ci.org/Microsoft/wopi-validator-core.svg?branch=master)](https://travis-ci.org/Microsoft/wopi-validator-core)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/3ec9rkntlgcffbiq/branch/master?svg=true)](https://ci.appveyor.com/project/tylerbutler/wopi-validator-core/branch/master)

This project contains the core logic of the [WOPI validator][] as well as a command-line interface to it.
[![Travis](https://travis-ci.org/Microsoft/wopi-validator-core.svg?branch=master)](https://travis-ci.org/Microsoft/wopi-validator-core)

[WOPI validator]: https://wopi.readthedocs.io/en/latest/build_test_ship/validator.html
This project contains the core logic of the [WOPI validator](https://wopi.readthedocs.io/en/latest/build_test_ship/validator.html)
as well as a command-line interface to it.

## Building the project

Expand Down
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions appveyor.yml
@@ -0,0 +1,20 @@
version: 1.0.0.{build}
image: Visual Studio 2017
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
assembly_version: '{version}'
file_version: '{version}'
package_version: '{version}-$(configuration)'
informational_version: '{version}-$(appveyor_repo_commit)-$(configuration)-appveyor'
before_build:
- cmd: dotnet restore
build:
publish_nuget: true
verbosity: minimal
configuration:
- Debug
- Release
matrix:
fast_finish: true
6 changes: 3 additions & 3 deletions src/WopiValidator.Core/WopiValidator.Core.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net45;netcoreapp2.0</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../WopiValidatorSigningKey.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
Expand All @@ -28,8 +28,8 @@
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">
<Reference Include="System.Collections.Concurrent" />
<Reference Include="System" />
<Reference Include="System.Collections.Concurrent" />
<Reference Include="System.Security" />
<Reference Include="System.Web" />
<Reference Include="Microsoft.CSharp" />
Expand Down
2 changes: 1 addition & 1 deletion src/WopiValidator/Options.cs
Expand Up @@ -20,7 +20,7 @@ class Options
[Option('l', "token_ttl", Required = true, HelpText = "WOPI access token ttl")]
public long AccessTokenTtl { get; set; }

[Option('c', "config", Required = false, Default = "runConfig.xml", HelpText = "Path to XML file with test definitions")]
[Option('c', "config", Required = false, Default = "TestCases.xml", HelpText = "Path to XML file with test definitions")]
public string RunConfigurationFilePath { get; set; }

[Option('g', "testgroup", Required = false, HelpText = "Run only the tests in the specified group (cannot be used with testname)")]
Expand Down
49 changes: 28 additions & 21 deletions src/WopiValidator/WopiValidator.csproj
@@ -1,14 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFrameworks>netcoreapp2.0;net45</TargetFrameworks>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../WopiValidatorSigningKey.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<StartupObject>Microsoft.Office.WopiValidator.Program</StartupObject>
<AssemblyName>Microsoft.Office.WopiValidator</AssemblyName>
<RootNamespace>Microsoft.Office.WopiValidator</RootNamespace>
<VersionSuffix>$(VersionSuffix)</VersionSuffix>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -18,25 +20,13 @@
<Description>Validates WOPI server implementations</Description>
<PackageTags>wopi</PackageTags>
<PackageId>WopiValidator</PackageId>
<PackageVersion>1.0.0-local</PackageVersion>
<AssemblyVersion>1.0.0</AssemblyVersion>
<InformationalVersion>1.0.0-local</InformationalVersion>
<Product>WopiValidator</Product>
<Copyright>Microsoft</Copyright>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\Debug\netcoreapp2.0\Microsoft.Office.WopiValidator.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>bin\Release\netcoreapp2.0\Microsoft.Office.WopiValidator.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
<!-- Include the featuresConfig.xml and runConfig.xml/xsd files in the build output (and NuGet package) -->
<Content Include="*Config.x*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<Folder Include="Properties/" />
</ItemGroup>
Expand All @@ -50,11 +40,28 @@
</ItemGroup>

<ItemGroup>
<!-- Include the validator Core DLL in the build output (and NuGet package) -->
<Content Include="$(OutputPath)\Microsoft.Office.WopiValidator.Core.dll">
<Pack>true</Pack>
<PackagePath>lib\$(TargetFramework)</PackagePath>
<Content Include="..\..\FeatureTestCases.xml" Link="FeatureTestCases.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\TestCases.xml" Link="TestCases.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\TestCases.xsd" Link="TestCases.xsd">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\WopiValidator.Core\WopiValidator.Core.csproj" PrivateAssets="all" />
<!-- <ProjectReference Include="..\ClassLibrary3\ClassLibrary3.csproj" Condition="'$(TargetFramework)' == 'net47'" PrivateAssets="all" /> -->
</ItemGroup>

<!-- This is a workaround to include files from the WopiValidator.Core project in the Nuget package for this
project. See https://github.com/nuget/home/issues/3891#issuecomment-377319939 for more info. -->
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
<ItemGroup>
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths-&gt;WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" />
</ItemGroup>
</Target>

</Project>
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFrameworks>netcoreapp2.0;net45</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../../src/WopiValidatorSigningKey.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
Expand Down

0 comments on commit bd62abb

Please sign in to comment.