question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression: NuGet package System.Management.Automation stopped supporting projects that targets netstandard2.0 since 6.1.3

See original GitHub issue

Steps to reproduce

mkdir foo
cd foo
dotnet new classlib # make a .project that targets Net Standard 2.0
dotnet add package System.Management.Automation # adds a reference to SMA 6.2.2

Expected behavior

No errors, i.e. dotnet restore (which is done automatically as part of the dotnet add package command) works fine.

Actual behavior

Error, cannot build or even restore project:

error: Package System.Management.Automation 6.2.2 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package System.Management.Automation 6.2.2 supports: netcoreapp2.1 (.NETCoreApp,Version=v2.1)
error: Package 'System.Management.Automation' is incompatible with 'all' frameworks in project 'C:\Users\christoph.bergmeiste\git\psscriptanalyzer\foo\foo.csproj'.

Environment data

This has worked fine for the SMA NuGet package of version 6.1.0 but not for the latest supported versions 6.1.5 or 6.2.2. Going through the history, it stopped working at version 6.1.3 and does not work for any version of 6.2(!)

cc @felixfbecker

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
msftbot[bot]commented, Aug 21, 2019

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

1reaction
iSazonovcommented, Aug 20, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

System.Management.Automation is incompatible with .NET ...
NET Core 3.1. When I target net5.0 I get the error that the reference assemblies are not found but I installed the .NET...
Read more >
System.Management.Automation 7.3.6
Version Downloads Last updated 7.4.0‑preview.4 1,888 2 months ago 7.4.0‑preview.3 7,265 4 months ago 7.4.0‑preview.2 12,049 5 months ago
Read more >
Depending on the right PowerShell NuGet package in your ...
The Windows PowerShell reference assemblies, the way to target and effectively rehost Windows PowerShell (PowerShell versions 5.1 and below).
Read more >
Why is the Powershell Nuget Package (System. ...
Management.Automation. Debug/Release builds work just fine but as soon as I publish it for win-x64 it starts losing assemblies left and right.
Read more >
System.Management.Automation
Management.Automation is an extension library from Microsoft and it can be added to Visual Studio projects via NuGet package manager or package manager...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found