How do I migrate some older .NET Framework apps to GitHub?

Falanga, Rod, DOH 450 Reputation points
2025-07-03T16:10:44.2033333+00:00

18 months ago, we migrated hundreds of TFS/TFVC repos from an old, on-premises TFS server, to our GitHub Enterprise organization. There are, however, two TFVC repos still in that old TFS server because they are written using .NET Framework 4.5.2 and TFS seems to handle deploying those better than GitHub Actions does. They are WPF apps. We do have a GitHub Self-Hosted Runner, which I could use, but I've never been able to get it to create a ClickOnce deployment, and I've spent over a year trying to find a way to do that, with no success.

Well, we would like to get rid of that old TFS server. But before we can turn it off, I've got to find a way to make a deployment of some sort to the network shares for those two ClickOnce WPF apps. I see the .NET Framework 4.5.2 being an issue. (I tried, unsuccessful, to get the developer to upgrade to a newer, supported .NET Framework, but he refused.) And I don't even think GitHub Runners support ClickOnce deployments, regardless of if they run on GitHub or self-hosted runners.

So, what approaches would you recommend to me, please?

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other
A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.
{count} votes

Answer accepted by question author
  1. Osvaldo Alves 0 Reputation points
    2025-11-27T02:40:59.4833333+00:00

    You’re in a tricky but very common situation: legacy WPF apps on .NET Framework 4.5.2 + ClickOnce + an old TFS server that you want to retire. The good news is: you can build and publish ClickOnce from GitHub Actions using a self-hosted runner, but you must configure the runner correctly because GitHub’s hosted runners don’t support this scenario at all.

    Here is a practical and realistic approach I’d recommend: Use a Windows Self-Hosted Runner with the old build toolchain installed

    ClickOnce publishing for .NET Framework requires MSBuild + specific Visual Studio components that don’t exist in GitHub’s hosted runners. You need to replicate the environment TFS was using.

    Install on your self-hosted runner:

    Visual Studio 2019 or 2022 with:

    .NET Desktop Development workload

      **MSBuild** and legacy targeting packs
      
         **.NET Framework 4.5.2 Developer Pack**
         
         The same version of the Windows SDK used in the old TFS pipeline
         
    

    Once installed, GitHub Actions can run:

    - name: Publish ClickOnce
      run: '"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe" YourApp.csproj /p:PublishProfile=YourClickOnceProfile.pubxml /p:Configuration=Release'
    

    This works because ClickOnce is MSBuild-driven, not GitHub-driven.

    Important:

    If the TFS server had custom MSBuild .targets or signing certificates, copy them too.


0 additional answers

Sort by: Most helpful

Your answer