Search code examples
visual-studio-2013markdownmarkdownsharp

Markdown nuget installation failed


I get this error when I try to install markdown.

Installing 'Markdown 2.2.1'. Successfully installed 'Markdown 2.2.1'. Adding 'Markdown 2.2.1' to SimpleCMS. Uninstalling 'Markdown 2.2.1'. Successfully uninstalled 'Markdown 2.2.1'. Install failed. Rolling back... Could not install package 'Markdown 2.2.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

I'm using Microsoft Visual Studio 2013 and I'm on Windows 10. I tried updating the Nuget Package Manager but to no avail.


Solution

  • Markdown 2.2.1 depends on .Net Framework version 4.5.1

    The error suggests you're trying to install it in a project targeting .Net framework 4.5

    Two options:

    • Install Markdown 2.1.0
    • Update the target .Net framework for your application. This would generally be frowned upon, if you're writing a commercial application. Fine if it's just yours.

    From the package manager console, you can do:

    Install-Package Markdown -Version 2.1.0