Build multi-target project net45,net45 and netstandard2 on Ubuntu with MONO installed raise error for net45 and build stop.

moh.hassan20's Avatar


09 May, 2019 12:02 AM

I try to build project multi-target net40,net45,netstandard2.0 on Ubuntu .
So, MONO is installed

The appveyor.yml contain:

- sh: sudo apt-get install -y nuget mono-complete

- sh: msbuild src/CommandLine /p:TargetFrameworkVersion=v4.5;Configuration=Release

Mono is installed successfully, but I get the error:
>/usr/share/dotnet/sdk/2.2.102/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(150,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Standard 4.5. Either target .NET Standard 2.0 or lower, or use a version of the .NET SDK that supports .NET Standard 4.5. [/home/appveyor/projects/testcommand/src/CommandLine

The url of build status (here)[]
How to install net45/net40 on Ubuntu and MONO complete is already installed?

  1. 1 Posted by Owen McDonnell on 09 May, 2019 05:25 PM

    Owen McDonnell's Avatar

    Can you try what is suggested in this article.

  2. 2 Posted by moh.hassan20 on 10 May, 2019 07:30 AM

    moh.hassan20's Avatar

    Thanks @McDonnell for reply.
    I succeeded in building the multi-target project in MONO for net40,net45,net461 and netstndard2.0

    What I did is modifying the build command to:

                  msbuild src/CommandLine /p:Configuration=Release

    and removing TargetFrameworkVersion=v4.5;
    It seems that MONO is not using the config. parameter: TargetFrameworkVersion=v4.5

    The build status result is here (build# 2.5.2-dev.51):

  3. 3 Posted by Owen McDonnell on 10 May, 2019 02:11 PM

    Owen McDonnell's Avatar

    Great, thanks for the update!

  4. Ilya Finkelshteyn closed this discussion on 10 Jul, 2019 09:01 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac