Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
/ AspMvc5Mono Public archive

Example asp mvc5 project on ubuntu 20.04 (debian buster docker) and mono

License

Notifications You must be signed in to change notification settings

majorsilence/AspMvc5Mono

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an example project to start developing asp mvc 5 sites using mono 6.12 and ubuntu 20.04 or newer.

I highly recommend using the latest version of mono and monodevelop from http://www.mono-project.com/download/#download-lin.

Required steps to use this example.

  • Open Site.sln in rider of if on windows visual studio

To configure nginx to serve this project see https://github.com/majorsilence/NginxAspMvcHosting.

To host in docker run build_docker.sh whatever.

Site Publish using Mono

See https://github.com/majorsilence/MonoWebPublisher/releases

Building a legacy .netframework asp.net project on linux or mac can be done with mono and msbuild but publishing fails. See the open source MonoWebPublisher project for a small utility to do the same thing. Download the nuget package and add it to your private feed or extract the MonoWebPublisher.exe file and place it wherever.

Powershell example

#!/usr/bin/env pwsh
$ErrorActionPreference = "Stop"
$CURRENTPATH = $pwd.Path

nuget install "MonoWebPublisher" -Source https://YourPrivateNugetFeed -OutputDirectory ./packages
docker run -v ${CURRENTPATH}:/src mono:6.12 sh -c 'cd /src && ls && nuget restore YourSolution.sln && msbuild /property:Configuration=Release YourSolution.sln && mono /src/packages/MonoWebPublisher.1.0.0/lib/net48/MonoWebPublisher.exe /src/YourProjectSubfolder/YourProject.csproj /src/YourProjectSubfolder/bin/app.publish'

docker build --no-cache -f ./Dockerfile -t your_docker_image_name --rm=true .

About

Example asp mvc5 project on ubuntu 20.04 (debian buster docker) and mono

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published