New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server 2016: Get-SamplerAbsolutePath not found #350
Comments
I have just tried that on a Windows Server 2016 box and it works as expected.
The build of CommonTasks works as expected. |
@johlju I am unable to provide more information. The trace I ran is giving me no tangible information. The module works on my own clients without issues. It works on systems running Server 2019 and 2022 in the same offline environment. The only exception is that it only partially imports on Server 2016, 1607 as outlined above. Trace.log from the system, for what it's worth. I've tried different ways of installing sampler. The environment we are experiencing these issues is entirely offline. We:
Since @raandree says it works on his system, I cannot really do much here. It is quite frustrating though. We have created a new agent pool with agents running Server 2022, but I feel that this behavior bears investigation. At the very least, some requirement may be undocumented, which never came up during testing. |
The aliases are imported through the psm1 script file (last in the file) while the other ones are exported through the module manifest. This issue might happen because (just guessing):
Does this issue happen when the Plaster module is not available? Or if we remove the |
It looks like I hitting the same issue on a private build server for Windows PowerShell only (5.1.14409.1027) on a Windows Server 2012 R2 . 🤔 Please not that this does not happen on all machines with Windows PowerShell. It do work on the dev-machine, but not on the build server. The build task
Running |
The problem is the Line 9 in d19ef07
and here: Line 14 in d19ef07
Removing those two the aliases are still exported since all aliases are exported through module manifest: Line 47 in d19ef07
Removing the
|
This will be an issue in the future if a public command is aliased, then we have to work around a bug in ModuleBuilder by doing below, but we could just remove the |
Problem description
Running a build for https://github.com/dsccommunity/commontasks fails on a Server 2016, PowerShell 5.1.14393.0 because Get-SampleAbsolutePath could not be found. Examining the exported commands according to PowerShell, most exported functions are missing:
Verbose logs
How to reproduce
Windows Server 1607, clone repository, run build.ps1 -Resolve
Isolated, installing Plaster and Sampler, the problem can also be reproduced.
Expected behavior
Module can be imported without issues
Current behavior
Importing the module results in only a subset of functions and aliases being imported
Suggested solution
I don't have a suggested solution. Maybe update the list of requirements to include whatever this version of Windows might be missing?
Operating system the target node is running
PowerShell version and build the target node is running
Module version used
The text was updated successfully, but these errors were encountered: