This commit is contained in:
Jay 2023-04-05 20:04:21 +02:00 коммит произвёл GitHub
Родитель 840621bc25
Коммит e10f1d5246
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
12 изменённых файлов: 53 добавлений и 36 удалений

Просмотреть файл

@ -2,6 +2,6 @@
See [Contributing](https://github.com/dotnet/runtime/blob/main/CONTRIBUTING.md) for information about coding styles, source structure, making pull requests, and more.
# Repos
# Repositories
See the [.NET Repos](Documentation/core-repos.md) to find a repo to contribute to.

Просмотреть файл

@ -48,9 +48,9 @@ Microsoft builds will generally load the highest OpenSSL version it finds, but c
Microsoft builds support multiple Red Hat versions. New .NET versions will typically only be supported on RHEL era distributions in active support.
* RHEL 7 era distributions are considered in maintenance.
* RHEL 8 era distributions are considered in active support.
* RHEL 9 era distributions are considered in active support.
- RHEL 7 era distributions are considered in maintenance.
- RHEL 8 era distributions are considered in active support.
- RHEL 9 era distributions are considered in active support.
Red Hat family distributions include: AlmaLinux, CentOS, Oracle Linux, Red Hat Enterprise Linux, and Rocky Linux.

Просмотреть файл

@ -24,5 +24,5 @@ The [`RunApiDiff.ps1`](./RunApiDiff.ps1) script can automatically generate an AP
Examples of what this script generates:
- PR comparing .NET 6.0 vs .NET 7.0 Preview1: https://github.com/dotnet/core/pull/7211
- PR comparing .NET 7.0 Preview1 vs Preview2: https://github.com/dotnet/core/pull/7307
- PR comparing .NET 6.0 vs .NET 7.0 Preview1: <https://github.com/dotnet/core/pull/7211>
- PR comparing .NET 7.0 Preview1 vs Preview2: <https://github.com/dotnet/core/pull/7307>

Просмотреть файл

@ -33,9 +33,8 @@ The following table lists end-of-life releases.
| [.NET Core 1.1](release-notes/1.1/README.md) | [November 16th, 2016](https://devblogs.microsoft.com/dotnet/announcing-net-core-1-1/) | [LTS][policies] | [1.1.13][1.1.13] | [June 27, 2019](https://devblogs.microsoft.com/dotnet/net-core-1-0-and-1-1-will-reach-end-of-life-on-june-27-2019/) |
| [.NET Core 1.0](release-notes/1.0/README.md) | [June 27th, 2016](https://devblogs.microsoft.com/dotnet/announcing-net-core-1-0/) | [LTS][policies] | [1.0.16][1.0.16] | [June 27, 2019](https://devblogs.microsoft.com/dotnet/net-core-1-0-and-1-1-will-reach-end-of-life-on-june-27-2019/) |
[3.1.32]: release-notes/3.1/3.1.32/3.1.32.md
[5.0.17]: release-notes/5.0/5.0.17/5.0.17.md
[2.1.30]: release-notes/2.1/2.1.30/2.1.30.md
[3.1.32]: release-notes/3.1/3.1.32/3.1.32.md
[3.0.3]: release-notes/3.0/3.0.3/3.0.3.md
[2.2.8]: release-notes/2.2/2.2.8/2.2.8.md
[2.1.30]: release-notes/2.1/2.1.30/2.1.30.md

Просмотреть файл

@ -16,4 +16,3 @@ This directory contains .NET samples and documents.
* [Install .NET](https://dotnet.microsoft.com/download/)
* [.NET documentation](https://learn.microsoft.com/dotnet)
* [.NET samples repo](https://github.com/dotnet/samples)

Просмотреть файл

@ -6,7 +6,7 @@ These steps have been tested on a RPi 2 and RPi 3 with Linux and Windows.
Note: All models of generation 1 and Pi Zero are not supported because the .NET Core JIT depends on armv7 instructions not available on those versions.
## Creating an app:
## Creating an app
* [Install .NET Core SDK](https://dotnet.microsoft.com/download) into a supported developer configuration.
(Raspberry Pi itself is supported only as deployment target but there is an unsupported version of the SDK available as well.)
@ -15,7 +15,7 @@ Note: All models of generation 1 and Pi Zero are not supported because the .NET
* Run `dotnet new console`
* You can find a `helloworld.csproj` file is created under current directory.
```
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
@ -28,7 +28,7 @@ Note: All models of generation 1 and Pi Zero are not supported because the .NET
* If you get restore errors, make sure you have a nuget.config file next to your csproj that includes the dotnet-core myget feed: `<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />`.
```
```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
@ -37,23 +37,22 @@ Note: All models of generation 1 and Pi Zero are not supported because the .NET
</configuration>
```
## Publishing an app to run on the Pi:
## Publishing an app to run on the Pi
* Run `dotnet publish -r <runtime identifier>` for example `dotnet publish -r win-arm` to publish the application for windows and `dotnet publish -r linux-arm` for Linux running on Raspberry Pi.
* Under `./bin/Debug/netcoreapp2.1/<runtime identifier>/publish` or `.\bin\Debug\netcoreapp2.1\<runtime identifier>\publish` you will see the whole self contained app that you need to copy to your Raspberry Pi.
## Getting the app to run on the Pi.
## Getting the app to run on the Pi
### Linux
* Install [Linux](https://www.raspberrypi.org/downloads/) on your Pi.
* Install the [platform dependencies from your distro's package manager](https://github.com/dotnet/core/blob/main/Documentation/prereqs.md) for .NET Core. .NET Core depends on some packages from the Linux package manager as prerequisites to running your application.
For Raspbian [Debian 9 Jessie](https://learn.microsoft.com/dotnet/core/linux-prerequisites?tabs=netcore2x#install-net-core-for-debian-8-or-debian-9-64-bit) you need to do the following:
```
```console
sudo apt-get update
sudo apt-get install curl libunwind8 gettext apt-transport-https
```
@ -63,7 +62,6 @@ sudo apt-get install curl libunwind8 gettext apt-transport-https
### Win10 IoT Core
* Install [Windows 10 IoT Core](https://learn.microsoft.com/windows/iot-core/getstarted) on your Pi.
* Copy your app, i.e. whole `publish` directory mentioned above, to the Raspberry Pi and execute run `helloworld.exe` to see `Hello World!` from .NET Core running on your Pi.
**It is important that you copy the `publish` directory contents displayed at the end of the publish operation and not from another location in the `bin` folder.**
@ -86,8 +84,8 @@ Pete Gallagher has also created single line install scripts for .NET Core and .N
Please refer to Pete Gallagher's Blog;
- [.NET Core](https://bit.ly/dotnetcorepi)
- [NET 5](https://bit.ly/dotnet5pi)
* [.NET Core](https://bit.ly/dotnetcorepi)
* [NET 5](https://bit.ly/dotnet5pi)
## GPIO access / communicating with hardware

Просмотреть файл

@ -5,6 +5,7 @@ At this moment, the focus is on getting standalone applications running.
Unless explicitly mentioned, x86_64 and ARM platforms are supported.
## Getting started with base OS image
Instructions below assume familiarity with Yocto build process.
Initial testing as been done on 2.2 Morty but it is probably applicable to
other versions as well. .NET Core 2.0 Preview2 or later should be used.
@ -50,7 +51,7 @@ DEFAULTTUNE_virtclass-multilib-lib64 = "x86"
Write and debug your app. When ready to publish, use:
```
```console
dotnet publish -r <runtime identifier>
```
@ -60,4 +61,4 @@ For ARM and more details you can take a look at [RaspberryPiInstructions](Raspbe
Package `bin/Debug/netcoreapp2.0/<runtime identifier>/publish` to your image.
That directory has the native executable binary as well as all needed runtime dependencies.
After following these steps to configure Yocto, .NET Core applications should run just like they do on other supported Linux distros.
After following these steps to configure Yocto, .NET Core applications should run just like they do on other supported Linux distros.

Просмотреть файл

@ -17,6 +17,7 @@ You can use the command `dotnet --info` to check which versions of .NET Core SDK
Here are the step by step instructions on how to use dotnet-svcutil.xmlserializer in a .NET Core console application.
1. Create a WCF Service named 'MyWCFService' using the default template 'WCF Service Application' in .NET Framework. Add ```[XmlSerializerFormat]``` attribute on the service method like the following
```c#
[ServiceContract]
public interface IService1
@ -26,19 +27,25 @@ Here are the step by step instructions on how to use dotnet-svcutil.xmlserialize
string GetData(int value);
}
```
2. Create a .NET Core console application as WCF client application that targets at netcoreapp 2.1, e.g. create an app named 'MyWCFClient' with the command,
```
```console
dotnet new console --name MyWCFClient
```
Make sure your csproj targets a netcoreapp 2.1 as the following in .csproj. This is done using the following XML element in your .csproj
```xml
<TargetFramework>netcoreapp2.1</TargetFramework>
```
3. Add a package reference to System.ServiceModel.Http
Run command: `dotnet add package System.ServiceModel.Http -v 4.5.0`
4. Add WCF Client code
```c#
using System.ServiceModel;
@ -63,11 +70,13 @@ Here are the step by step instructions on how to use dotnet-svcutil.xmlserialize
string GetData(int value);
}
```
5. Edit the .csproj and add a reference to the dotnet-svcutil.xmlserializer package. For example,
i. Run command: `dotnet add package dotnet-svcutil.xmlserializer -v 1.0.0`
ii. Add the following lines in MyWCFClient.csproj,
```xml
<ItemGroup>
<DotNetCliToolReference Include="dotnet-svcutil.xmlserializer" Version="1.0.0" />
@ -76,4 +85,4 @@ Here are the step by step instructions on how to use dotnet-svcutil.xmlserialize
6. Build the application by running `dotnet build`. If everything succeeds, an assembly named MyWCFClient.XmlSerializers.dll will be generated in the output folder. You will see warnings in the build output if the tool failed to generate the assembly.
7. Start the WCF service e.g. running http://localhost:2561/Service1.svc in the IE. Then start the client application and it will automatically load and use the pre-generated serializers at runtime.
7. Start the WCF service e.g. running <http://localhost:2561/Service1.svc> in the IE. Then start the client application and it will automatically load and use the pre-generated serializers at runtime.

Просмотреть файл

@ -1,6 +1,6 @@
# Using IL Linker Advanced Features
***Note:*** In 3.0, the linker has shipped as part of the SDK (still marked as "preview"), and the out-of-band nuget package is no longer supported. Please see the new instructions at https://aka.ms/dotnet-illink.
***Note:*** In 3.0, the linker has shipped as part of the SDK (still marked as "preview"), and the out-of-band nuget package is no longer supported. Please see the new instructions at <https://aka.ms/dotnet-illink>.
This document describes the more advanced features for the IL Linker and provides more insight into how it functions.

Просмотреть файл

@ -1,6 +1,6 @@
# Using the .NET IL Linker
***Note:*** In 3.0, the linker has shipped as part of the SDK (still marked as "preview"), and the out-of-band nuget package is no longer supported. Please see the new instructions at https://aka.ms/dotnet-illink.
***Note:*** In 3.0, the linker has shipped as part of the SDK (still marked as "preview"), and the out-of-band nuget package is no longer supported. Please see the new instructions at <https://aka.ms/dotnet-illink>.
The .NET team has built a linker to reduce the size of .NET Core applications. It is built on top of the excellent and battle-tested [mono linker](https://github.com/mono/linker). The Xamarin tools also use this linker.
@ -22,9 +22,9 @@ The instructions assume you are using [.NET Core 2.0](https://github.com/dotnet/
* Create one with `dotnet new console -o testapp`; `cd testapp`, or
* Clone / download the [.NET Core self-contained application Docker Production Sample -- using .NET IL Linker].
1. Add a NuGet.Config file in the root of your project, using the following:
* `dotnet new nuget`
* Add this line to nuget.config, under `<clear />`: `<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />`
* The final file should look like [nuget.config](nuget.config).
* `dotnet new nuget`
* Add this line to nuget.config, under `<clear />`: `<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />`
* The final file should look like [nuget.config](nuget.config).
1. Add a reference to the [latest version of the linker package](https://dotnet.myget.org/feed/dotnet-core/package/nuget/ILLink.Tasks) in your .csproj, using the command below. As of writing, that version is `0.1.5-preview-1841731`:
* `dotnet add package ILLink.Tasks -v 0.1.5-preview-1841731`
1. Publish the application, using the following:

Просмотреть файл

@ -1,4 +1,4 @@
# Using Xml Serializer Generator on .NET Core
# Using Xml Serializer Generator on .NET Core
Like the Xml Serializer Generator (sgen.exe) on desktop, Microsoft.XmlSerializer.Generator NuGet package is the solution for .NET Core and .NET Standard Libraries. It creates an Xml serialization assembly for types contained in an assembly to improve the startup performance of Xml serialization when serializing or de-serializing objects of those types using XmlSerializer.
@ -15,30 +15,38 @@ The following is required for Microsoft.XmlSerializer.Generator to work. You can
Here are the step by step instructions on how to use Xml Serializer Generator in a .NET Core console application.
1. Create a .NET Core console application, e.g. create an app named 'MyApp' with the command,
```
```console
dotnet new console --name MyApp
```
1. Edit the .csproj and add a reference to the Microsoft.XmlSerializer.Generator package. For example,
1. Run command: `dotnet add package Microsoft.XmlSerializer.Generator -v 1.0.0`
1. Add the following lines in MyApp.csproj,
```xml
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.XmlSerializer.Generator" Version="1.0.0" />
</ItemGroup>
```
1. Add a class in the application. For example, add the class below in Program.cs,
```c#
public class MyClass
{
public int Value;
}
```
Now you can create an `XmlSerializer` for MyClass.
```
Now you can create an `XmlSerializer` for MyClass.
```c#
var serializer = new System.Xml.Serialization.XmlSerializer(typeof(MyClass));
```
```
1. Build the application by running `dotnet build`. If everything succeeds, an assembly named MyApp.XmlSerializers.dll will be generated in the output folder. You will see warnings in the build output if the tool failed to generate the assembly.
Start the application and it will automatically load and use the pre-generated serializers at runtime.

Просмотреть файл

@ -1,6 +1,9 @@
DOTNET.BOOTSTRAP(1)
### NAME
.NET CLI Bootstrapping Tool - A tool to help you bootstrap the .NET Command Line Tool on unsupported platforms.
### DESCRIPTION
The current .NET CLI Bootstrapping Tool (dotnet.bootstrap.py) has been deprecated. The documentation on how to use the new replacement script for .NET CLI Bootstrapping and where it can be found is defined here - https://github.com/dotnet/source-build/blob/main/Documentation/boostrap-new-os.md.
The current .NET CLI Bootstrapping Tool (dotnet.bootstrap.py) has been deprecated. The documentation on how to use the new replacement script for .NET CLI Bootstrapping and where it can be found is defined here: <https://github.com/dotnet/source-build/blob/main/Documentation/boostrap-new-os.md>.