Meanwhile I had a look at the library. Since it is not used very often I have to admit that it is not very well maintained. The main problem is, that it can not detect Serial Teensies with the new (>TD1.53?) composite USB type. The problem is, that the used method of questioning the WMI database doesn't allow walking up the device tree to get the serial number of the Teensy (more likely I'm to stupid to do this...).
Good news:
Some time ago I did a complete rewrite of TeensySharp using low level access instead of the WMI queries.
I never did extensive tests, so it still lives in the development branch. I tried the new version with your firmware and found that I underestimated the time it takes to erase a large firmware from the processor. I fixed this and now it uploads without problems. After uploading your hex file the T4 prints stuff like <34/242/255/0/0/0/0/0/0/0/0/0/0/0/-1/0/0/><34.... to Serial. I assume this is what it is supposed to do?
Here a very simple console application showing how uploading works with the new library:
Code:
using libTeensySharp;
using System;
using System.IO;
using System.Linq;
using static System.Console;
namespace Firmware_Upload_Console
{
class Program
{
static void Main(string[] args)
{
var watcher = new TeensyWatcher();
WriteLine("===============================================================");
WriteLine(" Firmware Upload Tester");
WriteLine("===============================================================\n");
WriteLine("Found the following Teensies on the USB bus---------------------");
foreach (var t in watcher.ConnectedTeensies)
{
WriteLine(t);
}
WriteLine("\nPlease press 'u' to program the first teensy in the list above, any other key to abort");
if (ReadKey(true).Key != ConsoleKey.U) Environment.Exit(0);
var teensy = watcher.ConnectedTeensies.FirstOrDefault();
if (teensy != null)
{
var firmware = Path.Combine(Path.GetTempPath(), "MRKIV.hex"); // change to a valid path to your hex file
var result = teensy.Upload(firmware, reboot: true);
WriteLine(result);
}
// cleanup
watcher.Dispose();
WriteLine("\nPress any key to quit");
while (!KeyAvailable) ;
}
}
}
Currently there is no documentation for the new library but the examples should show you how to use it.
Best to start with the Print&Watch example. It should give you some output like this:

The output should be updating when you add/remove devices. If this works, everything is installed correctly and you should be able to upload firmware with the program from above.
As mentioned, this was not tested much. So, any bug reports are very welcome.