Skip to content

lbrealdev/dotnet-mono-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotnet poc unit tests

Usage

Start .NET mono docker environment to build the project:

docker pull mono:latest

docker run -it -v $(pwd):/home -w /home mono bash

Restore packages:

nuget restore

Build project:

msbuild ExampleDotNetLib.sln /t:Build

.NET tricks

docker run -it -v $(pwd):/home -w /home mcr.microsoft.com/dotnet/core/sdk:3.1 bash

docker run -it -v $(pwd):/home -w /home mcr.microsoft.com/dotnet/sdk:6.0 bash

dotnet new nunit -o ExampleDotNetLib.Tests

dotnet sln add ExampleDotNetLib.Tests/ExampleDotNetLib.Tests.csproj

nuget locals all -clear

mono packages/NUnit.ConsoleRunner.*/tools/nunit3-console.exe ExampleDotNetLib.Tests/bin/Debug/net48/ExampleDotNetLib.Tests.dll

mono packages/NUnit.ConsoleRunner.3.11.1/tools/nunit3-console.exe ExampleDotNetLib.Tests/bin/Debug/net48/ExampleDotNetLib.Tests.dll
msbuild ExampleDotNetLib.Tests/ExampleDotNetLib.Tests.csproj -t:BuildTarget -p:Configuration=Debug


msbuild /p:OutputPath=TestOutput ExampleDotNetLib.Tests/ExampleDotNetLib.Tests.csproj



msbuild ExampleDotNetLib.Tests/ExampleDotNetLib.Tests.csproj -p:Configuration=Debug /verbosity:diagnostic




msbuild ExampleDotNetLib.Tests/ExampleDotNetLib.Tests.csproj -t:Build








nuget restore

nuget list -Source /root/.nuget/packages

msbuild ExampleDotNetLib.sln

msbuild ExampleDotNetLib.Tests/ExampleDotNetLib.Tests.csproj

mono packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe ExampleDotNetLib.Tests/bin/Debug/net48/ExampleDotNetLib.Tests.dll


Sources

JetBrains Rider IDE

Install Toolbox App

Check if libfuse2 is installed:

apt list --installed | grep libfuse2

Download JetBrains Toolbox App from web page:

https://www.jetbrains.com/toolbox-app/download/download-thanks.html?platform=linux

Extract tar package:

tar -xvf jetbrains-toolbox-*.tar.gz

Install ToolBox App:

./jetbrains-toolbox

Install Mono project

Check if dependencies are installed:

apt list --installed | grep -E 'dirmngr|ca-certificates|gnupg'

Add create mono keyring:

gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

Create mono source.list in source.list directory:

echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/debian stable-buster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list

Run apt update:

sudo apt update

Install mono-devel, msbuild and nuget packages:

apt install mono-devel msbuild nuget -y

Run Unit Tests

 msbuild ExampleDotNetLib.sln /t:Build

Dotnet Links

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages