Use only net45 from Nuget

prabhakar_r's Avatar


10 Oct, 2018 09:38 AM

When I use the Nuget manager, how do I instruct to download only specific .net versions.
It is not the Postsharp version, but .net versions.
For e.g. As I use 5.0.28, I wanted to refer only .net 4.5. I do not want .net standard or .net 3.5 libraries in my package folder.

  1. Support Staff 1 Posted by PostSharp Techn... on 10 Oct, 2018 11:26 AM

    PostSharp Technologies's Avatar


    I don't think that this is supported, you'd need to manually remove these directories and then do the same after each upgrade.

    Another option, if you are using Visual Studio 2017 is to use PackageReference feature, which removes the packages folder and packages.config completely and packages are then stored in %USERPROFILE%\.nuget and downloaded on-demand when project is built. However this sometimes lead to necessity to change some build scripts.

    All the best,

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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