Sctt.Common 2.2.6

dotnet add package Sctt.Common --version 2.2.6
                    
NuGet\Install-Package Sctt.Common -Version 2.2.6
                    
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="Sctt.Common" Version="2.2.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sctt.Common" Version="2.2.6" />
                    
Directory.Packages.props
<PackageReference Include="Sctt.Common" />
                    
Project file
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 Sctt.Common --version 2.2.6
                    
#r "nuget: Sctt.Common, 2.2.6"
                    
#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 Sctt.Common@2.2.6
                    
#: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=Sctt.Common&version=2.2.6
                    
Install as a Cake Addin
#tool nuget:?package=Sctt.Common&version=2.2.6
                    
Install as a Cake Tool

版本记录

v1.6.8-alpha

增加阿里云CDN
builder.Services.AddAlibabaCloud(builder.Configuration);

  "AlibabaCloudSetting": {
    "AccessKeyId": "xxxx",
    "AccessKeySecret": "xxxx",
    "Endpoint": "xxxxx"
  },

v1.5.4-alpha

增加企业微信通知common
增加出现异常发送企业微信通知

v1.4.5-alpha

appsetting.json 在Logging内添加
"SysErrorMail": {
  "Enabled": true, // 启用异常邮件 -- 需增加邮件配置
  "ReciveMail": "system@sctt.net" //接收邮箱地址
},
邮件配置如下:
  "MailSetting": {
    "MailBccArray": "ptc.res1@ptctravel.net.cn",
    "MailDccArray": "ptc.res1@ptctravel.net.cn",
    "MailEccArray": "ptc.res1@ptctravel.net.cn",
    "SendMailSmsUrl": "xxx/mail/SmtpSend",
    "SendMailsSmsUrl": "xxx/mail/SmtpSends",
    "Token": "xxxxxxx"
  },

v1.4.4-alpha

  • 增加了 Sctt.Common.Logging 日志Attribute

使用方式

  • // 日志注册 program.cs 中添加
  • builder.Services.AddLoggingSetup(builder.Configuration);

跳过日志监视

方法上加 [SuppressMonitor] 特性

appsetting.json 在Logging内添加
完整Logging配置
"Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    },
    "Console": {
      "FormatterName": "simple",
      "FormatterOptions": {
        "IncludeScopes": false,
        "TimestampFormat": "yyyy-MM-dd HH:mm:ss.fff ",
        "UseUtcTimestamp": true
      }
    },


    "File": {
      "Enabled": false // 启用文件日志,上传到OSS
    },
    "Database": {
      "Enabled": false, // 启用数据库日志
      "MinimumLevel": "Information"
    },

    "Monitor": {
      "GlobalEnabled": true, // 启用全局拦截日志
      "IncludeOfMethods": [], // 拦截特定方法,当GlobalEnabled=false有效
      "ExcludeOfMethods": [], // 排除特定方法,当GlobalEnabled=true有效
      "BahLogLevel": "Information", // Oops.Oh 和 Oops.Bah 业务日志输出级别
      "WithReturnValue": true, // 是否包含返回值,默认true
      "ReturnValueThreshold": 500, // 返回值字符串阈值,默认0全量输出
      "JsonBehavior": "None", // 是否输出Json,默认None(OnlyJson、All)
      "JsonIndented": false, // 是否格式化Json
      "UseUtcTimestamp": false, // 时间格式UTC、LOCAL
      "ConsoleLog": true // 是否显示控制台日志
    }

}
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.6 33 4/21/2026
2.2.5 36 4/21/2026
2.2.4 46 4/17/2026
2.2.3 44 4/16/2026
2.2.2 63 4/2/2026
2.2.1 48 3/31/2026
2.2.0 58 3/19/2026
2.1.20 70 2/7/2026
2.1.8-alpha 62 1/19/2026
Loading failed