How to use the Libraries from Github?

I would like to unload the NuGet packages and work with the Libraries from the repository so that I can debug and test them to help with fixes.

How do I load them into my project and build them? I know how to add references but I can’t build the source.

I tried to load the solution as part of my project but I am getting errors about missing NuGet packages.

Any steps to do this?

This is the error

Severity	Code	Description	Project	File	Line	Suppression State
Error		This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\GHIElectronics.Tools.NuGetPacker.1.0.3\build\GHIElectronics.Tools.NuGetPacker.targets.	mscorlib	C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\mscorlib.csproj	237

Hi Dave,

You can download the nuget packages and place them here:
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages

You can then select your local packages in the nuget package manager from here:
image

You can then install all the needed nuget packages and it should work again.

Thanks LucaP.

That all works fine but what I would like to do is to clone the repository and build it from the source but I get lots of errors about missing DLL files. I would then like to add the references to the working project and build and test that. Hope that makes sense?

This way I can make changes to the source and rebuild and test.

You have to add any missing ones.

It’s missing the DLL files from the libraries themselves. There is nothing for any of them in the BIN output directory. The BIN folder is empty for all.

@Dat_Tran - this is the problem where the internal nuget packer script that you use isn’t available outside GHI, so nobody can actually build the libraries from source.

People could debug against the source (but not make changes) if pdb’s were published to the nuget symbol server.

I think these are two important changes because currently, the builds are not reproducible in the wild.

1 Like

I don’t think so. That was fixed long time ago. Here is attaching to a project as references.

First, download the library and build the library only. Make sure we can build it first.

If we success to build the library, then add them as references which is different issue, if any.

That is what I tried to do but the above image shows the errors from the build. There is nothing in the bin output directory for any of them. Here is the complete error list from the build. I make no changes other than adding the missing Nuget that I first mentioned.

|Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Display\bin\Debug\GHIElectronics.TinyCLR.Devices.Display.dll' could not be found|GHIElectronics.TinyCLR.UI|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.UI\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Gpio\bin\Debug\GHIElectronics.TinyCLR.Devices.Gpio.dll' could not be found|GHIElectronics.TinyCLR.Devices.Spi|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Spi\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Gpio\bin\Debug\GHIElectronics.TinyCLR.Devices.Gpio.dll' could not be found|GHIElectronics.TinyCLR.Devices.I2c|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.I2c\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Gpio\bin\Debug\GHIElectronics.TinyCLR.Devices.Gpio.dll' could not be found|GHIElectronics.TinyCLR.Devices.Network|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Network\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Gpio\bin\Debug\GHIElectronics.TinyCLR.Devices.Gpio.dll' could not be found|GHIElectronics.TinyCLR.Devices.Onewire|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Onewire\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Gpio\bin\Debug\GHIElectronics.TinyCLR.Devices.Gpio.dll' could not be found|GHIElectronics.TinyCLR.Devices.Signals|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Signals\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Spi\bin\Debug\GHIElectronics.TinyCLR.Devices.Spi.dll' could not be found|GHIElectronics.TinyCLR.Devices.Network|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Network\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Storage\bin\Debug\GHIElectronics.TinyCLR.Devices.Storage.dll' could not be found|GHIElectronics.TinyCLR.IO.TinyFileSystem|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO.TinyFileSystem\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Uart\bin\Debug\GHIElectronics.TinyCLR.Devices.Uart.dll' could not be found|GHIElectronics.TinyCLR.Devices.Modbus|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Modbus\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Uart\bin\Debug\GHIElectronics.TinyCLR.Devices.Uart.dll' could not be found|GHIElectronics.TinyCLR.Devices.Network|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Network\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Drawing\bin\Debug\GHIElectronics.TinyCLR.Drawing.dll' could not be found|GHIElectronics.TinyCLR.UI|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.UI\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO\bin\Debug\GHIElectronics.TinyCLR.IO.dll' could not be found|GHIElectronics.TinyCLR.Data.Json|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Data.Json\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO\bin\Debug\GHIElectronics.TinyCLR.IO.dll' could not be found|GHIElectronics.TinyCLR.Data.SQLite|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Data.SQLite\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO\bin\Debug\GHIElectronics.TinyCLR.IO.dll' could not be found|GHIElectronics.TinyCLR.IO.TinyFileSystem|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO.TinyFileSystem\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO\bin\Debug\GHIElectronics.TinyCLR.IO.dll' could not be found|GHIElectronics.TinyCLR.Media|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Media\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO\bin\Debug\GHIElectronics.TinyCLR.IO.dll' could not be found|GHIElectronics.TinyCLR.Networking.Ftp|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking.Ftp\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO\bin\Debug\GHIElectronics.TinyCLR.IO.dll' could not be found|GHIElectronics.TinyCLR.RegularExpressions|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.RegularExpressions\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO\bin\Debug\GHIElectronics.TinyCLR.IO.dll' could not be found|GHIElectronics.TinyCLR.Update|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Update\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO\bin\Debug\GHIElectronics.TinyCLR.IO.dll' could not be found|<Unknown>|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Data.SQLite\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Gpio|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Gpio\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Display|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Display\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Spi|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Spi\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Storage|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Storage\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Uart|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Uart\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Drawing|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Drawing\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Adc|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Adc\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Camera|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Camera\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Can|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Can\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Dac|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Dac\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.I2c|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.I2c\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Modbus|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Modbus\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Network|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Network\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Onewire|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Onewire\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Pwm|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Pwm\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Rtc|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Rtc\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Signals|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Signals\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.UsbClient|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.UsbClient\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.UsbHost|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.UsbHost\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Devices.Watchdog|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Watchdog\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\bin\Debug\GHIElectronics.TinyCLR.Native.dll' could not be found|GHIElectronics.TinyCLR.Media|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Media\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking.Http\bin\Debug\GHIElectronics.TinyCLR.Networking.Http.dll' could not be found|GHIElectronics.TinyCLR.Networking.Ftp|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking.Ftp\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking\bin\Debug\GHIElectronics.TinyCLR.Networking.dll' could not be found|GHIElectronics.TinyCLR.Networking.Http|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking.Http\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking\bin\Debug\GHIElectronics.TinyCLR.Networking.dll' could not be found|GHIElectronics.TinyCLR.Devices.Modbus|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Modbus\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking\bin\Debug\GHIElectronics.TinyCLR.Networking.dll' could not be found|GHIElectronics.TinyCLR.Devices.Network|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Network\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking\bin\Debug\GHIElectronics.TinyCLR.Networking.dll' could not be found|GHIElectronics.TinyCLR.Networking.Ftp|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking.Ftp\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking\bin\Debug\GHIElectronics.TinyCLR.Networking.dll' could not be found|GHIElectronics.TinyCLR.Networking.Mqtt|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking.Mqtt\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Native|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Native\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Gpio|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Gpio\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Networking|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Display|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Display\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Spi|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Spi\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Storage|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Storage\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Uart|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Uart\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Drawing|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Drawing\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.IO|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Networking.Http|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking.Http\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Cryptography|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Cryptography\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Data.Json|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Data.Json\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Data.SQLite|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Data.SQLite\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Data.Xml|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Data.Xml\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Adc|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Adc\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Camera|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Camera\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Can|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Can\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Dac|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Dac\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.I2c|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.I2c\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Modbus|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Modbus\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Network|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Network\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Onewire|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Onewire\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Pwm|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Pwm\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Rtc|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Rtc\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.SecureStorage|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.SecureStorage\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Signals|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Signals\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.UsbClient|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.UsbClient\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.UsbHost|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.UsbHost\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Devices.Watchdog|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Devices.Watchdog\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.IO.TinyFileSystem|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.IO.TinyFileSystem\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Media|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Media\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Networking.Ftp|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking.Ftp\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Networking.Mqtt|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Networking.Mqtt\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Pins|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Pins\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.RegularExpressions|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.RegularExpressions\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.UI|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.UI\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|GHIElectronics.TinyCLR.Update|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Update\CSC|1|N/A|
    |Error|CS0006|Metadata file 'C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\bin\Debug\mscorlib.dll' could not be found|<Unknown>|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\GHIElectronics.TinyCLR.Data.SQLite\CSC|1|N/A|
    |Error|CS0563|One of the parameters of a binary operator must be the containing type|mscorlib|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\String.cs|185|N/A|
    |Error|CS0563|One of the parameters of a binary operator must be the containing type|mscorlib|C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\String.cs|188|N/A|

This is the build output. Lots of mscorlib issues which I assume can be ignored?

I’ve had to link to a text file as the paste is too large.

http://www.axoninstruments.biz/download/debug.txt

Digging a little more, I found that there are errors in the mscorlib build. I’ve made no changes so not sure why this is the case. I am using VS 2019 version 16.7.4

1>C:\VSsource\Visual Studio 2019\TinyCLR-Libraries\mscorlib\String.cs(185,44,185,46): error CS0563: One of the parameters of a binary operator must be the containing type

try update latest VS or temporary follow this solution:

I am using 16.7.5 and am getting a clean compile on the libraries, though I am not sure how reassuring that will be since I think I was getting clean compiles prior to this version.

The mscorlib error seems to be arising because it thinks that the enclosing class String is different from the intrinsic class ‘string’. Not sure why your version is acting different from mine.

I am building from a fork, but the branch that I am building should be identical to GHI’s.

I looked in your log file. It looks like you are compiling the library and picking up an incompatible version of already-compiled TinyCLR or at least mscorlib. Your nuget config might be pointing at TinyCLR files that you downloaded, or your bin and obj dirs may be poisoned with a .net framework version of mscorlib.

First, make sure that the packages dir at the root of your enlistment is empty. Then do a ‘clean’ on the solution. We need to make sure that you don’t have another copy of mscorlib lurking around.

Then, make sure that nuget.org is the only enabled Package source because you may be picking up a conflicting copy from there:
Solution -> Right click -> Manage nuget, then click on the gear in the upper right corner of the nuget window. Make sure that only nuget.org is checked:

The nuget config is a global setting - you will have to change it again when compiling other projects. You can see that I also have an x:\nugetrepo\tinyclr dir where I put my compiled nuget packages from the library build, and I check that when compiling projects that consume the lib that I built locally. I populate that dir by running this command from the root of the TinyCLR Library source dir:

FOR /F "TOKENS=*" %f in ('DIR /B /S *.nupkg') do copy /y "%~f" "x:\nugetrepo\tinyclr"

I AM able to compile TinyCLR Libraries with both nuget.org and my local build selected, and generally I just leave it set that way. I unchecked it here for illustration. Your problem may be arising because you are also pointing at a downloaded copy. Just guessing here as I haven’t hit this particular problem.

3 Likes

Thanks Martin.
I decided to clone the repository again and build without changes to v1.0.3 that it was set for, without changing to 2.1.0.preview1 as I did before and I was able to build the source this time and it was able to build the libraries.

I then added the DLL files to the main project and it would compiler so far and then give the following error:

Error		Could not find file 'C:\VSsource\Visual Studio 2019\OvenControlSITcore\OvenControlSITcore.nuspec'.	OvenControlSITcore			
Error		The command ""C:\VSsource\Visual Studio 2019\OvenControlSITcore\packages\GHIElectronics.Tools.NuGetPacker.1.0.3\build\..\..\NuGet.CommandLine.4.4.1\tools\NuGet.exe" pack "C:\VSsource\Visual Studio 2019\OvenControlSITcore\OvenControlSITcore.nuspec" -NonInteractive -Properties "TargetDir=C:\VSsource\Visual Studio 2019\OvenControlSITcore\bin\Debug\;ProjectDir=C:\VSsource\Visual Studio 2019\OvenControlSITcore\;" -OutputDirectory "C:\VSsource\Visual Studio 2019\OvenControlSITcore\bin\Debug"" exited with code 1.	OvenControlSITcore

OK. I removed all of the build directories and edited the project file to remove some references and now it compiles and runs on the target.

Thanks for your help. Now to add the TinyCLR project to the main project so I can debug it together.

If I build it as a standalone library it works fine and I can reference the DLL files and run my main program.

If I then add the library as an existing project so that I can hopefully debug into it, I get lots of missing DLL files even though I have referenced them. The main source now also shows lots of missing references even though I have added them.

I’ve uploaded the 2 directories for the project if anyone has time to check why this is not working.

http://www.axoninstruments.biz/download/ovencontroller.zip

You changed the csproj files. Revert the change and try it.