Skip to content

Building from source code

Wesley Pyburn (TechNobo) edited this page Dec 6, 2021 · 8 revisions

Note: Normal users download from Releases.

Building a release is only intended for developers. The only official place to get official builds is from the link above.


(4.0+ - Latest) Building (Developers only):

Do note that all of the project's NuGet packages will be downloaded upon the first build or when the project is opened (Depending on your IDE). This list will likely not be updated with the project, until the odd time that I remember. So do keep in mind that this list is likely out-of-date.

NuGet packages (Client):

NuGet packages (Server):

NuGet packages (Updater):

NuGet packages (Globals and Tray):

Building

You can Build using both Debug and Release. Just make sure x64 is selected.

Building TcNo-Acc-Switcher-Client should build everything.

If you're not sure, or it's not working as expected: Build the C++ binaries first (_First_Run_Installer, _Wrapper) then Globals, Tray & Updater, Server then finally Client.

The compiled files will be found in: TcNo-Acc-Switcher-Client\bin\x64\Debug or TcNo-Acc-Switcher-Client\bin\x64\Release


(3.0 - .NET Core 3) Building (Developers only):

NuGet packages

  • 7-Zip.CommandLine (18.1.0) unzipping stored contents and updates. (This package only downloads 7za.exe and License.txt. Those need to be added to Resources)
  • Newtonsoft.Json (12.0.3) for storing/loading persistent data.
  • System.Drawing.Common (4.7.0) Validating profile images are not corrupt (IsValidGdiPlusImage)
  • TaskScheduler (2.8.19) Creating/Removing Tray autostart. Using Tasks allows it to start as Admin without UAC.

Building

You can Build, but for releases I use the Publish functionality. 1. Right-click Solution TCNO-Acc-Switcher-CSharp-WPF and hit "Build Solution". 2. Create a new profile for x32 or x64 with the following settings:
Configuration: Release | <x32\x64>
Target Framework: Framework 4.8
Deployment Mode: Framework Dependent
Target Runtime: <win-x32\win-x64>
Target Location: (Anywhere, but I combine them into: Build\<Release\Debug>\<x86\x64>)


(2.0 - .NET Core Branch) Building (Developers only):

NuGet packages

  • Newtonsoft.Json (12.0.3) for storing/loading persistent data.
  • 7-Zip.CommandLine (18.1.0) unzipping stored contents and updates. (This package only downloads 7za.exe and License.txt. Those need to be added to Resources)

Building

You can Build, but for releases I use the Publish functionality. 1. Right-click TCNO-Acc-Switcher-CSharp-WPF and hit "Publish". 2. Create a new profile for x32 or x64 with the following settings:
Configuration: Release | <x32\x64>
Target Framework: netcoreapp3.0
Deployment Mode: Framework Dependent
Target Runtime: <win-x32\win-x64>
Target Location: (Anywhere, but I leave it default: bin\<x32\x64>\Release\netcoreapp3.0\publish) 3. I usually delete TcNo Account Switcher.runtimeconfig.dev.json as it seems to not be required.


(1.0 - C++ Branch) Required libraries for building (Developers only):

  • Curl (release uses 7.67.0) - Download, Build guide: https://youtu.be/q_mXVZ6VJs4
  • Visual Studio, with .NET Core. Visual Studio will need admin to debug, as TcNo Account Switcher needs admin to run.

The solution TCNO-Acc-Switcher-CSharp-WPF.sln is located in ".\TCNO-Acc-Switcher-CSharp-WPF".
"TcNo-Acc-Switcher-Updater" is the auto-updater. Once built, it is 7-Zip'd and a new build replaces the update32.7z or update64.7z file in Resources.