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

Error during module import due to invalid message date #511

Closed
scifimiki opened this issue Jan 19, 2023 · 1 comment · Fixed by #524
Closed

Error during module import due to invalid message date #511

scifimiki opened this issue Jan 19, 2023 · 1 comment · Fixed by #524
Labels
bug when a bug has been identified or filed

Comments

@scifimiki
Copy link

Steps to reproduce

Import-Module VSTeam -Force -Verbose
$error[0]|format-list -force

Expected behavior

No errors during module import.

Actual behavior?

Exception : System.Management.Automation.MethodInvocationException: Exception calling "Parse" with "1"
argument(s): "String was not recognized as a valid DateTime." ---> System.FormatException:
String was not recognized as a valid DateTime.
ScriptStackTrace : at , C:\Program
Files\WindowsPowerShell\Modules\VSTeam\7.9.0\vsteam.functions.ps1: line 1154

Actual message line:
@{msg=Module Version 8.0.0 will stop supporting all TFS (2017,2018) versions. In the future it will also only keep the newest server versions in the support.; toDate=31/12/2099 23:59:59; displayFromVersion=7.4.0; displayToVersion=8.0.0; type=warning}

PS C:\windows\system32> [DateTime]::Parse("31/12/2098 23:59:59")
Exception calling "Parse" with "1" argument(s): "String was not recognized as a valid DateTime."

On Which OS have you tried it?

Windows

What was your server version?

Azure DevOps Services

Other server version

No response

Log output of used API

Billing                     :
Build                       : 3.0
Core                        : 3.0
DistributedTask             : 3.0-preview
DistributedTaskReleased     :
ExtensionsManagement        : 3.0-preview
Git                         : 3.0
Graph                       :
HierarchyQuery              :
MemberEntitlementManagement :
Packaging                   : 3.0-preview
Pipelines                   :
Policy                      : 3.0
Processes                   :
Release                     : 3.0-preview
ServiceEndpoints            : 3.0-preview
TaskGroups                  : 3.0-preview
Tfvc                        : 3.0
VariableGroups              :
Version                     : TFS2017
Wiki                        :
WorkItemTracking            : 3.0

Log output of $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.3866
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.3866
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@scifimiki scifimiki added the bug when a bug has been identified or filed label Jan 19, 2023
@scifimiki
Copy link
Author

Providing the culture info could fix the problem (vsteam.functions.ps1:1154):
PS C:\Temp> [DateTime]::Parse("31/12/2099 23:29:29", [CultureInfo]::new("en-GB"))
Thursday, December 31, 2099 11:29:29 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug when a bug has been identified or filed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant