You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requires the full version number, such as 10.0.100.
Doesn't support version numbers like 10, 10.0, or 10.0.x.
Doesn't have wildcard support.
Doesn't support version ranges.
@Frulfump, it sounds reasonable, thanks.
But in this case some validation should be introduced in getVersionFromGlobalJson function. To have something like "Version number '8.0' is not valid. The feature part is missing" instead of "Cannot read properties of undefined (reading 'substring')".
@Frulfump, it sounds reasonable, thanks.
But in this case some validation should be introduced in getVersionFromGlobalJson function. To have something like "Version number '8.0' is not valid. The feature part is missing" instead of "Cannot read properties of undefined (reading 'substring')".
The sdk.version value in global.json must be a full SDK version, such as 8.0.100. Values like 8, 8.0, or 8.0.x are not supported. So the provided repro with "version": "8.0" is not a valid global.json configuration.
In v5.3.0, the action expanded its use of global.json to support rollForward policies, which requires parsing version components such as major, minor, and feature band as defined in Microsoft’s spec.
We will improve the action’s handling so invalid global.json SDK version cases like this fail with a clearer error message. We’ll track this as an error-handling improvement rather than a regression in supported global.json behavior.
To unblock yourself, update your global.json to use a complete SDK version: "version": "8.0.100"
@priyagupta108 thanks for quick reaction! this isn't a blocker for us, we've already pinned to a full SDK version on our side. The reason I filed the issue is that "version": "8.0" had been working fine until v5.3.0, so the silent break was a bit surprising. On our side, it was a useful nudge to fix an broken global.json.
Hi @otemnov, we’ve added the version validation discussed in #742.
The action now validates the sdk.version format when rollForward is specified and returns a clear error message instead of the cryptic Cannot read properties of undefined (reading 'substring') error.
We’re validating the fix now and plan to get #742 merged soon.
With this change, invalid version formats now return a clear validation error message instead of the cryptic error.
To start using this fix immediately, you can reference the actions/setup-dotnet@main branch in your workflows for now. The changes will also be included in an upcoming release.
We are closing this issue now. Please let us know if you continue to see any issues or need any further assistance.
Activity
[-]5.3.0[/-][+]5.3.0 breaks global.json with latestFeature[/+]v-priyagupta108 commentedon May 28, 2026
Hello @otemnov,
Thank you for reporting this issue. We will investigate it and get back to you as soon as we have some feedback.
Frulfump commentedon May 28, 2026
8.0 isn't a valid version according to the docs for global.json https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#version
nikita-bestuzhev-ct commentedon May 28, 2026
@Frulfump, it sounds reasonable, thanks.
But in this case some validation should be introduced in
getVersionFromGlobalJsonfunction. To have something like "Version number '8.0' is not valid. The feature part is missing" instead of "Cannot read properties of undefined (reading 'substring')".Frulfump commentedon May 28, 2026
Yupp I agree 100%
v-priyagupta108 commentedon May 28, 2026
Hi @otemnov, thanks for reporting this.
The
sdk.versionvalue inglobal.jsonmust be a full SDK version, such as8.0.100. Values like8,8.0, or8.0.xare not supported. So the provided repro with"version": "8.0"is not a validglobal.jsonconfiguration.For more details, please see the official documentation: https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#version
In v5.3.0, the action expanded its use of
global.jsonto supportrollForwardpolicies, which requires parsing version components such as major, minor, and feature band as defined in Microsoft’s spec.We will improve the action’s handling so invalid
global.jsonSDK version cases like this fail with a clearer error message. We’ll track this as an error-handling improvement rather than a regression in supportedglobal.jsonbehavior.To unblock yourself, update your
global.jsonto use a complete SDK version:"version": "8.0.100"Hope this helps!
otemnov commentedon May 28, 2026
@priyagupta108 thanks for quick reaction! this isn't a blocker for us, we've already pinned to a full SDK version on our side. The reason I filed the issue is that
"version": "8.0"had been working fine until v5.3.0, so the silent break was a bit surprising. On our side, it was a useful nudge to fix an brokenglobal.json.globals.json: specify the SDK version precisely
v-priyagupta108 commentedon Jun 12, 2026
Hi @otemnov, we’ve added the version validation discussed in #742.
The action now validates the
sdk.versionformat whenrollForwardis specified and returns a clear error message instead of the crypticCannot read properties of undefined (reading 'substring')error.We’re validating the fix now and plan to get #742 merged soon.
Frulfump commentedon Jun 12, 2026
From the docs https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#matching-rules
So it should always validate the version.
v-priyagupta108 commentedon Jun 18, 2026
Hi @otemnov , this issue has been fixed by merging #742.
The action now validates the
sdk.versionformat whenrollForwardis specified, in accordance with theglobal.jsondocumentation: https://learn.microsoft.com/en-us/dotnet/core/tools/global-json#versionWith this change, invalid version formats now return a clear validation error message instead of the cryptic error.
To start using this fix immediately, you can reference the
actions/setup-dotnet@mainbranch in your workflows for now. The changes will also be included in an upcoming release.We are closing this issue now. Please let us know if you continue to see any issues or need any further assistance.
Thank you for your patience!