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

[Bug]: Unable to run MyTimer - "Unable to find type [MyTimer]" #11

Closed
5 tasks done
joshua-russell opened this issue Mar 2, 2023 · 4 comments
Closed
5 tasks done
Assignees
Labels
bug Something isn't working

Comments

@joshua-russell
Copy link
Contributor

Describe the problem

Trying Start-MyTimer - Line 4 of Start-MyTimer.ps1 errors:

Unable to find type [MyTimer].

Get-TypeData MyTimer reveals the type is registered but appears to be empty:

TypeName Members
MyTimer {}

Expectation

Expected MyTimer to start without error.

Additional Information

PowerShell versions tested: - 7.3.7; 7.3.3; 5.1
PSTimers Version 1.0.1
Running with executionPolicy in bypass

Is there a problem with mytimer.types.ps1xml? I looked at it but it seems fine.

PowerShell version

Other

Platform

Windows 11 Pro or Enterprise

Additional Checks

  • You are using the latest version of this module.
  • You have read this repository's README file.
  • You have read full help and examples for the command you are having problems with.
  • You are running PowerShell in an elevated session.
  • You are running in a traditional PowerShell console or Windows Terminal
@joshua-russell joshua-russell added bug Something isn't working triage new issue that needs review labels Mar 2, 2023
@joshua-russell joshua-russell changed the title [Bug]: Unable to [Bug]: Unable to run MyTimer Mar 2, 2023
@joshua-russell joshua-russell changed the title [Bug]: Unable to run MyTimer [Bug]: Unable to run MyTimer - "Unable to find type [MyTimer]" Mar 2, 2023
@jdhitsolutions jdhitsolutions removed the triage new issue that needs review label Mar 2, 2023
@jdhitsolutions
Copy link
Owner

That's a simple fix. The MyTimer class is private.

@jdhitsolutions
Copy link
Owner

I've published v1.1.0 to the PowerShell Gallery, which should fix this. I also discovered the class definition was missing.

@joshua-russell
Copy link
Contributor Author

Great - testing shortly.

@joshua-russell
Copy link
Contributor Author

Working perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants