Yes, openhours, but in C#. AGAIN
dotnet new classlib -f netcoreapp3.1 -n Chneau.Time -o . --forceto init the csproj file and Class1.cs filedotnet new gitignore --forceto init the gitignore file
Nope:
dotnet new xunit -o Teststo init a test package?dotnet test Teststo run tests
Now:
- https://stackoverflow.com/a/56646051
- using the files generated from
dotnet new xunit -o Testsmodify csproj file to contains tests when not realease - ignoring all
*.Tests.csfile when release - it shoulds look like this:
<ItemGroup Condition="'$(Configuration)' == 'Release'">
<Compile Remove="**\*.Tests.cs" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)' != 'Release'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="coverlet.collector" Version="1.2.0" />
</ItemGroup>dotnet testto run testsdotnet watch testto run tests when file is modified - the best.- Out of context:
dotnet build --configuration Releaseto build realease - Out of context:
dotnet build --runtime ubuntu.18.04-x64to build for ubuntu