Giter Site home page Giter Site logo

torutek / meta-dotnet-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rdunkley/meta-dotnet-core

0.0 0.0 0.0 287 KB

BitBake recipes to use the pre-built binaries provided by Microsoft for .Net Core and their remote debugger.

License: MIT License

Shell 0.01% BitBake 99.99%

meta-dotnet-core's Introduction

meta-dotnet-core

BitBake recipes to use the pre-built binaries provided by Microsoft for the following applications:

  1. .Net Core 2.x, 3.x, (Use pre-honister branch)
  2. .Net 5.x, 6.x, 7.x, and 8.x
  3. ASP .Net Core 2.x, 3.x (Use pre-honister branch)
  4. .Net 5.x, 6.x, 7.x, and 8.x
  5. Visual Studio Remote Debugger (2017, 2019, and 2022)

.Net Core 2.x, 3.x, and .Net 5.x, 6.x, 7.x, 8.x

This package will place the .Net Core runtime binaries into the image under /usr/share/dotnet. The package only supports X64 and ARM (32-bit and 64-bit) architectures. It does not build the runtime from source. It only pulls the publicly available binaries. Add this package by adding "dotnet-core" to the CORE_IMAGE_EXTRA_INSTALL line of your local.conf file.

ASP .Net Core 2.x, 3.x, and .Net 5.x, 6.x, 7.x, 8.x

This package will place the ASP .Net Core runtime binaries into the image under /usr/share/dotnet. The package only supports X64 and ARM (32-bit and 64-bit) architectures. It does not build the runtime from source it only pulls the publicly available binaries. Add this package by adding "aspnet-core" to the CORE_IMAGE_EXTRA_INSTALL line of your local.conf file. This package also provides the .Net Core runtime environment so care should be taken to avoid adding this recipe and the .Net Core one (may add a PROVIDES virtual down the road).

Visual Studio Remote Debugger

This package will place the vsdbg runtime binaries into the image under the root's home folder. The package only supports X64 and ARM (32-bit only) architectures for .Net Core 2.x and X64, ARM, and ARM64 for .Net Core 3.x on. It does not build these libraries from source. These binaries are not open source. Care should be taken to ensure the proprietary license can be adhered to for the given application. Add this package by adding "vsdbg" to the CORE_IMAGE_EXTRA_INSTALL line of your local.conf file.

Attaching to a process should work in Visual Studio, but you can also launch or attach to processes using json files. Below are examples of how this can be done. I believe this can also be done in Visual Studio Code, but I haven't tested it. These are based on the tutorial given here:

https://github.com/Microsoft/MIEngine/wiki/Offroad-Debugging-of-.NET-Core-on-Linux---OSX-from-Visual-Studio

Attaching to an Existing Process using a Launch Script

{
	"version": "0.2.0",
	// Specify a local application to use to connect in and run the command over ssh. Below is an example of using plink.exe (putty) on windows.
	"adapter": "C:\\putty\\plink.exe",
	// Specify the username and ip address to connect into. I also added logging, remove everything after '--heartbeat=1' to omit the logging.
	"adapterArgs": "[email protected] -batch -T /home/root/.vs-debugger/vs2022/vsdbg --interpreter=vscode --heartbeat=1 --engineLogging=/mnt/share/vsdbgeng.log.txt | tee /mnt/share/vsdbg.log.txt",
	"configurations": [
		{
			"name": ".NET Core Remote Attach",
			"type": "coreclr",
			"request": "attach",
			// replace with the process id you want to attach to.
			"processId": 1283
		}
	]
}

Running the Application in a New Process

{
	"version": "0.2.0",
	// Specify a local application to use to connect in and run the command over ssh. Below is an example of using plink.exe (putty) on windows.
	"adapter": "C:\\putty\\plink.exe",
	"adapterArgs": "[email protected] -batch -T ~/.vs-debugger/vs2019/vsdbg --interpreter=vscode",
	"configurations": [
		{
			"name": ".NET Core Launch",
			"type": "coreclr",
			"cwd": "~/",
			"program": "/mnt/share/app_to_debug.dll",
			"request": "launch"
		}
	]
}

Dependencies

This layer depends on:

URI Layers
git://git.openembedded.org/bitbake
git://git.openembedded.org/openembedded-core meta
git://git.yoctoproject.org/meta meta
git://git.openembedded.org/meta-openembedded meta-oe
git://git.openembedded.org/meta-openembedded meta-python
git://git.openembedded.org/meta-openembedded meta-networking

Patches

Please submit any patches against this layer using pull requests in github or open up an issue.

Table of Contents

  1. Adding the meta-dotnet-core to your build
  2. Curl Configuration and Modification (pre-honister branch only)
  3. Specific Versions

1. Adding the meta-dotnet-core to your build

In order to use this layer, you need to make the build system aware of it.

Assuming the meta-dotnet-core layer exists at the top-level of your yocto build tree, you can add it to the build system by adding the location of the layer to bblayers.conf, along with any other layers needed. e.g.:

  BBLAYERS ?= " \
    /path/to/yocto/meta \
    /path/to/yocto/meta-poky \
    /path/to/yocto/meta-yocto-bsp \
    /path/to/yocto/meta-dotnet-core \
    "

2. Curl Configuration and Modification (pre-honister branch only)

The following must be added to your local.conf file to enable specific support that is required in curl for 2.x and 3.x versions of .Net Core:

  PACKAGECONFIG_pn-curl = "vers krb5 ssl zlib ipv6"

NOTE: this layer will modify the curl library to contain the CURL_OPENSSL_3 versioned symbols. If .Net 5.x or above is targetted then this bbappend can be disabled.

3. Specific Versions

You can select a specific version by adding the following line to your local.conf file:

PREFERRED_VERSION_<package name> = "<version>"

For example:

PREFERRED_VERSION_dotnet-core = "5.0.0"

meta-dotnet-core's People

Contributors

rdunkley avatar dunkleyr avatar cjzzz avatar epictek avatar anthonywolfe avatar fedegiova avatar geoffrey-vl avatar jeroenvandezande avatar antaveiv avatar matthijsderidder avatar pagdot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.