📦 nanoFramework Base Class Library
Перейти к файлу
José Simões d320b5e822
Add `String.Concat` tests (#217)
***NO_CI***
2024-10-23 22:50:25 +01:00
Tests Add `String.Concat` tests (#217) 2024-10-23 22:50:25 +01:00
assets Work CI-CD 2021-11-11 12:50:50 +00:00
config Work CI-CD 2020-12-28 13:24:27 +00:00
nanoFramework.CoreLibrary Switching MathInternal.Min/Max to managed implementations (#208) 2023-11-09 02:32:05 +00:00
nanoFramework.CoreLibrary.NoReflection Clean-up ghost linked files 2023-03-13 19:02:55 +00:00
nanoFramework.TestFramework@619c107fc6 Update test framework sub-module @619c107 2024-09-20 14:19:05 +01:00
.editorconfig Add editor config to solutions (#113) 2020-10-20 15:49:08 +01:00
.github_changelog_generator WOrk CI-CD 2021-05-04 09:26:00 +01:00
.gitignore Update .gitignore 2021-12-02 13:33:14 +00:00
.gitmodules Add Unit Tests (#119) 2021-03-08 12:12:13 +00:00
.runsettings Enable destructor and finalizer tests (#215) 2024-09-20 15:27:39 +01:00
CHANGELOG.md Update CHANGELOG for v1.15.5 2023-11-09 04:07:31 +00:00
LICENSE.md Work CI-CD 2020-12-07 12:37:24 +00:00
NuGet.Config Work CI-CD 2021-11-11 12:50:50 +00:00
README.md Work CI-CD 2022-03-30 12:30:40 +01:00
azure-pipelines.yml Work CI-CD 2024-01-29 15:15:50 +00:00
nanoFramework.CoreLibrary.NoReflection.nuspec Work CI-CD 2022-02-15 19:15:57 +00:00
nanoFramework.CoreLibrary.nuspec Work CI-CD 2022-02-15 19:15:57 +00:00
nanoFramework.CoreLibrary.sln Add Unit Tests for GC (#206) 2023-10-20 10:35:31 +01:00
nanoFramework.CoreLibrary.vssettings Work CD-CI 2020-07-28 15:02:34 +01:00
template.vssettings Add vssettings file (#52) 2017-05-15 09:15:10 +01:00
version.json Work CI-CD 2023-11-09 02:32:57 +00:00

README.md

Quality Gate Status Reliability Rating License NuGet #yourfirstpr Discord

nanoFramework logo


Welcome to the .NET nanoFramework Base Class Library repository

Build status

Component Build Status NuGet Package
Base Class Library Build Status NuGet
Base Class Library w/o reflection Build Status NuGet

BCL Flavours

The .NET nanoFramework Base Class Library is provided in two flavours: with or without support for System.Reflection namespace. The reason for this is that the reflection API adds up a significant size to the DLL and image size. For targets with smaller flash this can be prohibitive.

Unit Test

nanoFramework has a dedicated Unit Test framework. This repository has Unit Test and you will find all of them under the Tests folder. The main solution embed all all the tests as well. You can run them directly from Visual Studio and create new tests. For more information on the Unit Test Framework.

CoreLibrary has specific needs that differ from what you'll find in the documentation:

  • You need to have the nanoFramework.TestFramework as a NuGet package as it will bring the nanoCLR Win32 emulator
  • You need to remove the reference to mscorlib, nanoFramework.TestFramework and nanoFramework.UnitTestLauncher
  • Use project reference instead for all those 3 elements

You can then run the test either on a real device, either in the emulator as described in the documentation. You may have to manually flash your device for the mscorlib version to match the one you are building on.

Important: Any new code checked in this repository will have to:

  • have a proper test covering for all the methods, properties, events and the possible exceptions,
  • do not break more of the the existing tests meaning, in other words, it should not create more issues than already existing.

Test structure and project reference

All the projects are referenced based and to be able to run the tests in the pipeline, in command line and in Visual Studio, it does require a specific structure:

  • The NFUnitTestAdapter project must be present and untouched. It does contains the core elements needed to have the nanoCLR Win32 application present.
  • You need to have a nano.runsettings file in each sub directory you want to run the tests on from Visual Studio
  • If you want to run the tests in command line you have to use the Developer Command Prompt for VS 2019 then you can use from the home cloned lib-CoreLibrary directory a command line like this one:
vstest.console.exe .\Tests\NFUnitTestBitConverter\bin\Release\NFUnitTest.dll  /Settings:.\Tests\NFUnitTestAdapater\nano.runsettings /TestAdapterPath:.\nanoFramework.TestFramework\source\TestAdapter\bin\Debug\net4.8 /Diag:.\log.txt /Logger:trx

Notes:

  • You have to build the TestAdapter from the source in this case. You can use the path to the NuGet as well, this will have the same effect.
  • you have full diagnostic enabled in this case.

Feedback and documentation

For documentation, providing feedback, issues and finding out how to contribute please refer to the Home repo.

Join our Discord community here.

Credits

The list of contributors to this project can be found at CONTRIBUTORS.

License

The nanoFramework Class Libraries are licensed under the MIT license.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behaviour in our community. For more information see the .NET Foundation Code of Conduct.

.NET Foundation

This project is supported by the .NET Foundation.