Skip to content
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

Can not import powershell module #106

Closed
fredgate opened this issue Jul 22, 2016 · 2 comments
Closed

Can not import powershell module #106

fredgate opened this issue Jul 22, 2016 · 2 comments

Comments

@fredgate
Copy link

I have a installation of TFS2015 Update 3 on premise.
I have a agent installed on another machine in version 1.95.3.

I write a simple powershell task that work. I need to improve it.
If in the powershell script I add the line
Import-Module "Microsoft.TeamFoundation.DistributedTask.Task.Internal"
then my build fails with the message :
The specified module 'Microsoft.TeamFoundation.DistributedTask.Task.Internal' was not loaded because no valid module file was found in any module directory.

In my task I embed the SDK in the sub directory ps_modules\VstsTaskSdk.

I do not understand why it fails. Some standard tasks have this instruction and they work correctly.

@fredgate
Copy link
Author

It seems that with Powershell3 execution, the import of module Microsoft.TeamFoundation.DistributedTask.Task.Internal is not necessary.
Can anyone confirm ?

@ericsciple
Copy link
Contributor

Confirmed. That DLL is for the closed source legacy PowerShell task SDK. The PowerShell3 lib in this repo is the recommended path forward.

I'm working on changes now for better documentation, samples, and a better getting started experience. I'm planning to add a section for "Coming from the legacy PowerShell execution handler".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants