SY.AppLogger
1.0.9
dotnet add package SY.AppLogger --version 1.0.9
NuGet\Install-Package SY.AppLogger -Version 1.0.9
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SY.AppLogger" Version="1.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SY.AppLogger" Version="1.0.9" />
<PackageReference Include="SY.AppLogger" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SY.AppLogger --version 1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SY.AppLogger, 1.0.9"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SY.AppLogger@1.0.9
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SY.AppLogger&version=1.0.9
#tool nuget:?package=SY.AppLogger&version=1.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
使用
- 先新建好目录:D:\RunData\Log
- SY.AppLogger.SyLogger.LogInfo($"[测试日志]{DateTime.Now.ToString("yyyyMMdd HH:mm:ss")}");
备注
- REF: https://learn.microsoft.com/zh-cn/nuget/quickstart/create-and-publish-a-package-using-visual-studio?tabs=netcore-cli
- readme文档要使用UTF-8 编码,不然会乱码
- 开源许可证之Apache、MIT、BSD及许可证兼容性分析
安装 nuget 客户端工具
- 下载 nuget.exe,放在 D:\Program Files (x86)\nuget
- 添加环境变量:ctrl+x > 系统 > 高级系统设置 > 环境变量 > 系统变量 > Path > 编辑 > 新建 > D:\Program Files (x86)\nuget
发布包
- 右键项目 > 属性 > 包 > 常规 > 勾选在生成操作期间创建包
- 双击项目打开csproj > 修改版本 > 右键项目 > 打包
- 在“输出”看
一、本地共享包
- 定位到nuget包目录,cmd执行:
nuget add SY.AppLogger.1.0.7.nupkg -source \\10.10.10.242\packages
- 在visual studio中新增nuget源:\10.10.10.242\packages
包只需放置在合适的网络文件共享中; REF :https://learn.microsoft.com/zh-cn/nuget/hosting-packages/local-feeds
二、发布到nuget.org
- 注册登录:https://www.nuget.org/
- 右上角名称 > API Keys > Add API Key
- 注意 Glob Pattern填*, 其他按实际填
- 复制key 后要自行保存,之后无法再进行复制(oy2eyv2l5st455z7rucqx673mkhgh74u7h5vpavkvd6bli)
- 定位到nuget包目录,cmd执行:
// 用dotnet
dotnet nuget push SY.AppLogger.1.0.8.nupkg --api-key oy2eyv2l5st455z7rucqx673mkhgh74u7h5vpavkvd6bli --source https://api.nuget.org/v3/index.json
// 或nuget推送
nuget push SY.SY.AppLogger.1.0.9.nupkg oy2eyv2l5st455z7rucqx673mkhgh74u7h5vpavkvd6bli -Source https://api.nuget.org/v3/index.json
REF: https://learn.microsoft.com/zh-cn/nuget/nuget-org/publish-a-package
三、 发布到自建 NuGet.Server
- 通过本地 HTTP 服务器提供包
- REF: https://learn.microsoft.com/zh-cn/nuget/hosting-packages/nuget-server
四、 发布到自建NuGet 库
- NuGet 库提供用户管理和功能,如丰富的 Web UI,它允许从浏览器中搜索和浏览包,这与 nuget.org 相似
- REF: https://learn.microsoft.com/zh-cn/nuget/hosting-packages/overview
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
ReleaseNotes,发行说明:会在更新选项卡上展示