Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUpgrade 'System.Automation.Management' NuGet package of version 6.0.0-alpha13 to official version 6.0.2 from powershell-core feed, which requires upgrade to netstandard2.0 #919
Conversation
| @@ -1141,7 +1141,7 @@ private List<ExternalRule> GetExternalRule(string[] moduleNames) | |||
| { | |||
| dynamic description = helpContent[0].Properties["Description"]; | |||
|
|
|||
| if (null != description && null != description.Value && description.Value.GetType().IsArray) | |||
| if (description != null && description.Value != null && description.Value.GetType().IsArray) | |||
This comment has been minimized.
This comment has been minimized.
bergmeister
Mar 3, 2018
Author
Collaborator
This is just to highlight why I needed the NuGet package for Microsoft.CSharp, which was included in netstandard1.6 but not netstandard2.0
This comment has been minimized.
This comment has been minimized.
JamesWTruher
Apr 4, 2018
Member
yup - I found this as well when I was looking at building against PowerShellStandard.Library
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
| <PackageReference Include="System.Management.Automation" Version="6.0.1.1" /> | ||
| <PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0-alpha08" /> |
This comment has been minimized.
This comment has been minimized.
bergmeister
Mar 3, 2018
Author
Collaborator
This is a good example to show that the old System.Management.Automation package was self-contained and now we also need its other dependency Microsoft.Management.Infrastructure.
iSazonov
commented
Mar 5, 2018
|
I wonder - Could PSSA use current PowerShell installation? - there is SMA.dll with all dependencies. |
|
@iSazonov Can you please clarify what you mean by |
iSazonov
commented
Mar 6, 2018
|
My quesion is could PSSA load needed dlls from |
|
It probably could but we don't wan't to. The whole point of this PR is being able to consume the latest version of system.management.automation with the latest required features of the parser. |
|
The reason for the PowerShell Core Appveyor failure is because the Windows image is still using pwsh 6.0.0 but the system.management,automation reference is 6.0.1. I opened an issue at appveyor/ci#2230 and this will get fixed in the next 3 weeks, therefore it is probably best to disable the PowerShell Core build on Windows for the moment (the Ubuntu build should give us enough coverage in the meantime). Just using the 6.0.0 package instead is not a good either because the 6.0.0 package only works for netcore2.0 but only the 6.0.2 packages were fixed to work with netstandard2.0 |
…d by the new system.management.automation package.
|
just one real question down below. Otherwise, this looks fine. |
| @@ -1141,7 +1141,7 @@ private List<ExternalRule> GetExternalRule(string[] moduleNames) | |||
| { | |||
| dynamic description = helpContent[0].Properties["Description"]; | |||
|
|
|||
| if (null != description && null != description.Value && description.Value.GetType().IsArray) | |||
| if (description != null && description.Value != null && description.Value.GetType().IsArray) | |||
This comment has been minimized.
This comment has been minimized.
JamesWTruher
Apr 4, 2018
Member
yup - I found this as well when I was looking at building against PowerShellStandard.Library
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
| <PackageReference Include="System.Management.Automation" Version="6.0.2" /> | ||
| <PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0-alpha08" /> |
This comment has been minimized.
This comment has been minimized.
JamesWTruher
Apr 4, 2018
Member
could this just be Version="1.0.0-alpha* (that's what it is in PowerShell repo)
This comment has been minimized.
This comment has been minimized.
bergmeister
Apr 4, 2018
Author
Collaborator
Yes, I think it is reasonable to always take the latest version of a pre-release package.
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(TargetFramework)' == 'net451'"> | ||
| <PackageReference Include="System.Management.Automation" Version="6.0.0-alpha13" /> |
This comment has been minimized.
This comment has been minimized.
JamesWTruher
Apr 4, 2018
Member
since this is really about full CLR should we still point at this? Would Microsoft.PowerShell.5.ReferenceAssemblies be better? (or Microsoft.PowerShell.3.ReferenceAssemblies) rather than pointing off to that alpha13 thing?
This comment has been minimized.
This comment has been minimized.
bergmeister
Apr 4, 2018
•
Author
Collaborator
At the moment this PR changes it only for the coreclr but I can look into how to do it for full CLR. I first wanted to rather start with the simpler task but maybe it is better to do both in one go.
… (i.e. latest instead of specific)
|
I think we're ready to go - go ahead and merge |
bergmeister commentedMar 3, 2018
•
edited
PR Summary
Closes #879
At the moment we use an unofficial package from Nuget.org, which is a self-contained version of
System.Management.Automation(including dependencies) from6.0.0-alpha13, which contains the Parser that PSSA uses.For coreclr:
netstandard1.6tonetstandard2.0, which required some more NuGet packages:Microsoft.CSharp,Microsoft.Management.Infrastructure(for DSC rules, this is only available as a pre-release) andSystem.Reflection.TypeExtensionsFor fullclr:
UseIdenticalMandatoryParametersDSCcompiles only in PSv4 I had to add a newPSV4Releasebuild option.Old unused csproj files were also removed
The reason for the PowerShell Core Appveyor failure is because the Windows image is still using pwsh 6.0.0 but the system.management,automation reference is 6.0.2. I opened an issue at appveyor/ci#2230 and this will get fixed in the next 3 weeks, therefore a step was added to install pwsh 6.0.2 on the Windows image if necessary
PR Checklist
Note: Tick the boxes below that apply to this pull request by putting an
xbetween the square brackets. Please mark anything not applicable to this PRNA.WIP:to the beginning of the title and remove the prefix when the PR is ready