Skip to content

Update to windows-2025, upgrade to .NET 4.7.1 #1852

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

Merged
merged 2 commits into from
Aug 13, 2025

Conversation

tyrielv
Copy link
Contributor

@tyrielv tyrielv commented Jul 23, 2025

window-2019 agent has been deprecated and is no longer available.

The newer agents don't include support for .NET Framework 4.6.1 or the Windows SDK that the native projects targeted. I tried some workarounds to install support for them as part of the action YML, but failed.

Instead, I've updated the projects to target .NET Framework 4.8 and the latest Windows SDK.

@tyrielv tyrielv requested review from dscho and mjcheetham July 23, 2025 19:26
@tyrielv
Copy link
Contributor Author

tyrielv commented Jul 24, 2025

I tried upgrading in steps and found that the failing test starts failing in .NET Framework 4.7.2 - it still passes in 4.7.1. I'll try that next and see if the image has it.

window-2019 agent has been deprecated and is no longer available.
The newer agents don't include support for .NET Framework 4.6.1 or the Windows SDK that the native projects targeted.
I tried some workarounds to install support for them as part of the action YML, but failed.

Newer versions of .NET Framework are available on the agent images, but 4.7.2 and later start failing one of the functional tests.
So I've updated the projects to target .NET Framework 4.7.1 and the latest Windows SDK.
@tyrielv tyrielv force-pushed the upgrade-workflow-image branch from 8e87e12 to 240f73e Compare July 24, 2025 00:11
@tyrielv tyrielv changed the title Update to windows-2025, upgrade to .NET 4.8 Update to windows-2025, upgrade to .NET 4.7.1 Jul 24, 2025
@dscho
Copy link
Member

dscho commented Jul 24, 2025

Thank you for your efforts @tyrielv!

For my own understanding, is the problem with v4.8 this one?

2025-07-23T21:11:34.6554350Z => GVFS.FunctionalTests.Tests.EnlistmentPerFixture.WorkingDirectoryTests(GVFS.FunctionalTests.FileSystemRunners.SystemIORunner).TruncatedObjectRedownloaded()
2025-07-23T21:11:34.6556747Z Test GVFS.FunctionalTests.Tests.EnlistmentPerFixture.WorkingDirectoryTests(GVFS.FunctionalTests.FileSystemRunners.SystemIORunner).TruncatedObjectRedownloaded()
2025-07-23T21:11:34.6558738Z Failed at 9:11:34 PM taking 00:00:01.7248655
2025-07-23T21:11:34.6560268Z   The contents of C:\Repos\GVFSFunctionalTests\enlistment\faf8f8548a1c43fd928e\src\Test_EPF_WorkingDirectoryTests\TruncatedObjectRedownloaded.txt do not match what was expected
2025-07-23T21:11:34.6561695Z   String lengths are both 45. Strings differ at index 34.
2025-07-23T21:11:34.6562899Z   Expected: "Test contents for TruncatedObjectRedownloaded"
2025-07-23T21:11:34.6565874Z   But was:  "Test contents for TruncatedObjectR\f���\0\0�A\f��"
2025-07-23T21:11:34.6566548Z   ---------------------------------------------^

And the failure with v4.7.1 this one (no link because the log is too long)?

2025-07-24T00:45:39.6890966Z => GVFS.FunctionalTests.Tests.LongRunningEnlistment.BasicFileSystemTests.ExpandedFileAttributesAreUpdated()
2025-07-24T00:45:39.6892942Z Test GVFS.FunctionalTests.Tests.LongRunningEnlistment.BasicFileSystemTests.ExpandedFileAttributesAreUpdated()
2025-07-24T00:45:39.6894065Z Failed at 12:45:39 AM taking 00:00:00.1391025
2025-07-24T00:45:39.6894532Z   Last access time does not match
2025-07-24T00:45:39.6894917Z   Expected: 2025-07-25 00:45:39.5492382
2025-07-24T00:45:39.6895345Z   But was:  2025-07-24 00:45:38.5695344

@tyrielv
Copy link
Contributor Author

tyrielv commented Jul 24, 2025 via email

@@ -14,19 +14,19 @@
<ProjectGuid>{798DE293-6EDA-4DC4-9395-BE7A71C563E3}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>GitHooksLoader</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume specifying just 10.0 means latest (and not build 10240)?

</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From VS2019 to VS2022

@@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net471</TargetFramework>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.NET Framework 4.7.1 is installable as far back as Windows Server 2008 R2 SP1, so this should be ok since 2008 R2 was out of extended support on Jan 14, 2020.

@mjcheetham mjcheetham merged commit 3e720b9 into microsoft:master Aug 13, 2025
5 checks passed
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

Successfully merging this pull request may close these issues.

3 participants