Π·Π΅Ρ€ΠΊΠ°Π»ΠΎ ΠΈΠ·
1
0
Π€ΠΎΡ€ΠΊΠ½ΡƒΡ‚ΡŒ 0
🧰 metadata processor (.NET nanoFramework toolbox)
ΠŸΠ΅Ρ€Π΅ΠΉΡ‚ΠΈ ΠΊ Ρ„Π°ΠΉΠ»Ρƒ
Mateusz Klatecki aba8387202
Add check for byte code table size (#170)
2024-10-29 12:00:35 +00:00
MetadataProcessor.Console Add publishing of NuGet package with CLI version (#167) 2024-08-13 14:20:56 +01:00
MetadataProcessor.Core Update dependencies (#165) 2024-06-12 09:10:49 +01:00
MetadataProcessor.MsBuildTask Update dependencies (#165) 2024-06-12 09:10:49 +01:00
MetadataProcessor.Shared Add check for byte code table size (#170) 2024-10-29 12:00:35 +00:00
MetadataProcessor.Tests Method flags now processes finalizer (#169) 2024-09-19 02:31:42 +01:00
assets Work CI-CD 2021-11-25 14:14:55 +00:00
azure-pipelines Work CI-CD 2023-06-02 14:10:42 +01:00
config Remove unused files 2024-04-11 14:06:28 +01:00
native Update version.json 2021-04-12 23:05:46 +01:00
.gitattributes Initial commit 2019-06-19 14:53:27 +01:00
.gitignore Update gitignore 2020-02-19 11:11:37 +00:00
.gitmodules Improvements in Unit Tests (#131) 2021-01-04 13:31:43 +00:00
LICENSE.md Work CI-CD 2020-12-02 18:20:56 +00:00
NuGet.Config Work CI-CD 2024-06-12 04:14:42 +01:00
README.md Add publishing of NuGet package with CLI version (#167) 2024-08-13 14:20:56 +01:00
azure-pipelines.yml Work CI-CD 2024-09-19 03:05:42 +01:00
nanoFramework.Tools.MetadataProcessor.sln Work CI-CD 2022-10-06 10:52:32 +01:00
version.json Migrate MSBuildTask project to SDK project (#140) 2022-01-17 17:22:38 +00:00

README.md

License #yourfirstpr Build Status Discord

nanoFramework logo


Welcome to the .NET nanoFramework metadata processor repository

This repo contains .NET nanoFramework metadata processor tool. It's a console app that performs various tasks when running a build of a C# project, like parsing the PE file generated by Roslyn, generating the PDBX files, generate the stubs for native code. Is part of .NET nanoFramework toolbox, along with other various tools that are required in .NET nanoFramework development, usage or repository management.

Version 2.0 is a C# application adapted from the original work of Oleg Rakhmatulin. Version 1.0 was a Visual C++ application adapted from .NETMF toolbox.

Using the metadata processor

The metadata processor is available in two packages.

The main use of the metadata processor is packaged as a MSBuild task: nanoFramework.Tools.MetadataProcessor.MsBuildTask. The task is well integrated into the .NET nanoFramework build system and is distributed as part of the VS extensions. Almost all use cases can be addressed by the build system as it is, or by setting build variables for, e.g., additional logging.

There are few use cases where the build task cannot be used. E.g., in software that generates source code at runtime, compiles the code via Roslyn, executes it on the virtual device, and uses the output for further processing. The metadata processor is required as a companion to Roslyn to convert the generated .NET assemblies to .NET nanoFramework .pe assemblies. The second package, nanoFramework.Tools.MetadataProcessor.CLI, contains a CLI version of the tool for this purpose. It is packaged as content: if added to a project, the tool will be distributed with the results of that project. If the package is added to a non-SDK-style project (e.g., .NET Framework project), make sure to set the Copy to Output Directory property for the files, as the package manager does not automatically do that. The code in the project should run the CLI with arguments -loadhints, -parse and -compile (in that order!) to create the .pe assembly.

Developers guide

Cloning the repository

After cloning the repository, instantiate the submodules with:

git submodule update --init --recursive

After which the NuGet packages in both the main solution and the mscorelib solution included within a submodule have to be restored. These have to be restored individually.

Adding projects to the solution

When adding a project to the solution the following points have to be kept in mind for configuring the project and solution:

  • nanoFramework projects (.nfproj) have to be build in AnyCPU configuration.
  • DLLs for msbuild tasks have to be build in x64 because Visual Studio uses this architecture since VS2022.
  • Any nanoFramework projects (.nfproj) that are required for Unit Tests have to have their build configuration changed so they don't build. Building those has to be added to the pre-build event of the Unit Test project that will be using it. See the prebuild event for the MetadataProcessor.Tests project. When adding nanoFramework projects to the pre-build event it is important to add the -nr=False flag[1].
  1. This flag disables "nodeReuse", this is needed as a custom MsBuildTask is used which also gets rebuilt. "NodeReuse" keeps instances of MsBuild running which interferes with the rebuilding of the custom MsBuildTask.

Feedback and documentation

To provide feedback, report 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 metadata processor tool is 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.