2
votes

Is it possible to use Stateless with Visual Studio 2015 without using .NET Core?

https://github.com/dotnet-state-machine/stateless

When loading the project, I get a number of errors with the sample projects:

...\Code\stateless-dev\src\Stateless\Stateless.csproj : error : The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. ...\Code\stateless-dev\src\Stateless\Stateless.csproj

Adding the source files manually to the project also result in errors: enter image description here Any pointers? Thanks.

1
It says it can Stateless runs on .NET 4.0+ and practically all modern .NET platforms by targeting .NET Standard 1.0 REF - Jeremy Thompson
and the code errors are due to C# 7.0 throw expressions. If you want to use them in VS 2015 you need to install Microsoft.Net.Compilers. It should build but VS will still show the red squiggly on that line - Paweł Łukasik

1 Answers

3
votes

They only support building it in VS 2017:

Stateless runs on .NET 4.0+ and practically all modern .NET platforms by targeting .NET Standard 1.0. Visual Studio 2017 is required to build the solution.

You can grab the built library from nuget - stateless.