新增项目程序集签名

修复打包脚本没有正确打包开发环境的问题
master
zhontai 1 year ago
parent 3b8e52c7ee
commit 730e1d1fe3

@ -7,7 +7,7 @@ if ([System.String]::IsNullOrWhiteSpace($apiKey))
{
$apiKey = $env:NUGET_KEY
}
$sourceUrl = "http://localhost:5000/v3/index.json"
$sourceUrl = "https://api.nuget.org/v3/index.json"
Write-Host "buildFolder:" $buildFolder
Write-Host "rootFolder:" $rootFolder
@ -47,7 +47,7 @@ Write-Host "dotnet pack -- start"
foreach($project in $projects) {
$projectFolder = Join-Path $rootFolder $project
Write-Host "projectFolder:" $projectFolder
dotnet pack $projectFolder -p:TargetFrameworks=net8.0 --no-build -c Release /p:SourceLinkCreate=true /p:SolutionDir=$rootFolder -o $nuGetOutputFolder;
dotnet pack $projectFolder --no-build -c Release /p:SourceLinkCreate=true /p:SolutionDir=$rootFolder -o $nuGetOutputFolder;
}
Write-Host "dotnet pack -- end"
# pause

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description>中台接口宿主</Description>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
@ -21,28 +21,28 @@
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Debug'">
<PackageReference Include="FreeSql.Provider.MySql" Version="3.2.803" />
<PackageReference Include="FreeSql.Provider.SqlServer" Version="3.2.803" />
<PackageReference Include="FreeSql.Provider.PostgreSQL" Version="3.2.803" />
<PackageReference Include="FreeSql.Provider.Oracle" Version="3.2.803" />
<PackageReference Include="FreeSql.Provider.Sqlite" Version="3.2.803" />
<PackageReference Include="FreeSql.Provider.MySqlConnector" Version="3.2.803" />
<PackageReference Include="FreeSql.Provider.MySql" Version="3.2.805" />
<PackageReference Include="FreeSql.Provider.SqlServer" Version="3.2.805" />
<PackageReference Include="FreeSql.Provider.PostgreSQL" Version="3.2.805" />
<PackageReference Include="FreeSql.Provider.Oracle" Version="3.2.805" />
<PackageReference Include="FreeSql.Provider.Sqlite" Version="3.2.805" />
<PackageReference Include="FreeSql.Provider.MySqlConnector" Version="3.2.805" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\platform\ZhonTai.Admin\ZhonTai.Admin.csproj" />
<ProjectReference Include="..\..\platform\ZhonTai.ApiUI\ZhonTai.ApiUI.csproj" />
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="7.2.2" />
<PackageReference Include="DotNetCore.CAP.InMemoryStorage" Version="7.2.2" />
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="7.0.0" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.6" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="ZhonTai.Tests" />
<ProjectReference Include="..\..\platform\ZhonTai.Admin\ZhonTai.Admin.csproj" />
<ProjectReference Include="..\..\platform\ZhonTai.ApiUI\ZhonTai.ApiUI.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="7.2.2" />
<PackageReference Include="DotNetCore.CAP.InMemoryStorage" Version="7.2.2" />
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="7.0.0" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.6" />
<InternalsVisibleTo Include="ZhonTai.Tests" />
</ItemGroup>
<ItemGroup>

@ -1,14 +1,13 @@
<Project>
<PropertyGroup>
<Version>5.0.2</Version>
<LangVersion>Latest</LangVersion>
<Version>5.0.3</Version>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
<DocumentationFile>$(MSBuildProjectName).xml</DocumentationFile>
<IsPackable>true</IsPackable>
<Authors>xiaoxue</Authors>
<Company>xiaoxue</Company>
<Company>zhontai</Company>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
@ -18,6 +17,8 @@
<PackageTags>ZhonTai AdminApi;WebApi;HttpApi;</PackageTags>
<PackageIcon>logo.png</PackageIcon>
<NoWarn>1701;1702;1591</NoWarn>
<DocumentationFile>$(MSBuildProjectName).xml</DocumentationFile>
<SignAssembly>true</SignAssembly>
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
</Project>

@ -12,6 +12,10 @@
<None Include="../../../logo.png" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="7.1.0" />
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
@ -22,14 +26,13 @@
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
<PackageReference Include="FreeRedis" Version="1.2.5" />
<PackageReference Include="FreeRedis.DistributedCache" Version="1.2.5" />
<PackageReference Include="FreeSql" Version="3.2.803" />
<PackageReference Include="FreeSql" Version="3.2.805" />
<PackageReference Include="FreeSql.Cloud" Version="1.6.8" />
<PackageReference Include="FreeSql.Repository" Version="3.2.803" />
<PackageReference Include="FreeSql.Repository" Version="3.2.805" />
<PackageReference Include="FreeScheduler" Version="2.0.12" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="3.0.1" />
<PackageReference Include="Lazy.SlideCaptcha.Core" Version="2.0.0" />
<PackageReference Include="Mapster" Version="7.4.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" />
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" />
<PackageReference Include="NLog" Version="5.2.5" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.5" />
@ -40,11 +43,21 @@
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="UAParser" Version="3.1.47" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
<PackageReference Include="System.Net.Primitives" Version="4.3.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="7.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ZhonTai.Common\ZhonTai.Common.csproj" />
<ProjectReference Include="..\ZhonTai.DynamicApi\ZhonTai.DynamicApi.csproj" />

@ -13,16 +13,18 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="7.0.14" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />

@ -322,7 +322,9 @@
</member>
<member name="M:ZhonTai.Common.Helpers.DataMaskHelper.PhoneMaskRegex">
<remarks>
Pattern explanation:<br/>
Pattern:<br/>
<code>(\\d{3})\\d{4}(\\d{4})</code><br/>
Explanation:<br/>
<code>
○ 1st capture group.<br/>
○ Match a Unicode digit exactly 3 times.<br/>
@ -334,7 +336,9 @@
</member>
<member name="M:ZhonTai.Common.Helpers.DataMaskHelper.EmailMaskRegex">
<remarks>
Pattern explanation:<br/>
Pattern:<br/>
<code>(?&lt;=.{2})[^@]+(?=.{2}@)</code><br/>
Explanation:<br/>
<code>
○ Zero-width positive lookbehind.<br/>
○ Match a character other than '\n' exactly 2 times right-to-left.<br/>
@ -347,19 +351,21 @@
</member>
<member name="M:ZhonTai.Common.Helpers.DataMaskHelper.IPMaskRegex">
<remarks>
Pattern explanation:<br/>
Pattern:<br/>
<code>([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})</code><br/>
Explanation:<br/>
<code>
○ 1st capture group.<br/>
○ Match '0' through '9' atomically at least 1 and at most 3 times.<br/>
○ Match a character in the set [0-9] atomically at least 1 and at most 3 times.<br/>
○ Match '.'.<br/>
○ 2nd capture group.<br/>
○ Match '0' through '9' atomically at least 1 and at most 3 times.<br/>
○ Match a character in the set [0-9] atomically at least 1 and at most 3 times.<br/>
○ Match '.'.<br/>
○ 3rd capture group.<br/>
○ Match '0' through '9' atomically at least 1 and at most 3 times.<br/>
○ Match a character in the set [0-9] atomically at least 1 and at most 3 times.<br/>
○ Match '.'.<br/>
○ 4th capture group.<br/>
○ Match '0' through '9' atomically at least 1 and at most 3 times.<br/>
○ Match a character in the set [0-9] atomically at least 1 and at most 3 times.<br/>
</code>
</remarks>
</member>
@ -566,7 +572,9 @@
</member>
<member name="M:ZhonTai.Common.Helpers.PasswordHelper.RegexPassword">
<remarks>
Pattern explanation:<br/>
Pattern:<br/>
<code>^(?=.*[a-zA-Z])(?=.*\\d)[a-zA-Z\\d!@#$%^&amp;.*]{6,16}$</code><br/>
Explanation:<br/>
<code>
○ Match if at the beginning of the string.<br/>
○ Zero-width positive lookahead.<br/>
@ -808,5 +816,14 @@
<member name="F:System.Text.RegularExpressions.Generated.Utilities.s_hasTimeout">
<summary>Whether <see cref="F:System.Text.RegularExpressions.Generated.Utilities.s_defaultTimeout"/> is non-infinite.</summary>
</member>
<member name="M:System.Text.RegularExpressions.Generated.Utilities.IndexOfAnyDigit(System.ReadOnlySpan{System.Char})">
<summary>Finds the next index of any character that matches a Unicode digit.</summary>
</member>
<member name="F:System.Text.RegularExpressions.Generated.Utilities.s_asciiExceptDigits">
<summary>Supports searching for characters in or not in "\0\u0001\u0002\u0003\u0004\u0005\u0006\a\b\t\n\v\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&amp;'()*+,-./:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\u007f".</summary>
</member>
<member name="F:System.Text.RegularExpressions.Generated.Utilities.s_asciiLetters">
<summary>Supports searching for characters in or not in "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".</summary>
</member>
</members>
</doc>

@ -5,6 +5,15 @@
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.14" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.14" />
@ -15,15 +24,6 @@
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\hosts\ZhonTai.Host\ZhonTai.Host.csproj" />
</ItemGroup>

@ -15,9 +15,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "hosts", "hosts", "{0600A063
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4A1F23C8-24A6-4571-B3DE-D27D024A051D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{A6C50476-5236-4FD3-8C29-6449494846C0}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "02.build", "02.build", "{A6C50476-5236-4FD3-8C29-6449494846C0}"
ProjectSection(SolutionItems) = preProject
build\pkg.props = build\pkg.props
src\platform\Directory.Build.props = src\platform\Directory.Build.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "01.sln", "01.sln", "{B5DE2B4F-A7DB-433D-8E98-5C352EFAE88B}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
EndProjectSection
EndProject
Global

@ -1,3 +1,7 @@
<Project>
<Import Project="..\build\pkg.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<PackageZhonTaiVersion>5.0.3</PackageZhonTaiVersion>
<PackageFreeSqlVersion>3.2.805</PackageFreeSqlVersion>
</PropertyGroup>
</Project>

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Description>MyApp接口宿主</Description>
</PropertyGroup>
@ -17,8 +17,8 @@
<ItemGroup>
<!--#if (!NoCap) -->
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="7.2.0" />
<PackageReference Include="DotNetCore.CAP.InMemoryStorage" Version="7.2.0" />
<PackageReference Include="DotNetCore.CAP.Dashboard" Version="7.2.2" />
<PackageReference Include="DotNetCore.CAP.InMemoryStorage" Version="7.2.2" />
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="7.0.0" />
<!--#endif -->
<!--#if (DbType == "MySql") -->
@ -44,7 +44,7 @@
<!--#else -->
<PackageReference Include="FreeSql.Provider.Sqlite" Version="$(PackageFreeSqlVersion)" />
<!--#endif -->
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.5" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.6" />
</ItemGroup>
<ItemGroup>

@ -1,18 +1,23 @@
<Project>
<PropertyGroup>
<Version>3.7.1</Version>
<TargetFramework>net7.0</TargetFramework>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>5.0.0</Version>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<DocumentationFile>$(MSBuildProjectName).xml</DocumentationFile>
<IsPackable>true</IsPackable>
<Authors>xiaoxue</Authors>
<Company>zhontai</Company>
<PackageZhonTaiVersion>3.7.1</PackageZhonTaiVersion>
<PackageFreeSqlVersion>3.2.700</PackageFreeSqlVersion>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://admin.zhontai.net</PackageProjectUrl>
<RepositoryUrl>https://github.com/zhontai/Admin.Core</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>ZhonTai Admin Api;MVC;WebApi;HttpApi;Api;</PackageTags>
<NoWarn>1701;1702;1591</NoWarn>
<SignAssembly>true</SignAssembly>
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
</Project>

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>MyApp接口库</Description>
<OpenApiGenerateDocuments>false</OpenApiGenerateDocuments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>MyApp.Api.xml</DocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>
@ -18,6 +18,10 @@
<Folder Include="Repositories\Module\" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<Target Name="AfterTargetsBuild" AfterTargets="Build">
<ItemGroup>
<PackageReferenceFiles Condition="'%(PackageReference.CopyToOutputDirectory)' != ''" Include="$(NugetPackageRoot)\$([MSBuild]::Escape('%(PackageReference.Identity)').ToLower())\%(PackageReference.Version)\%(PackageReference.CopyToOutputDirectory)" />

@ -1,21 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>MyApp测试库</Description>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.10" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.14" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.14" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' ">
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\hosts\MyApp.Host\MyApp.Host.csproj" />
</ItemGroup>

@ -0,0 +1,59 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>MyApp.Tests</name>
</assembly>
<members>
<member name="T:MyApp.Tests.BaseControllerTest">
<summary>
Api测试基础
</summary>
</member>
<member name="T:MyApp.Tests.BaseTest">
<summary>
测试基础
</summary>
</member>
<member name="T:MyApp.Tests.Controllers.ModuleControllerTest">
<summary>
模块Api测试
</summary>
</member>
<member name="T:MyApp.Tests.Repositories.ModuelRepositoryTest">
<summary>
模块仓储测试
</summary>
</member>
<member name="T:MyApp.Tests.ResultOutput`1">
<summary>
返回结果
</summary>
<typeparam name="T"></typeparam>
</member>
<member name="P:MyApp.Tests.ResultOutput`1.Success">
<summary>
是否成功标记
</summary>
</member>
<member name="P:MyApp.Tests.ResultOutput`1.Code">
<summary>
状态码
</summary>
</member>
<member name="P:MyApp.Tests.ResultOutput`1.Msg">
<summary>
消息
</summary>
</member>
<member name="P:MyApp.Tests.ResultOutput`1.Data">
<summary>
数据
</summary>
</member>
<member name="T:MyApp.Tests.Services.ModuleServiceTest">
<summary>
模块服务测试
</summary>
</member>
</members>
</doc>
Loading…
Cancel
Save