Link failure: some assembly references cannot be resolved

291 Views Asked by At

I am using nanoframework library in visual studio 2022, trying to manipulate the ESP-WROOM-32 device where an RFID-RC522 reader is connected. I publish the application "Hello from nanoFramework!" and its execution is successful. When I add the library nanoFramework.Iot.Device.Mfrc522 to the application and publish it on the device, an error appears saying that it is unable to load the reference assemblies.


`Resolving.
Link failure: some assembly references cannot be resolved!!

Assembly: Iot.Device.Ndef (1.0.0.0) needs assembly 'mscorlib' (1.12.0.4)
Assembly: Iot.Device.Ndef (1.0.0.0) needs assembly 'nanoFramework.System.Text' (1.2.22.3995)
Assembly: Iot.Device.Ndef (1.0.0.0) needs assembly 'System.Buffers.Binary.BinaryPrimitives' (1.2.0.0)
Assembly: Iot.Device.Ultralight (1.0.0.0) needs assembly 'mscorlib' (1.12.0.4)
Assembly: Iot.Device.Ultralight (1.0.0.0) needs assembly 'Iot.Device.Card' (1.2.0.0)
Assembly: Iot.Device.Ultralight (1.0.0.0) needs assembly 'Iot.Device.Ndef' (1.0.0.0)
Assembly: nanoFramework.Logging (1.1.47.7077) needs assembly 'mscorlib' (1.12.0.4)
Assembly: nanoFramework.System.Text (1.2.22.3995) needs assembly 'mscorlib' (1.12.0.4)
Assembly: System.Device.Spi (1.3.22.0) needs assembly 'mscorlib' (1.12.0.4)
Assembly: System.Device.Spi (1.3.22.0) needs assembly 'System.Device.Gpio' (1.1.22.60169)
Assembly: System.IO.Ports (1.1.46.59502) needs assembly 'mscorlib' (1.12.0.4)
Assembly: System.IO.Ports (1.1.46.59502) needs assembly 'nanoFramework.Runtime.Events' (1.11.1.42088)
Assembly: System.IO.Ports (1.1.46.59502) needs assembly 'System.IO.Streams' (1.1.27.27650)
Assembly: System.Device.Gpio (1.1.22.60169) needs assembly 'mscorlib' (1.12.0.4)
Assembly: System.Device.Gpio (1.1.22.60169) needs assembly 'nanoFramework.Runtime.Events' (1.11.1.42088)
Assembly: System.Buffers.Binary.BinaryPrimitives (1.2.0.0) needs assembly 'mscorlib' (1.12.0.4)
Assembly: Iot.Device.Card (1.2.0.0) needs assembly 'mscorlib' (1.12.0.4)
Assembly: System.IO.Streams (1.1.27.27650) needs assembly 'mscorlib' (1.12.0.4)
Assembly: System.IO.Streams (1.1.27.27650) needs assembly 'nanoFramework.System.Text' (1.2.22.3995)
Assembly: Iot.Device.Mifare (1.0.0.0) needs assembly 'mscorlib' (1.12.0.4)
Assembly: Iot.Device.Mifare (1.0.0.0) needs assembly 'Iot.Device.Card' (1.2.0.0)
Assembly: Iot.Device.Mifare (1.0.0.0) needs assembly 'Iot.Device.Ndef' (1.0.0.0)
Assembly: System.Device.I2c (1.0.3.3) needs assembly 'mscorlib' (1.12.0.4)
Assembly: nanoFramework.Runtime.Events (1.11.1.42088) needs assembly 'mscorlib' (1.12.0.4)
Assembly: nanoFramework.Runtime.Native (1.5.4.3) needs assembly 'mscorlib' (1.12.0.4)
Assembly: Iot.Device.Mfrc522 (1.2.0.0) needs assembly 'mscorlib' (1.12.0.4)
Assembly: Iot.Device.Mfrc522 (1.2.0.0) needs assembly 'Iot.Device.Ultralight' (1.0.0.0)
Assembly: Iot.Device.Mfrc522 (1.2.0.0) needs assembly 'Iot.Device.Card' (1.2.0.0)
Assembly: Iot.Device.Mfrc522 (1.2.0.0) needs assembly 'System.Device.Spi' (1.3.22.0)
Assembly: Iot.Device.Mfrc522 (1.2.0.0) needs assembly 'System.IO.Ports' (1.1.46.59502)
Assembly: Iot.Device.Mfrc522 (1.2.0.0) needs assembly 'System.Device.I2c' (1.0.3.3)
Assembly: Iot.Device.Mfrc522 (1.2.0.0) needs assembly 'System.Device.Gpio' (1.1.22.60169)
Assembly: Iot.Device.Mfrc522 (1.2.0.0) needs assembly 'Iot.Device.Mifare' (1.0.0.0)
Assembly: Iot.Device.Mfrc522 (1.2.0.0) needs assembly 'System.Diagnostics.Stopwatch' (1.2.0.0)
Assembly: Iot.Device.Mfrc522 (1.2.0.0) needs assembly 'System.Buffers.Binary.BinaryPrimitives' (1.2.0.0)
Assembly: System.Diagnostics.Stopwatch (1.2.0.0) needs assembly 'mscorlib' (1.12.0.4)
Assembly: System.Diagnostics.Stopwatch (1.2.0.0) needs assembly 'nanoFramework.Runtime.Native' (1.5.4.3)
Error: a3000000
Waiting for debug commands...
The program '[1] .NET nanoFramework application: Managed' has exited with code 0 (0x0).
`

In the research I carried out, I found some solutions that could solve this problem but I still could not succeed.

a) I updated the nanoff as below; nanoff --update --serialport COM3 --platform esp32

b) I also updated the libraries in Manage nuget package of visual studio 2022

Devices: ESP-WROOM-32 RFID-RC522

Visual Studio 2022, Current Version 17.4.3 .NET nanoFramework Extension, Version 2022.3.0.10


---
    `Native Assemblies:
      mscorlib v100.5.0.18, checksum 0xCCE8376E
      nanoFramework.Runtime.Native v100.0.9.0, checksum 0x109F6F22
      nanoFramework.Hardware.Esp32 v100.0.7.3, checksum 0xBE7FF253
      nanoFramework.Hardware.Esp32.Rmt v100.0.3.0, checksum 0x0A915860
      nanoFramework.Device.OneWire v100.0.4.0, checksum 0xB95C43B4
      nanoFramework.Networking.Sntp v100.0.4.4, checksum 0xE2D9BDED
      nanoFramework.ResourceManager v100.0.0.1, checksum 0xDCD7DF4D
      nanoFramework.System.Collections v100.0.1.0, checksum 0x2DC2B090
      nanoFramework.System.Text v100.0.0.1, checksum 0x8E6EB73D
      nanoFramework.Runtime.Events v100.0.8.0, checksum 0x0EAB00C9
      EventSink v1.0.0.0, checksum 0xF32F4C3E
      System.IO.FileSystem v1.0.0.0, checksum 0x3AB74021
      System.Math v100.0.5.4, checksum 0x46092CB1
      System.Net v100.1.5.0, checksum 0x5BAB8CB3
      System.Device.Adc v100.0.0.0, checksum 0xE5B80F0B
      System.Device.Dac v100.0.0.6, checksum 0x02B3E860
      System.Device.Gpio v100.1.0.6, checksum 0x097E7BC5
      System.Device.I2c v100.0.0.1, checksum 0xFA806D33
      System.Device.I2s v100.0.0.1, checksum 0x478490FE
      System.Device.Pwm v100.1.0.4, checksum 0xABF532C3
      System.IO.Ports v100.1.6.1, checksum 0xB798CE30
      System.Device.Spi v100.1.2.0, checksum 0x3F6E2A7E
      System.Runtime.Serialization v100.0.0.0, checksum 0x0A066871
      System.Device.Wifi v100.0.6.4, checksum 0x1C1D3214
      Windows.Storage v100.0.2.0, checksum 0x954A4192
`

Can anyone help regarding this problem?

1

There are 1 best solutions below

4
On BEST ANSWER

This is happening because of reference inconsistencies between libraries. mscorlib was updated recently and there is an ongoing cascade update on the various libraries. You either have to wait for this to complete (it should happen between today and tomorrow) or revert to previous versions of the libraries and firmware.