Skip to content

Commit

Permalink
Build update; remove net5.0 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
tillig committed May 5, 2023
1 parent 6a99eb9 commit 3f32a8f
Show file tree
Hide file tree
Showing 24 changed files with 101 additions and 206 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ csharp_indent_switch_labels = true
csharp_indent_labels = one_less_than_current

; Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:warning

; Avoid this. unless absolutely necessary
dotnet_style_qualification_for_field = false:suggestion
Expand Down
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
"cSpell.words": [
"autofac",
"cref",
"inheritdoc",
"langword",
"multitenancy",
"multitenant",
"paramref",
"seealso",
"typeparam",
"xunit"
],
"dotnet-test-explorer.runInParallel": true,
"dotnet-test-explorer.testProjectPath": "test/**/*.Test.csproj"
"dotnet-test-explorer.testProjectPath": "test/**/*Test.csproj",
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"*.resx": "$(capture).*.resx, $(capture).designer.cs, $(capture).designer.vb"
},
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableRoslynAnalyzers": true
}
53 changes: 38 additions & 15 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
{
"tasks": [{
"args": [
"build",
"${workspaceFolder}/Autofac.AspNetCore.Multitenant.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"command": "dotnet",
"group": {
"isDefault": true,
"kind": "build"
"tasks": [
{
"args": [
"build",
"${workspaceFolder}/Autofac.AspNetCore.Multitenant.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"command": "dotnet",
"group": {
"isDefault": true,
"kind": "build"
},
"label": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile",
"type": "shell"
},
"label": "build",
"problemMatcher": "$msCompile",
"type": "process"
}],
{
"args": [
"test",
"${workspaceFolder}/Autofac.AspNetCore.Multitenant.sln",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary",
"--filter",
"FullyQualifiedName!~Benchmark"
],
"command": "dotnet",
"group": {
"isDefault": true,
"kind": "test"
},
"label": "test",
"problemMatcher": "$msCompile",
"type": "process"
}
],
"version": "2.0.0"
}
2 changes: 1 addition & 1 deletion Autofac.AspNetCore.Multitenant.sln
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ProjectSection(SolutionItems) = preProject
build\stylecop.json = build\stylecop.json
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sandbox.AspNetCore5_To_7", "samples\Sandbox.AspNetCore5_To_6\Sandbox.AspNetCore5_To_7.csproj", "{B64B6D62-AD07-49BE-AF65-3E4C92284AD5}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sandbox.AspNetCore5_To_7", "samples\Sandbox.AspNetCore5_To_7\Sandbox.AspNetCore5_To_7.csproj", "{B64B6D62-AD07-49BE-AF65-3E4C92284AD5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
6 changes: 2 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
image: Ubuntu

version: 6.1.0.{build}

version: 7.0.0.{build}

dotnet_csproj:
version_prefix: "6.1.0"

version_prefix: "7.0.0"
patch: true
file: 'src\**\*.csproj'

Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ try {
# Set version suffix
$branch = @{ $true = $env:APPVEYOR_REPO_BRANCH; $false = $(git symbolic-ref --short -q HEAD) }[$NULL -ne $env:APPVEYOR_REPO_BRANCH];
$revision = @{ $true = "{0:00000}" -f [convert]::ToInt32("0" + $env:APPVEYOR_BUILD_NUMBER, 10); $false = "local" }[$NULL -ne $env:APPVEYOR_BUILD_NUMBER];
$versionSuffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)).Replace('/', '-').Replace('_', '-'))-$revision" }[$branch -eq "master" -and $revision -ne "local"]
$versionSuffix = @{ $true = ""; $false = "$($branch.Substring(0, [math]::Min(10,$branch.Length)).Replace('/', '-'))-$revision" }[$branch -eq "master" -and $revision -ne "local"]

Write-Message "Package version suffix is '$versionSuffix'"

Expand Down
4 changes: 2 additions & 2 deletions build/Analyzers.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<Rule Id="SA1122" Action="None" />
<!-- Using statements must be inside a namespace -->
<Rule Id="SA1200" Action="None" />
<!-- Modifiers are not ordered - .editorconfig handles this -->
<Rule Id="SA1206" Action="None" />
<!-- Fields can't start with underscore -->
<Rule Id="SA1309" Action="None" />
<!-- No single-line statements involving braces -->
<Rule Id="SA1501" Action="None" />
</Rules>
</RuleSet>
47 changes: 0 additions & 47 deletions build/CodeAnalysisDictionary.xml

This file was deleted.

2 changes: 2 additions & 0 deletions build/Test.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<Rule Id="SA1203" Action="None" />
<!-- Enforce order of static vs. non-static members -->
<Rule Id="SA1204" Action="None" />
<!-- Modifiers are not ordered - .editorconfig handles this -->
<Rule Id="SA1206" Action="None" />
<!-- Enforce order of readonly vs. non-readonly members -->
<Rule Id="SA1214" Action="None" />
<!-- Fields can't start with underscore -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CodeAnalysisRuleSet>../../build/Analyzers.ruleset</CodeAnalysisRuleSet>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
</PropertyGroup>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CodeAnalysisRuleSet>../../build/Analyzers.ruleset</CodeAnalysisRuleSet>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>ASP.NET Core support for multitenant DI via Autofac.Multitenant.</Description>
<!-- VersionPrefix patched by AppVeyor -->
<VersionPrefix>0.0.1</VersionPrefix>
<!-- Assembly metadata -->
Expand All @@ -16,12 +15,13 @@
<SignAssembly>true</SignAssembly>
<NeutralLanguage>en-US</NeutralLanguage>
<!-- Frameworks and language features -->
<TargetFrameworks>net7.0;net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CodeAnalysisRuleSet>../../build/Analyzers.ruleset</CodeAnalysisRuleSet>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Packaging -->
Expand All @@ -39,6 +39,8 @@
<EmbedAllSources>true</EmbedAllSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- OmniSharp/VS Code resource generation -->
<CoreCompileDependsOn>PrepareResources;$(CompileDependsOn)</CoreCompileDependsOn>
</PropertyGroup>

<ItemGroup>
Expand All @@ -58,41 +60,34 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework) == 'net5.0' OR $(TargetFramework) == 'netcoreapp3.1'">
<ItemGroup Condition="$(TargetFramework) == 'netcoreapp3.1'">
<!-- ServiceCollection moved from M.E.DI to M.E.DI.Abstractions in v6.0.0 -->
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Autofac.Multitenant" Version="7.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.1">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" Condition="Exists('$(MSBuildThisFileDirectory)../../.git')">
<PrivateAssets>All</PrivateAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemDefinitionGroup>
<EmbeddedResource>
<Generator>MSBuild:Compile</Generator>
<StronglyTypedLanguage>CSharp</StronglyTypedLanguage>
<StronglyTypedFileName>$(IntermediateOutputPath)%(Filename).Designer.cs</StronglyTypedFileName>
<StronglyTypedClassName>%(Filename)</StronglyTypedClassName>
</EmbeddedResource>
</ItemDefinitionGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<StronglyTypedNamespace>Autofac.Integration.AspNetCore.Multitenant.Properties</StronglyTypedNamespace>
</EmbeddedResource>
</ItemGroup>

</Project>

This file was deleted.

Loading

0 comments on commit 3f32a8f

Please sign in to comment.