AdamServices.Extensions.ServiceFileCreator
0.1.2
See the version list below for details.
dotnet add package AdamServices.Extensions.ServiceFileCreator --version 0.1.2
NuGet\Install-Package AdamServices.Extensions.ServiceFileCreator -Version 0.1.2
<PackageReference Include="AdamServices.Extensions.ServiceFileCreator" Version="0.1.2" />
<PackageVersion Include="AdamServices.Extensions.ServiceFileCreator" Version="0.1.2" />
<PackageReference Include="AdamServices.Extensions.ServiceFileCreator" />
paket add AdamServices.Extensions.ServiceFileCreator --version 0.1.2
#r "nuget: AdamServices.Extensions.ServiceFileCreator, 0.1.2"
#addin nuget:?package=AdamServices.Extensions.ServiceFileCreator&version=0.1.2
#tool nuget:?package=AdamServices.Extensions.ServiceFileCreator&version=0.1.2
AdamServices.Extensions.ServiceFileCreator
Utility for creating service files used by AdamServices.Utilities.Managment , serving as an extension for Microsoft Dependency Injection (DI), and used to standardize the type definition of service files across all projects built within the Managment project.
Install
.NET CLI
dotnet add package AdamServices.Extensions.ServiceFileCreator
Package Manager
NuGet\Install-Package AdamServices.Extensions.ServiceFileCreator
Update the configuration of the DI project
Add ServiceFileCreator initialization to the service configurations
.ConfigureServices((context, services) => { services.AddAdamServiceFileCreator(); })
After building the hostbuilder, call the ServiceFileCreator in this way:
host.UseAdamServiceFileCreator();
Set the
DOTNET_ENVIRONMENT
environment variable of the project to the value ofDevelopment
"environmentVariables": { "DOTNET_ENVIRONMENT": "Development" }
An example can be viewed in the test project.
Create service file
After launching the application, the service_info.json
file will appear in the root directory of the repository. In this case, the project should have the following
RepositoryName == AdamServices.SolutionName (e.g. AdamServices.FindRobot)
|
| -- src
| |
| |-- SolutionName (e.g. FindRobot)
| |
| | -- SolutionName.csproj (e.g. FindRobot)
|
| -- AdamServices.SolutionName (e.g. AdamServices.FindRobot)
| -- service_info.json << here it is, the service file
| -- other files (README, LICENSE, git files, etc)
Description of the service file
Fields are filled in automatically:
"services": {
"name": "FindRobot",
"version": "1.0.1.2",
"projectType": "DotnetProject",
},
name
- it is automatically substituted from the assembly name, or changed to the assembly name if the name in the field does not match it. To change this field, you should change the project name.
version
- It is automatically substituted from the build version, or changed to the build version if the entry in the field does not match it. To change this field, you should change the project version.
<PropertyGroup>
...
<Version>0.1.1</Version>
...
</PropertyGroup>
projectType
- It is filled in automatically. Default value: DotnetProject
The remaining fields of the service file are filled in manually, depending on the technical specifications of the project.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.