Skip to content

Commit

Permalink
Updated configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
mahara committed Jun 12, 2024
1 parent 1de797a commit 882946c
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#### Core EditorConfig Options ####

# Code-style rule options
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options?view=vs-2022
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
# https://github.com/dotnet/roslyn/blob/main/src/VisualStudio/Core/Def/CodeCleanup/readme.md


Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ jobs:
uses: actions/checkout@v3

- name: Setup .NET 8.0 SDK
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
if: ${{ startswith(matrix.framework, 'net8.') }}

- name: Setup .NET 7.0 SDK
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
if: ${{ startswith(matrix.framework, 'net7.') }}

- name: Setup .NET 6.0 SDK
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
if: ${{ startswith(matrix.framework, 'net6.') }}
Expand Down
6 changes: 1 addition & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
-->

<PropertyGroup>

<!--
https://github.com/dotnet/project-system/blob/main/docs/build-acceleration.md
https://devblogs.microsoft.com/visualstudio/vs-toolbox-accelerate-your-builds-of-sdk-style-net-projects/
Expand All @@ -22,20 +21,17 @@
Even if you target .NET 5 or later, having this property is fine.
-->
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>

</PropertyGroup>

<Import Project="Solution.Build.Folders.props" Condition="Exists('Solution.Build.Folders.props')" />
<Import Project="Solution.Build.Properties.props" Condition="Exists('Solution.Build.Properties.props')" />

<PropertyGroup>

<BuildConfigurationFolderName Condition="'$(BuildConfigurationFolderName)' == ''">build</BuildConfigurationFolderName>

<SolutionDir Condition="'$(SolutionDir)' == ''">$(MSBuildThisFileDirectory)</SolutionDir>
<WorkspaceFolderPath Condition="'$(WorkspaceFolderPath)' == ''">$(SolutionDir)</WorkspaceFolderPath>

<BuildConfigurationFolderPath Condition="'$(BuildConfigurationFolderPath)' == ''">$(WorkspaceFolderPath)$(BuildConfigurationFolderName)\</BuildConfigurationFolderPath>

</PropertyGroup>

<Import Project="$(BuildConfigurationFolderPath)Solution.Build.props" />
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
-->
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
Expand Down
4 changes: 2 additions & 2 deletions NHibernate.ObservableCollections-full.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
Expand All @@ -21,7 +20,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6E3FEE79
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
nuget.config = nuget.config
Solution.Build.Folders.props = Solution.Build.Folders.props
Project.Build.Properties.props = Project.Build.Properties.props
Solution.Build.Properties.props = Solution.Build.Properties.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{E8456C26-3E0D-4272-9794-3041D2DC97E8}"
Expand Down
4 changes: 2 additions & 2 deletions NHibernate.ObservableCollections.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
Expand All @@ -21,7 +20,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6E3FEE79
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
nuget.config = nuget.config
Solution.Build.Folders.props = Solution.Build.Folders.props
Project.Build.Properties.props = Project.Build.Properties.props
Solution.Build.Properties.props = Solution.Build.Properties.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{E8456C26-3E0D-4272-9794-3041D2DC97E8}"
Expand Down
25 changes: 25 additions & 0 deletions Project.Build.Properties.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!--
PROPERTIES
-->

<PropertyGroup>
<AssemblyOriginatorKeyFileName>NHibernate.ObservableCollections.snk</AssemblyOriginatorKeyFileName>

<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/mahara/NHibernate.ObservableCollections</RepositoryUrl>
</PropertyGroup>

<PropertyGroup>
<Product>NHibernate.ObservableCollections</Product>
<Authors>NHibernate.ObservableCollections Contributors</Authors>
<CurrentYear>$([System.DateTime]::Now.ToString("yyyy"))</CurrentYear>
<Copyright>Copyright (c) 2007-$(CurrentYear) NHibernate.ObservableCollections - https://github.com/mahara/NHibernate.ObservableCollections</Copyright>

<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/mahara/NHibernate.ObservableCollections</PackageProjectUrl>
<!--<PackageIcon>NHibernate.ObservableCollections.png</PackageIcon>-->
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
-->

<PropertyGroup>

<BuildConfigurationFolderName Condition="'$(BuildConfigurationFolderName)' == ''">build</BuildConfigurationFolderName>
<SourceCodeFolderName Condition="'$(SourceCodeFolderName)' == ''">src</SourceCodeFolderName>
<ArtifactsFolderName Condition="'$(ArtifactsFolderName)' == ''">artifacts</ArtifactsFolderName>
<OutputFolderName Condition="'$(OutputFolderName)' == ''">bin</OutputFolderName>
<IntermediateOutputFolderName Condition="'$(IntermediateOutputFolderName)' == ''">obj</IntermediateOutputFolderName>
<OutputFolderName Condition="'$(OutputFolderName)' == ''">bin</OutputFolderName>
<PackageOutputFolderName Condition="'$(PackageOutputFolderName)' == ''">packages</PackageOutputFolderName>

</PropertyGroup>

</Project>
33 changes: 17 additions & 16 deletions build/Project.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,35 +36,36 @@
<BuildVersionMajor>$(BuildVersion.Split('.')[0])</BuildVersionMajor>
<BuildVersionNoSuffix>$(BuildVersion.Split('-')[0])</BuildVersionNoSuffix>

<AssemblyOriginatorKeyFile>$(BuildConfigurationFolderPath)NHibernate.ObservableCollections.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFileName Condition="'$(AssemblyOriginatorKeyFileName)' == ''">NHibernate.snk</AssemblyOriginatorKeyFileName>
<AssemblyOriginatorKeyFile Condition="'$(AssemblyOriginatorKeyFile)' == ''">$(BuildConfigurationFolderPath)$(AssemblyOriginatorKeyFileName)</AssemblyOriginatorKeyFile>
<SignAssembly Condition="'$(SignAssembly)' == ''">true</SignAssembly>

<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateDocumentationFile Condition="'$(GenerateDocumentationFile)' == ''">true</GenerateDocumentationFile>

<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/mahara/NHibernate.ObservableCollections</RepositoryUrl>
<RepositoryType Condition="'$(RepositoryType)' == ''">git</RepositoryType>
<RepositoryUrl Condition="'$(RepositoryUrl)' == ''">https://github.com/nhibernate/nhibernate-core</RepositoryUrl>
</PropertyGroup>

<!--
https://learn.microsoft.com/en-us/dotnet/standard/library-guidance/nuget
-->
<PropertyGroup>
<Product>NHibernate.ObservableCollections</Product>
<Title>$(Product)</Title>
<Description>$(Product)</Description>
<Authors>NHibernate.ObservableCollections Contributors</Authors>
<CurrentYear>$([System.DateTime]::Now.ToString("yyyy"))</CurrentYear>
<Copyright>Copyright (c) 2007-$(CurrentYear) NHibernate.ObservableCollections - https://github.com/mahara/NHibernate.ObservableCollections</Copyright>
<Product Condition="'$(Product)' == ''">NHibernate</Product>
<Title Condition="'$(Title)' == ''">$(Product)</Title>
<Description Condition="'$(Description)' == ''">$(Product)</Description>
<Authors Condition="'$(Authors)' == ''">NHibernate Contributors</Authors>
<CurrentYear Condition="'$(CurrentYear)' == ''">$([System.DateTime]::Now.ToString("yyyy"))</CurrentYear>
<Copyright Condition="'$(Copyright)' == ''">Copyright (c) $(CurrentYear) NHibernate - https://github.com/nhibernate/nhibernate-core</Copyright>

<VersionPrefix>$(BuildVersion)</VersionPrefix>
<AssemblyVersion>$(BuildVersionMajor).0.0</AssemblyVersion>
<FileVersion>$(BuildVersionNoSuffix)</FileVersion>

<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/mahara/NHibernate.ObservableCollections</PackageProjectUrl>
<!--<PackageIcon>NHibernate.ObservableCollections.png</PackageIcon>-->
<PackageTags>$(Product)</PackageTags>
<PackageLicenseExpression Condition="'$(PackageLicenseExpression)' == ''">MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance Condition="'$(PackageRequireLicenseAcceptance)' == ''">false</PackageRequireLicenseAcceptance>
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == ''">https://github.com/nhibernate/nhibernate-core</PackageProjectUrl>
<!--<PackageIcon Condition="'$(PackageIcon)' == ''">Framework.png</PackageIcon>-->
<PackageTags Condition="'$(PackageTags)' == ''">$(Product)</PackageTags>
<PackageVersion>$(BuildVersion)</PackageVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<ContentTargetFolders>.</ContentTargetFolders>
Expand Down
13 changes: 6 additions & 7 deletions build/Solution.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
-->

<PropertyGroup>

<!--
NOTE: How to specify OutputPath, OutDir, and IntermediateOutputPath manually,
Expand Down Expand Up @@ -65,11 +64,10 @@
- [ProjectName].csproj.nuget.g.props
- [ProjectName].csproj.nuget.g.targets
NuGet also uses MSBuildProjectExtensionsPath further as temporary output path
NuGet also further uses MSBuildProjectExtensionsPath as temporary output path
for NuGet specification files (.nuspec) of the project NuGet package,
by automatically appending Configuration at the end of the path before,
The new path contains, at least, the following files:
by automatically appending Configuration at the end of the path.
That new path contains, at least, the following files:
- [ProjectPackageId].[ProjectPackageVersion].nuspec
- [ProjectPackageId].[ProjectPackageVersion].symbols.nuspec
Expand Down Expand Up @@ -144,7 +142,7 @@
<PackageOutputFolderName Condition="'$(PackageOutputFolderName)' == ''">packages</PackageOutputFolderName>

<!--
https://learn.microsoft.com/en-us/visualstudio/msbuild/property-functions?view=vs-2022
https://learn.microsoft.com/en-us/visualstudio/msbuild/property-functions
https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory
https://github.com/dotnet/msbuild/issues/2456
https://stackoverflow.com/questions/45974279/multi-level-merging-of-msbuild-directory-build-props-files
Expand All @@ -154,6 +152,8 @@

<BuildConfigurationFolderPath Condition="'$(BuildConfigurationFolderPath)' == ''">$(WorkspaceFolderPath)$(BuildConfigurationFolderName)\</BuildConfigurationFolderPath>

<SourceCodeFolderPath Condition="'$(SourceCodeFolderPath)' == ''">$(WorkspaceFolderPath)$(SourceCodeFolderName)\</SourceCodeFolderPath>

<ArtifactsFolderPath Condition="'$(ArtifactsFolderPath)' == ''">$(WorkspaceFolderPath)$(ArtifactsFolderName)\</ArtifactsFolderPath>

<IntermediateOutputBaseFolderPath>$(ArtifactsFolderPath)$(IntermediateOutputFolderName)\</IntermediateOutputBaseFolderPath>
Expand All @@ -176,7 +176,6 @@
<OutDir>$(OutputPath)</OutDir>

<PackageOutputPath>$(ArtifactsFolderPath)$(PackageOutputFolderName)\$(Configuration)\</PackageOutputPath>

</PropertyGroup>

</Project>
3 changes: 2 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!--
https://learn.microsoft.com/en-us/visualstudio/msbuild/property-functions?view=vs-2022
https://learn.microsoft.com/en-us/visualstudio/msbuild/property-functions
https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory
https://github.com/dotnet/msbuild/issues/2456
https://stackoverflow.com/questions/45974279/multi-level-merging-of-msbuild-directory-build-props-files
-->

<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\'))" />

<Import Project="$(WorkspaceFolderPath)Project.Build.Properties.props" />
<Import Project="$(BuildConfigurationFolderPath)Project.Build.props" />
<Import Project="Project.Build.References.props" />

Expand Down
2 changes: 1 addition & 1 deletion tools/Explicit.NuGet.Versions/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!--
https://learn.microsoft.com/en-us/visualstudio/msbuild/property-functions?view=vs-2022
https://learn.microsoft.com/en-us/visualstudio/msbuild/property-functions
https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory
https://github.com/dotnet/msbuild/issues/2456
https://stackoverflow.com/questions/45974279/multi-level-merging-of-msbuild-directory-build-props-files
Expand Down
2 changes: 1 addition & 1 deletion tools/Explicit.NuGet.Versions/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<!--
https://learn.microsoft.com/en-us/visualstudio/msbuild/property-functions?view=vs-2022
https://learn.microsoft.com/en-us/visualstudio/msbuild/property-functions
https://learn.microsoft.com/en-us/visualstudio/msbuild/customize-by-directory
https://github.com/dotnet/msbuild/issues/2456
https://stackoverflow.com/questions/45974279/multi-level-merging-of-msbuild-directory-build-props-files
Expand Down

0 comments on commit 882946c

Please sign in to comment.