Question [Tutoriel]Les modules sous Powershell

Plus d'informations
il y a 11 ans 3 mois #13481 par Matthew BETTON
Je viens de tester avec la V2 : même comportement.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 11 ans 3 mois #13482 par Laurent Dardenne
Matthew BETTON écrit:

D'après mes tests, c'est l'inverse qui se passe.

Effectivement ma formulation est fausse, je dois reformuler le comportement. La clé FunctionsToExport peut restreindre mais elle ne peut pas exporter plus que ce que Export-ModuleMember indique.
Merci Matthew.

Tutoriels PowerShell

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 ans 8 mois #17873 par Laurent Dardenne
A partir de la v3, il existe un bug autour de la gestion du champ ScriptsToProcess d'un manifeste.<br><br>Message édité par: Laurent Dardenne, à: 29/07/14 13:45

Tutoriels PowerShell

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 3 ans 1 mois #30572 par Laurent Dardenne
Une possible évolution sur l'isolation de code dans un module :

Module Isolation

As PowerShell 7’s popularity continues to grow and more community members and partners author modules, they are more likely to encounter a conflict with dependencies on different versions of .NET assemblies. By default, all .NET assemblies are loaded into the same pwsh process. Different versions of the same assembly are not allowed to be loaded into the same process. This means that if PowerShell or a module loads a version of a .NET assembly, then anything else that depends on that assembly must use the same version and sometimes that can be incompatible.

For example, the PowerShell web cmdlets currently depend on Newtonsoft.Json.dll which is shipped with PowerShell. However, a community module may depend on features available in a newer version of Newtonsoft.Json.dll. This means you can’t use both the web cmdlets and cmdlets from this other module within the same PowerShell session.

Rob, from the PowerShell team, has a detailed blog post on how to handle this situation within your module. However, this is complicated and requires every module author to have similar code.

Instead, we want to expose a capability that modules authors can opt into so that the module loading code within the PowerShell engine handles the isolation of .NET assemblies for that module. More details of the design and limitations will be available in an RFC design document.


Tutoriels PowerShell

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 9 mois 1 semaine #33250 par LaGirafe
Merci beaucoup pour ton travail et surtout le partage de tes connaissance. 

LaGirafe | www.encoursdeconstrution.com | Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - Le génie c'est l'expression de la complexité dans toute sa simplicité ! (LB).

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 7 mois 2 semaines - il y a 7 mois 3 jours #33292 par Laurent Dardenne
Un problème potentiel sous Ubuntu si la publication d'un module ne respecte pas une règle implicite, à savoir que les noms du manifeste PDS1 et/ou du module PSM1/DLL/EXE doivent être identique au nom (sensible à la casse) du répertoire hébergeant le module :
github.com/potatoqualitee/psmodulecache/issues/54

>>Merci beaucoup pour ton travail et surtout le partage de tes connaissance.
De rien :-)

Edit :
Fonction de validation de nom de module après un Save-Module ou un Publish-Module.

Tutoriels PowerShell
Dernière édition: il y a 7 mois 3 jours par Laurent Dardenne. Raison: Ajout lien Gist

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.097 secondes
Propulsé par Kunena