WopiValidator 2.0.7
dotnet add package WopiValidator --version 2.0.7
NuGet\Install-Package WopiValidator -Version 2.0.7
<PackageReference Include="WopiValidator" Version="2.0.7" />
<PackageVersion Include="WopiValidator" Version="2.0.7" />
<PackageReference Include="WopiValidator" />
paket add WopiValidator --version 2.0.7
#r "nuget: WopiValidator, 2.0.7"
#:package WopiValidator@2.0.7
#addin nuget:?package=WopiValidator&version=2.0.7
#tool nuget:?package=WopiValidator&version=2.0.7
WOPI Validator
This project contains the core logic of the WOPI validator as well as a command-line interface to it.
Building the project
The project can be built in Visual Studio 2017, Visual Studio Code, or using dotnet build:
dotnet build -c Release
The resulting build will be output to src\WopiValidator\bin\Release\net6.0\. Omit the -c Release
portion if you want to build the debug version instead.
Building a self-contained package
To build a self-contained package for Linux or macOS, use the dotnet publish command:
dotnet publish -c Release -f net6.0 -r linux-x64
dotnet publish -c Release -f net6.0 -r osx-x64
dotnet publish -c Release -f net6.0 -r win-x64
Note: you may see an error on build like this:
error MSB3030: Could not copy the file "obj\Release\net6.0\win-x64\Microsoft.Office.WopiValidator.dll"
because it was not found.
If you see this error, you should re-build the app using the same -r option used in the publish command. For example,
if you were trying to package the Linux self-contained package, first build the app using
dotnet build -c Release -r linux-x64, then publish it using dotnet publish -c Release -r linux-x64.
The output will be placed in src/WopiValidator/bin/Release/net6.0/linux-x64/publish (replace linux-x64
with other platforms as needed).
Running tests
Basic unit tests can be run using the dotnet test command:
dotnet test ./test/WopiValidator.Core.Tests/WopiValidator.Core.Tests.csproj -c Release
Packing the NuGet package
From the root of the project, use the following command:
dotnet pack -c Release
The package will be output to src\WopiValidator\bin\Release\WopiValidator.1.0.0-local.nupkg
Note: if you see any errors, you may need to build the project first, as described above.
Usage
There are several ways to run the validator.
Option 1: dotnet
After building the projects as described above, you can run the resulting Microsoft.Office.WopiValidator.dll
using the dotnet command. For example:
dotnet Microsoft.Office.WopiValidator.dll --token MyAccessToken --token_ttl 0 --wopisrc http://localhost:5000/wopi/files/<id> --testcategory OfficeOnline --ignore-skipped
Note: the Microsoft.Office.WopiValidator.dll file can be found in src\WopiValidator\bin\Release\netcoreapp2.0\.
Option 2: dotnet run --project
You can also use the dotnet run command, passing the path to the WopiValidator.csproj file using the --project
option. Arguments to the validator itself can be passed in by separating them from the dotnet run arguments with
a --. For example:
dotnet run --project ./src/WopiValidator/WopiValidator.csproj --framework net6.0 -- -t MyAccessToken -l 0 -w http://localhost:5000/wopi/files/<id> -e OfficeOnline -s
Option 3: self-contained package
Another option is to build a self-contained package for your OS (see above) and execute the resulting executable
file, which be called Microsoft.Office.Validator.exe on Windows and Microsoft.Office.Validator on Linux and macOS.
Arguments to the validator can be passed in directly. For example:
Microsoft.Office.Validator.exe -t MyAccessToken -l 0 -w http://localhost:5000/wopi/files/<id> -e OfficeOnline -s
Full usage options
Microsoft.Office.WopiValidator 1.0.0
Copyright (C) 2018 Microsoft
-w, --wopisrc Required. WopiSrc URL for a wopitest file
-t, --token Required. WOPI access token
-l, --token_ttl Required. WOPI access token ttl
-c, --config (Default: runConfig.xml) Path to XML file with test definitions
-g, --testgroup Run only the tests in the specified group (cannot be used with testname)
-n, --testname Run only the test specified (cannot be used with testgroup)
-e, --testcategory (Default: All) Run only the tests in the specified category
-s, --ignore-skipped Don't output any info about skipped tests
-d, --include-delaytests Run test cases with delay
--help Display this help screen.
--version Display version information.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.5
- CommandLineParser (>= 2.2.1)
- WopiValidator.Core (>= 2.0.7)
-
net10.0
- CommandLineParser (>= 2.2.1)
- WopiValidator.Core (>= 2.0.7)
-
net6.0
- CommandLineParser (>= 2.2.1)
- WopiValidator.Core (>= 2.0.7)
-
net8.0
- CommandLineParser (>= 2.2.1)
- WopiValidator.Core (>= 2.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on WopiValidator:
| Repository | Stars |
|---|---|
|
petrsvihlik/WopiHost
The most advanced .NET implementation of the WOPI protocol. Enables integration with WOPI clients such as Office Online Server.
|