Regression: NuGet package System.Management.Automation stopped supporting projects that targets netstandard2.0 since 6.1.3
See original GitHub issueSteps 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
(!)
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.
For reference https://github.com/PowerShell/PowerShellStandard/issues/61