Skip to content

Ensure nuget based reference assemblies are created for PowerShell #1152

Description

This is for developers using our SDK

Activity

  1. andyleejordan commented on Jun 20, 2016

    @andyleejordan
    Member

    What about the existing one, Microsoft.PowerShell.5.ReferenceAssemblies? This is what our cmdlet-example compiles against.

  2. raghushantha commented on Jun 20, 2016

    @raghushantha
    MemberAuthor

    Existing one stays. We need to have a newer version of the SDK for every release.

  3. andyleejordan commented on Jun 20, 2016

    @andyleejordan
    Member

    Are we changing the API?

  4. andyleejordan commented on Jun 20, 2016

    @andyleejordan
    Member

    Hm, we have introduced some PowerShell script variables to the language ($IsWindows, $IsLinux, $IsOSX), but I don't think we've changed the public C# API of the PowerShell classes.

    It would probably be better to build reference assemblies out of PowerShell Core. How were the original ones built?

  5. raghushantha commented on Jun 20, 2016

    @raghushantha
    MemberAuthor

    James Truher (@JamesWTruher) to answer below:
    "How were the original ones built?"

  6. andyleejordan commented on Jul 2, 2016

    @andyleejordan
    Member

    We are going to need updated (for .NET Core) reference assemblies, and it's blocking #1234.

  7. vors commented on Jul 3, 2016

    @vors
    Collaborator

    Our reference assemblies will have dependencies on WSMan and MMI assemlbies. We should look, can we turn them into references as well. #1105

  8. daxian-dbw commented on Jul 3, 2016

    @daxian-dbw
    Member

    MMI and WSMan packages need to have implementation DLLs in them. We won't open source them, so we need the full nuget package to support the WSMan module and WMI/CIM in PowerShell.
    As for SMA, I think we also need the full nuget package published eventually, at least for the netstandard1.6 target framework. A third party .NET Core application should be able to host the PowerShell Core SMA.dll, and a full package is required in order to do that.

  9. 51 remaining items

  10. JonKohler commented on Mar 6, 2018

    @JonKohler

    hey Steve Lee (@SteveL-MSFT) - Any update on this?

  11. SteveL-MSFT commented on Mar 6, 2018

    @SteveL-MSFT
    Member
  12. mallochine commented on Mar 7, 2018

    @mallochine

    Steve Lee (@SteveL-MSFT) sorry if this is obvious -- how to install via the 'nuget' CLI? For some reason Install-Package didn't work but nuget does. E.g. nuget install Newtonsoft.Json

  13. mallochine commented on Mar 7, 2018

    @mallochine

    oh, nevermind, figured it out. Needed to add -Version or else it doesn't work:

    nuget install PowerShellStandard.Library -Version 5.1.0-preview-01

  14. mallochine commented on Mar 7, 2018

    @mallochine

    Steve Lee (@SteveL-MSFT) another problem -- I noticed the reference assembly installed was net standard 2.0, not 4.5. Thus it didn't compile. What is the correct way to install the right framework?

    error CS1070: The type `System.Object' has been forwarded to an assembly that is not referenced. Consider adding a reference to assembly `netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
    
  15. mallochine commented on Mar 7, 2018

    @mallochine

    Steve Lee (@SteveL-MSFT) so I see that I was supposed to pass in "-sdk:2" flag to 'mcs' compiler to make this work. However, my library uses 'dynamic' language feature, which is not supported in 2.0.

    I mean, there must be a way to use the 5.1.0 preview on other release versions, isn't there?

  16. SteveL-MSFT commented on Mar 8, 2018

    @SteveL-MSFT
    Member

    Not Vitalik Buterin (@mallochine) unfortunately for now, PSStdLib is tied to dotnetstd 2.0.

  17. mallochine commented on Mar 8, 2018

    @mallochine

    what's the github issue we can track to see the cmdlet tied to new sdk?

  18. Jaykul commented on Mar 8, 2018

    @Jaykul
    Contributor

    Not Vitalik Buterin (@mallochine) - SteveL said "for now" but it's just to be clear: this isn't really just "for now" -- if you want to write cmdlets that target PowerShell Core, you can't use features that aren't in netstandard2.0. In fact, you must compile targeting .NET Standard 2.0

    Additionally, any Windows machines will need at least .NET Framework 4.6.1 (and possibly 4.7, depending on features you use) if you want to be sure the module will work in full desktop "Windows PowerShell" ...

    You can cross-compile (producing separate assemblies targeting each framework), but your code still has to compile against .NET Standard 2.0 to work in PowerShell Core.

  19. mallochine commented on Mar 9, 2018

    @mallochine

    Ok, so turns out actually .NET Standard and .NET Framework at different things. I finally got this to compile.

    How do I install .NET Core 2.0 SDK from nuget? Since the library I used was deprecated -- https://www.nuget.org/packages/NETStandard.Library.NETFramework/2.0.0-preview2-25405-01

  20. almostjulian commented on Mar 9, 2018

    @almostjulian

    Is this truly based on PowerShell 5.1? Or is this just renamed from the original PowerShell 3 version? I don't see SMA.Runspace.CreatePipeline() for instance.

  21. SteveL-MSFT commented on Mar 10, 2018

    @SteveL-MSFT
    Member

    @darkonejr PowerShell Standard Library intends to always be forward compatible. As such, PS Std Lib v3 is a subset of PS v3 where the apis still exist in PSCore6. Similarly , PS Std lib v5.1 is a subset of PS v5.1 where the apis still exist in PSCore6 (essentially, some exceptions). I would expect CreatePipeline() to still be there. If its not, it's probably a bug in the preview. I would suggest opening a new issue for any APIs you expect to be there, but aren't.

  22. LeonarddeR commented on Mar 2, 2020

    @LeonarddeR

    Is this meant to be a replacement of Microsoft.PowerShell.5.1.ReferenceAssemblies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions