Link failure: some assembly references cannot be resolved!!
using GHIElectronics.TinyCLR.Devices.Uart;
using GHIElectronics.TinyCLR.Pins;
namespace TinyCLRApplication1
{
internal class Program
{
static void Main()
{
var txBuffer = new byte[] { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }; //A, B, C, D, E, F
var rxBuffer = new byte[txBuffer.Length];
var myUart = UartController.FromName(SC13048.UartPort.Uart1);
}
}
}
No matter which firmware and nuget combo, I downgrade to do nothing. I still get the same error.
Also, the Flea came with version 2.2.0.6100 firmware which isn’t even out yet.
I’ve been digging around in the code base trying to implement the functionality of the UART directly in the program. Here is something fishy that I noticed. Whenever I declare this EventHandler, the program throws, “Link failure: some assembly references cannot be resolved!!” error:
using GHIElectronics.TinyCLR.Devices.Uart;
namespace TinyCLRApplication1
{
internal class Program
{
static void Main()
{
ClearToSendChangedEventHandler clearToSendChangedCallbacks;
}
}
}
I am seeing something very similar with the FEZ Pico. I purchased two new Picos from Mouser and updated them to the latest firmware (2.2.0.5100) with no issues. They are both Rev D boards. When I try to download and run some existing Pico code that uses I2C I get the error:
Link failure: some assembly references cannot be resolved!!
If I replace the FEZ Pico with the original board with the same firmware and Rev D everything works as expected.
From memory the 2.2.0.5100 firmware was a minor fix and the libraries didn’t roll from 2.2.0.5000. This has worked previously.
I have re-compiled the code and re-flashed the firmware on the new boards with no change. I am reluctant, at the moment, to re-flash the old board and lose a working version.
I also purchased a new FEZ Feather and updated it to the latest firmware but I have not tested it with an existing application.
RESOLVED:
Using TinyCLR Config I did an “Erase All” and loaded the 2.2.0.5000 firmware.
Using Visual Studio I then compiled and downloaded the application - all ran as expected.
Using TinyCLR Config I updated the firmware to 2.2.0.5100.
Using Visual Studio I then compiled and downloaded the application - all ran as expected.
Note: I didn’t change the code or Nuget library versions.
I do not know if you can leave out the compile and download steps and just start with the 2.2.0.5000 firmware and then update to 2.2.0.5100. I won’t have a chance to have a good look until the weekend.