diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8fc2252 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,47 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + groups: + actions: + patterns: + - actions/* + - DragoAnt/* + - NuGet/* + + - package-ecosystem: nuget + directory: /src + schedule: + interval: weekly + groups: + microsoft: + patterns: + - Microsoft.* + - System.* + - Npgsql.* + testing: + patterns: + - xunit* + - Verify* + - FluentAssertions + ignore: + # Versions after 32.0.0 require a paid maintenance subscription. + - dependency-name: Verify + versions: + - '>32.0.0' + - dependency-name: Verify.XunitV3 + versions: + - '>32.0.0' + # 8.x requires a commercial license. + - dependency-name: FluentAssertions + update-types: + - version-update:semver-major + # One version line per target framework (Directory.Packages.props); a major bump would break the older TFMs. + - dependency-name: Microsoft.* + update-types: + - version-update:semver-major + - dependency-name: Npgsql.* + update-types: + - version-update:semver-major diff --git a/.github/workflows/build_and_publish_nuget.yml b/.github/workflows/build_and_publish_nuget.yml deleted file mode 100644 index 44b0d87..0000000 --- a/.github/workflows/build_and_publish_nuget.yml +++ /dev/null @@ -1,47 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Build and publish to nuget.org - -# Controls when the workflow will run -on: - release: - types: - - published - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - inputs: - PATCH_NUM_SUFFIX: - description: 'Version patch number suffix' - required: true - default: 'beta' - -env: - PROJECT_PATH: 'src/DragoAnt.EntityFrameworkCore.sln' - PACKAGE_OUTPUT_DIRECTORY: '${{ github.workspace }}/output' - NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json' - BUILD_CONFIGURATION: Release - -jobs: - build_publish_nuget: - name: 'Build and publish nuget packages' - runs-on: 'ubuntu-latest' - steps: - - name: 'Checkout' - uses: actions/checkout@v4 - - - name: 'Install dotnet' - uses: actions/setup-dotnet@v4 - with: - global-json-file: "./src/global.json" - - - name: 'Restore packages' - run: dotnet restore ${{ env.PROJECT_PATH }} - - - name: 'Build' - run: dotnet msbuild -t:Build '-p:Configuration=${{ env.BUILD_CONFIGURATION }};PatchNumSuffix=${{ github.event.inputs.PATCH_NUM_SUFFIX }}' ${{ env.PROJECT_PATH }} - - - name: 'Pack' - run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration ${{ env.BUILD_CONFIGURATION }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} '-p:PatchNumSuffix=${{ github.event.inputs.PATCH_NUM_SUFFIX }}' - - - name: 'Push packages' - run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_ORG_API_KEY }} -s ${{ env.NUGET_SOURCE_URL }} --skip-duplicate diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..80b60ba --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: ci + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + build: + name: Build and test + uses: DragoAnt/.github/.github/workflows/dotnet-build.yml@c9f20c11ebd297193a910d965d33bdf37c0d6c42 # main + with: + version: 0.0.0-ci.${{ github.run_number }} + solution: src/DragoAnt.EntityFrameworkCore.slnx diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..eaad265 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,99 @@ +name: release + +on: + release: + types: + - published + +permissions: + contents: read + +concurrency: + group: release-${{ github.event.release.tag_name }} + cancel-in-progress: false + +jobs: + version: + name: Version from tag + runs-on: ubuntu-24.04 + timeout-minutes: 5 + outputs: + version: ${{ steps.version.outputs.version }} + steps: + - name: Validate tag + id: version + env: + TAG: ${{ github.event.release.tag_name }} + PRERELEASE: ${{ github.event.release.prerelease }} + run: | + version="${TAG#[vV]}" + ident='(0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)' + semver="^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-$ident(\.$ident)*)?$" + if ! [[ "$version" =~ $semver ]]; then + echo "::error::release tag '$TAG' is not a SemVer version (vMAJOR.MINOR.PATCH[-prerelease], no build metadata)" + exit 1 + fi + if [[ "$version" == 9999.* ]]; then + echo "::error::9999.x is the local development version and is never published" + exit 1 + fi + if [[ "$PRERELEASE" == "true" && "$version" != *-* ]]; then + echo "::error::the release is marked pre-release but '$TAG' has no -suffix" + exit 1 + fi + if [[ "$PRERELEASE" != "true" && "$version" == *-* ]]; then + echo "::error::'$TAG' is a pre-release version; tick 'Set as a pre-release' on the release" + exit 1 + fi + echo "version=$version" >> "$GITHUB_OUTPUT" + echo "Package version: $version" + + build: + name: Build, test, pack + needs: version + uses: DragoAnt/.github/.github/workflows/dotnet-build.yml@c9f20c11ebd297193a910d965d33bdf37c0d6c42 # main + with: + version: ${{ needs.version.outputs.version }} + pack: true + solution: src/DragoAnt.EntityFrameworkCore.slnx + + publish: + name: Publish to nuget.org + needs: build + runs-on: ubuntu-24.04 + timeout-minutes: 10 + environment: + name: nuget + url: https://www.nuget.org/profiles/${{ vars.NUGET_USER || 'DragoAnt' }} + permissions: + id-token: write + steps: + - name: Download packages + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: ${{ needs.build.outputs.packages-artifact }} + path: packages + + - name: NuGet login (Trusted Publishing) + id: login + continue-on-error: true + uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0 + with: + user: ${{ vars.NUGET_USER || 'DragoAnt' }} + + - name: Push + env: + OIDC_KEY: ${{ steps.login.outputs.NUGET_API_KEY }} + FALLBACK_KEY: ${{ secrets.NUGET_ORG_API_KEY }} + run: | + if [ -n "$OIDC_KEY" ]; then + key="$OIDC_KEY" + echo "Pushing with a short-lived nuget.org Trusted Publishing key." + elif [ -n "$FALLBACK_KEY" ]; then + key="$FALLBACK_KEY" + echo "::warning::nuget.org Trusted Publishing login failed, falling back to the NUGET_ORG_API_KEY secret. Add a Trusted Publishing policy on nuget.org (this repository, workflow file of this workflow, environment 'nuget') and delete the secret." + else + echo "::error::nuget.org Trusted Publishing login failed and no NUGET_ORG_API_KEY secret is available. Add a Trusted Publishing policy on nuget.org for this repository, this workflow file and environment 'nuget' (or set the NUGET_USER variable if the policy owner is not 'DragoAnt')." + exit 1 + fi + dotnet nuget push "packages/*.nupkg" --api-key "$key" --source https://api.nuget.org/v3/index.json --skip-duplicate diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7640648 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,34 @@ +# Contributing + +Issues and pull requests are welcome. For anything larger than a small fix, open an issue first so the approach can be agreed before you write the code. + +## Build and test + +You need the .NET SDK pinned in [global.json](./global.json), plus the .NET 8 and .NET 9 runtimes so the tests run for every target framework. Then run the same steps as CI: + +```sh +dotnet restore src/DragoAnt.EntityFrameworkCore.slnx +dotnet build src/DragoAnt.EntityFrameworkCore.slnx -c Release --no-restore +dotnet test --solution src/DragoAnt.EntityFrameworkCore.slnx -c Release --no-build +``` + +Tests use xUnit v3 on Microsoft.Testing.Platform v2, with FluentAssertions 7 and Verify snapshots. The `*.SqlServer.Tests` suites need SQL Server on `localhost,14330` and run only when you add `-p:RunSqlServerTests=true` to the build and test commands. When a snapshot changes on purpose, review the `*.received.*` file and replace the matching `*.verified.*` file with it. + +## Build kit + +The shared MSBuild settings come from [DragoAnt.MSBuildKit](https://github.com/DragoAnt/MSBuildKit), committed under `src/.toolkit/`; don't edit it by hand. Move to another kit release with its update script and commit the result: + +```sh +sh src/.toolkit/update.sh --root src --version 0.2.0 # or: pwsh src/.toolkit/update.ps1 -Root src -Version 0.2.0 +``` + +Repository settings live in `src/Directory.Build.props` (target frameworks, copyright), `src/Directory.Version.props` (the next release's `VersionPrefix`) and `src/Directory.Packages.props` (package versions the kit does not provide). + +## Pull requests + +- Branch from `master` and target `master`. +- Add or update tests for every behavior change. +- Keep the build warning-free: warnings are treated as errors. +- The `ci` workflow must pass on the pull request. + +Releases are published to nuget.org by the maintainers from a GitHub release. diff --git a/README.md b/README.md index 74a66f5..8089677 100644 --- a/README.md +++ b/README.md @@ -1 +1,9 @@ # EntityFramework Core extensions + +[![CI](https://img.shields.io/github/actions/workflow/status/DragoAnt/Extensions.EntityFrameworkCore/ci.yml?branch=master)](https://github.com/DragoAnt/Extensions.EntityFrameworkCore/actions/workflows/ci.yml) + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.StaticMigrations +``` + +Part of [DragoAnt](https://github.com/DragoAnt) open-source .NET libraries. diff --git a/global.json b/global.json new file mode 100644 index 0000000..1ce25c3 --- /dev/null +++ b/global.json @@ -0,0 +1,10 @@ +{ + "sdk": { + "version": "10.0.401", + "rollForward": "latestMinor", + "allowPrerelease": false + }, + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/src/.msbuild.templates/SlnSecrets/DragoAnt.src/Directory.Secrets.props b/src/.msbuild.templates/SlnSecrets/DragoAnt.src/Directory.Secrets.props deleted file mode 100644 index 8c119d5..0000000 --- a/src/.msbuild.templates/SlnSecrets/DragoAnt.src/Directory.Secrets.props +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/.msbuild/README.md b/src/.msbuild/README.md deleted file mode 100644 index 6ec3b76..0000000 --- a/src/.msbuild/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# MSBuild common routine for DragoAnt repositories - -## Prerequisites - -- .NET SDK (the latest version recommended) -- MSBuild -- Git - -## Overview - -This repository contains common MSBuild routines and configurations used across company repositories. It provides standardized build settings, version -management, and project configurations. - -_You can copy this repository and adapt for your needs._ - -## Key Features - -### Company-Specific Settings - -- Standardized company information (ManufacturerName, FullManufacturerName) -- Default warning configurations -- GitLab CI integration -- Version management strategies: - - DateBased (default): `yyyy.M.d.$([MSBuild]::Modulo($(CIPipelineId), $(MaxBuildNumber)))` - - SemVer: Semantic versioning with build number - - SemVer4: Modified semantic versioning(uses CI pipeline id as build number) - - VersionTag: Git tag-based versioning - -### Build Configuration - -- Nullable reference types enabled by default -- Implicit usings enabled -- Latest C# language version -- Code style enforcement in build -- Warning treatment as errors -- Documentation file generation for NuGet packages - -### Project Structure - -The repository is organized into several key directories: - -- `shared/`: Contains common build configurations - - `common/`: Common properties and settings - - `tests/`: Test project configurations - - `utils/`: Utility build scripts - - `checks/`: Build validation checks - -### Key Files - -- `init.company.specific.props`: Company-wide property definitions -- `init.company.specific.targets`: Company-wide target definitions -- `shared/init.props`: Base property initialization -- `shared/init.targets`: Base target initialization -- `shared/version.props`: Version management configuration -- Various local configuration files for secrets and project-specific settings - -## Usage - -1. Add submodule to your git repository. File `.gitmodules` - ``` - [submodule ".msbuild"] - path = .msbuild - url = ../MSBuild.Routine.git - branch = master - ``` - -2. Add `Directory.Build.props` in your solution's directory: - -```xml - - - - - - net9.0 - false - - - - - - - -``` - -3. Add `Directory.Build.targets` in your solution's directory: - -```xml - - - - - - -``` - -You can change properties to enable/disable MSBuild routine functionality in `Directory.Build.props` for all sln projects or in `.csproj` file for an individual -project. - -## Version Management - -The system supports multiple versioning strategies: - -- **DateBased** (default): Uses date-based versioning with build number -- **SemVer**: Follows semantic versioning (https://semver.org/) -- **SemVer4**: Modified semantic versioning with build number(uses CI pipeline id as build number) -- **VersionTag**: Uses Git tags for versioning - -## Security - -The repository includes support for managing secrets and sensitive information: - -- Local secrets management -- Directory-level secrets configuration -- Secret cleanup routines - -## Best Practices - -1. Always use the company-specific settings for consistency -2. Enable code style enforcement in builds -3. Use the provided version management system -4. Follow the established project structure -5. Utilize the built-in security features for managing secrets - -## Questions - -If you have questions or suggestions, feel free to write to [Issues](https://github.com/DragoAnt/MSBuild.Routine/issues). \ No newline at end of file diff --git a/src/.msbuild/init.company.specific.props b/src/.msbuild/init.company.specific.props deleted file mode 100644 index b4a3ff8..0000000 --- a/src/.msbuild/init.company.specific.props +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - DragoAnt - DragoAnt - MIT - - https://github.com/$(GITHUB_REPOSITORY) - True - - VersionTag - $(GITHUB_REF_NAME) - - true - - $(NoWarn);CS1591;EF1001;xUnit1051 - - enable - enable - True - - latest - True - true - False - - - - - $(MSBuildThisFileDirectory)..\ - - False - False - - - - $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\').TrimEnd('\').TrimEnd('//')) - DragoAnt.$([System.IO.Path]::GetFileName('$(RepoFolder)')) - - - \ No newline at end of file diff --git a/src/.msbuild/init.company.specific.targets b/src/.msbuild/init.company.specific.targets deleted file mode 100644 index 4de98b5..0000000 --- a/src/.msbuild/init.company.specific.targets +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/src/.msbuild/package.icon.png b/src/.msbuild/package.icon.png deleted file mode 100644 index ef7aedb..0000000 Binary files a/src/.msbuild/package.icon.png and /dev/null differ diff --git a/src/.msbuild/shared/checks/check.prerelease.packages.targets b/src/.msbuild/shared/checks/check.prerelease.packages.targets deleted file mode 100644 index 05d634b..0000000 --- a/src/.msbuild/shared/checks/check.prerelease.packages.targets +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - true - - - - - - - - - - - MSBLC0001 - Prerelease packages found in stable branch. - Your current branch: $(Branch) - But following rc packages are used: - @(PrereleaseReferences->' %(Identity) %(Version)', '%0D%0A') - Please replace rc packages with stable ones - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/checks/check.restrict.packages.targets b/src/.msbuild/shared/checks/check.restrict.packages.targets deleted file mode 100644 index cf3d6c8..0000000 --- a/src/.msbuild/shared/checks/check.restrict.packages.targets +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/checks/check.restrict.reference.targets b/src/.msbuild/shared/checks/check.restrict.reference.targets deleted file mode 100644 index d0ebb78..0000000 --- a/src/.msbuild/shared/checks/check.restrict.reference.targets +++ /dev/null @@ -1,42 +0,0 @@ - - - - - False - $(RestrictReferences) - $(RestrictReferences) - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/checks/check.shared.properties.props b/src/.msbuild/shared/checks/check.shared.properties.props deleted file mode 100644 index a1dd616..0000000 --- a/src/.msbuild/shared/checks/check.shared.properties.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - - $(TreatWarningsAsErrors) - - - TargetFramework - - - \ No newline at end of file diff --git a/src/.msbuild/shared/checks/check.shared.properties.targets b/src/.msbuild/shared/checks/check.shared.properties.targets deleted file mode 100644 index 8d4032d..0000000 --- a/src/.msbuild/shared/checks/check.shared.properties.targets +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - @(TargetFrameworkNodeCheckXmlResult->Count()) - @(TargetFrameworksNodeCheckXmlResult->Count()) - @(TargetFrameworksCheckXmlResult) - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/checks/init.checks.props b/src/.msbuild/shared/checks/init.checks.props deleted file mode 100644 index 7f5ed02..0000000 --- a/src/.msbuild/shared/checks/init.checks.props +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/checks/init.checks.targets b/src/.msbuild/shared/checks/init.checks.targets deleted file mode 100644 index 5b5562e..0000000 --- a/src/.msbuild/shared/checks/init.checks.targets +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/common/ci.github.props b/src/.msbuild/shared/common/ci.github.props deleted file mode 100644 index 117423f..0000000 --- a/src/.msbuild/shared/common/ci.github.props +++ /dev/null @@ -1,12 +0,0 @@ - - - - - False - $(GITHUB_RUN_ID) - $(GITHUB_REF_NAME) - $(GITHUB_SHA) - $(GITHUB_RUN_NUMBER) - - - \ No newline at end of file diff --git a/src/.msbuild/shared/common/ci.gitlab.props b/src/.msbuild/shared/common/ci.gitlab.props deleted file mode 100644 index d9a67b4..0000000 --- a/src/.msbuild/shared/common/ci.gitlab.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - - False - $(CI_PIPELINE_ID) - $(CI_COMMIT_REF_SLUG) - - - \ No newline at end of file diff --git a/src/.msbuild/shared/common/code.analyzer.props b/src/.msbuild/shared/common/code.analyzer.props deleted file mode 100644 index 2b66fce..0000000 --- a/src/.msbuild/shared/common/code.analyzer.props +++ /dev/null @@ -1,30 +0,0 @@ - - - - True - True - True - - Code analyzers description - - - netstandard2.0 - - True - disable - True - analyzer;roslyn;code-analysis - - False - False - True - True - True - - - - - - - - diff --git a/src/.msbuild/shared/common/code.analyzer.targets b/src/.msbuild/shared/common/code.analyzer.targets deleted file mode 100644 index aef6292..0000000 --- a/src/.msbuild/shared/common/code.analyzer.targets +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/.msbuild/shared/common/code.coverage.targets b/src/.msbuild/shared/common/code.coverage.targets deleted file mode 100644 index 56dfb0f..0000000 --- a/src/.msbuild/shared/common/code.coverage.targets +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/common/git.routine.props b/src/.msbuild/shared/common/git.routine.props deleted file mode 100644 index 4dcb9df..0000000 --- a/src/.msbuild/shared/common/git.routine.props +++ /dev/null @@ -1,22 +0,0 @@ - - - - $(MSBuildProjectDirectory) - $([System.IO.Path]::GetDirectoryName($(GitRoot))) - $([System.IO.Path]::GetDirectoryName($(GitRoot))) - $([System.IO.Path]::GetDirectoryName($(GitRoot))) - $([System.IO.Path]::GetDirectoryName($(GitRoot))) - $([System.IO.Path]::GetDirectoryName($(GitRoot))) - $([System.IO.Path]::GetDirectoryName($(GitRoot))) - $([System.IO.Path]::GetDirectoryName($(GitRoot))) - $([System.IO.File]::ReadAllText('$(GitRoot)\.git\HEAD').Trim().Replace('ref: refs/heads/', '')) - - - - unknown-branch - ^(master|release).*$ - false - true - - - \ No newline at end of file diff --git a/src/.msbuild/shared/common/init.common.props b/src/.msbuild/shared/common/init.common.props deleted file mode 100644 index 54f31ea..0000000 --- a/src/.msbuild/shared/common/init.common.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - True - - $(MSBuildThisFileDirectory)code.analyzer.props - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/common/init.common.targets b/src/.msbuild/shared/common/init.common.targets deleted file mode 100644 index 3997470..0000000 --- a/src/.msbuild/shared/common/init.common.targets +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/common/package.targets b/src/.msbuild/shared/common/package.targets deleted file mode 100644 index 8c54c56..0000000 --- a/src/.msbuild/shared/common/package.targets +++ /dev/null @@ -1,43 +0,0 @@ - - - - $(MSBuildProjectName) - $(MSBuildProjectName) - $(Version) - false - - $(MSBuildThisFileDirectory)..\package.icon.png - icon.png - readme.md - - git - $(RepositoryUrl) - - - - - - - - - - - - - - - - - - # $(MSBuildProjectName) - - $(Description) - - - - - - - - - diff --git a/src/.msbuild/shared/common/private.assets.references.targets b/src/.msbuild/shared/common/private.assets.references.targets deleted file mode 100644 index 5f50276..0000000 --- a/src/.msbuild/shared/common/private.assets.references.targets +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/common/product.props b/src/.msbuild/shared/common/product.props deleted file mode 100644 index b0414c7..0000000 --- a/src/.msbuild/shared/common/product.props +++ /dev/null @@ -1,17 +0,0 @@ - - - $(MSBuildProjectName) - - - $([System.DateTime]::Now.Year) - - $(ManufacturerName) - - $(FullManufacturerName) - - © $(Year) $(FullManufacturerName) ALL RIGHTS RESERVED. - - $(ManufacturerName) - - - \ No newline at end of file diff --git a/src/.msbuild/shared/common/secrets.directory.props b/src/.msbuild/shared/common/secrets.directory.props deleted file mode 100644 index b18b7c4..0000000 --- a/src/.msbuild/shared/common/secrets.directory.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - - True - - $([System.Environment]::GetFolderPath(SpecialFolder.ApplicationData))\Microsoft\UserSecrets\ - $([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))/.microsoft/usersecrets/ - - - \ No newline at end of file diff --git a/src/.msbuild/shared/common/secrets.project.targets b/src/.msbuild/shared/common/secrets.project.targets deleted file mode 100644 index e945722..0000000 --- a/src/.msbuild/shared/common/secrets.project.targets +++ /dev/null @@ -1,13 +0,0 @@ - - - - True - - - - - - $(LocalSecretsBaseDirectory)$(UserSecretsId) - - - \ No newline at end of file diff --git a/src/.msbuild/shared/init.props b/src/.msbuild/shared/init.props deleted file mode 100644 index 9894b23..0000000 --- a/src/.msbuild/shared/init.props +++ /dev/null @@ -1,47 +0,0 @@ - - - - enable - enable - latest - True - - True - - False - $(MSBuildThisFileDirectory)..\..\.msbuild.templates\ - - - - - - - - - True - True - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/init.targets b/src/.msbuild/shared/init.targets deleted file mode 100644 index 9fbd7db..0000000 --- a/src/.msbuild/shared/init.targets +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/local.cs.files.targets b/src/.msbuild/shared/local.cs.files.targets deleted file mode 100644 index d0536e4..0000000 --- a/src/.msbuild/shared/local.cs.files.targets +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - %(Filename) - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/local.directory.secrets.props b/src/.msbuild/shared/local.directory.secrets.props deleted file mode 100644 index 0e0522f..0000000 --- a/src/.msbuild/shared/local.directory.secrets.props +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - True - False - - - - $(LocalSecretsBaseDirectory)$(SlnSecretsId) - $(LocalSlnSecretsDir)/Directory.Secrets.props - $(LocalSlnSecretsDir)/Directory.Secrets.targets - - $(SecretsTemplatesDir)SlnSecrets\$(SlnSecretsId) - $(LocalSlnSecretsTemplateDir)/Directory.Secrets.props - $(LocalSlnSecretsTemplateDir)/Directory.Secrets.targets - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/local.secrets.props b/src/.msbuild/shared/local.secrets.props deleted file mode 100644 index 410d480..0000000 --- a/src/.msbuild/shared/local.secrets.props +++ /dev/null @@ -1,11 +0,0 @@ - - - - - $(LocalSecretsDir)/secrets.json - - $(SecretsTemplatesDir)\Secrets\$(UserSecretsId) - $(LocalSecretsTemplateDir)/secrets.json - - - \ No newline at end of file diff --git a/src/.msbuild/shared/local.secrets.targets b/src/.msbuild/shared/local.secrets.targets deleted file mode 100644 index 55230af..0000000 --- a/src/.msbuild/shared/local.secrets.targets +++ /dev/null @@ -1,67 +0,0 @@ - - - - - false - - { -} - - - - - - - appsettings.UserSecrets.json - Always - Always - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/project.global.usings.targets b/src/.msbuild/shared/project.global.usings.targets deleted file mode 100644 index fee0200..0000000 --- a/src/.msbuild/shared/project.global.usings.targets +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/tests/test.project.internalsVisibleTo.targets b/src/.msbuild/shared/tests/test.project.internalsVisibleTo.targets deleted file mode 100644 index 50166f6..0000000 --- a/src/.msbuild/shared/tests/test.project.internalsVisibleTo.targets +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - .Tests - - - $(TestsDir.EndsWith('\')) - $(TestsDir)\ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/tests/tests.project.code.coverage.targets b/src/.msbuild/shared/tests/tests.project.code.coverage.targets deleted file mode 100644 index 8d08948..0000000 --- a/src/.msbuild/shared/tests/tests.project.code.coverage.targets +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - True - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/tests/tests.project.lib.global.usings.targets b/src/.msbuild/shared/tests/tests.project.lib.global.usings.targets deleted file mode 100644 index 171b0ec..0000000 --- a/src/.msbuild/shared/tests/tests.project.lib.global.usings.targets +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/tests/tests.project.props b/src/.msbuild/shared/tests/tests.project.props deleted file mode 100644 index 82e1f9a..0000000 --- a/src/.msbuild/shared/tests/tests.project.props +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - .Tests - $(MSBuildProjectName.EndsWith($(TestsProjectNameEndsWith))) - - - - False - False - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/tests/tests.project.targets b/src/.msbuild/shared/tests/tests.project.targets deleted file mode 100644 index 445a639..0000000 --- a/src/.msbuild/shared/tests/tests.project.targets +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - True - - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/tests/tests.project.xunit.v3.routine.props b/src/.msbuild/shared/tests/tests.project.xunit.v3.routine.props deleted file mode 100644 index 2951aab..0000000 --- a/src/.msbuild/shared/tests/tests.project.xunit.v3.routine.props +++ /dev/null @@ -1,24 +0,0 @@ - - - - Exe - - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/tests/tests.project.xunit.v3.routine.targets b/src/.msbuild/shared/tests/tests.project.xunit.v3.routine.targets deleted file mode 100644 index 4ee6d9a..0000000 --- a/src/.msbuild/shared/tests/tests.project.xunit.v3.routine.targets +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - -{ - "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json" -} - - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/utils/readMetadata.targets b/src/.msbuild/shared/utils/readMetadata.targets deleted file mode 100644 index eee1382..0000000 --- a/src/.msbuild/shared/utils/readMetadata.targets +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - $(OutDir) - $([System.IO.Path]::GetFullPath('$(ProjMetadataOutDir)').TrimEnd('/').Replace('\', '/')) - - - - - - - - - - - - - - %(PackageReference.Version) - - - %(PackageReference.VersionOverride) - true - - - - - $(ProjMetadataOutDir)/$(MSBuildProjectName).$(TargetFramework).metadata.yml - - $(ManagePackageVersionsCentrally) - false - - @(PackagesWithVersion->' %(Identity): %(Version)', '%0D%0A') - - - - - - - - \ No newline at end of file diff --git a/src/.msbuild/shared/version.props b/src/.msbuild/shared/version.props deleted file mode 100644 index b09ab0d..0000000 --- a/src/.msbuild/shared/version.props +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - 1.0.0 - - DateBased - DevEnv - - 0 - $(CIPipelineId) - - $(Branch.Replace('\','-').Replace('/','-')) - - - - - - $([System.DateTime]::UtcNow.ToString(yyyy.M.d)) - - 10000 - $([MSBuild]::Modulo($(BuildNumber), $(MaxBuildNumber))) - 1 - - $(VersionPrefix).$(BuildNumber) - $(PreReleaseSuffix) - - - - - $(PreReleaseSuffix)test.$(BuildNumber) - - - - - $(VersionPrefix).$(BuildNumber) - $(PreReleaseSuffix) - - - - - - $(VersionTag) - Empty version tag - 0 - - - - - 9999.0.0 - 0 - - - - - Invalid version - - - - diff --git a/src/.toolkit/kit.json b/src/.toolkit/kit.json new file mode 100644 index 0000000..9f63620 --- /dev/null +++ b/src/.toolkit/kit.json @@ -0,0 +1,6 @@ +{ + "repository": "DragoAnt/MSBuildKit", + "version": "0.1.1", + "sha256": "a16b4320b85318ed187b040a6d078e80587c201e918aaadea17f1a7af759c71e", + "parts": ["PackageAsProj", "EF"] +} diff --git a/src/.toolkit/kit.parts b/src/.toolkit/kit.parts new file mode 100644 index 0000000..180cd2b --- /dev/null +++ b/src/.toolkit/kit.parts @@ -0,0 +1,20 @@ +# DragoAnt.MSBuildKit parts: [required parts...] +# The folder of a part is msbuild/DragoAnt.MSBuildKit. ("Trunk" is msbuild/DragoAnt.MSBuildKit). +Core default +Trunk default +Vcs.GitHub default +TfmConstants default +Packaging default +Testing default +Testing.XUnit.v3 default Testing +Locals.Compile default +Locals.DirectorySecrets default +Locals.Secrets default +PrivateAssets default +Project.RoslynComponent optional +Project.CodeAnalyzer optional Project.RoslynComponent +Project.CodeFixer optional Project.RoslynComponent Project.CodeAnalyzer +Project.SourceGenerator optional Project.RoslynComponent +PackageAsProj optional +ProjMetadata optional +EF optional diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/audit/audit.autodetect-mutex.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/audit/audit.autodetect-mutex.targets new file mode 100644 index 0000000..74fc36e --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/audit/audit.autodetect-mutex.targets @@ -0,0 +1,15 @@ + + + + + + <_MSKit_AutoDetectedTypes>@(MSKit_AutoDetectedProjectType, ', ') + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/audit/audit.roslyn-satellites.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/audit/audit.roslyn-satellites.targets new file mode 100644 index 0000000..d5b0b61 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/audit/audit.roslyn-satellites.targets @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/core.common.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/core.common.props new file mode 100644 index 0000000..cac50d6 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/core.common.props @@ -0,0 +1,32 @@ + + + + false + + True + + + $(Version) + + True + + $(MSBuildThisFileDirectory)../../.local/ + + $([System.IO.Path]::GetDirectoryName('$(SlnxFilePath)').Replace('\', '/').TrimEnd('/'))/ + $(MSBuildThisFileDirectory)../../../ + $([System.IO.Path]::GetFullPath('$(MSKit_SlnFileDirectory)').Replace('\', '/').TrimEnd('/'))/ + + $([System.IO.Path]::GetFileNameWithoutExtension('$(SlnxFilePath)')) + + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../').Replace('\', '/').TrimEnd('/'))/ + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)../../').Replace('\', '/').TrimEnd('/'))/ + + <_ProjectObjDir>$(BaseIntermediateOutputPath) + <_ProjectObjDir Condition="'$(_ProjectObjDir)'==''">obj + $(_ProjectObjDir) + $([System.IO.Path]::GetFullPath('$(MSBuildProjectDirectory)/$(_ProjectObjDir)')) + $([System.IO.Path]::GetFullPath('$(MSKit_ProjectObjDir)').TrimEnd('/').Replace('\', '/')) + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/core.locals.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/core.locals.props new file mode 100644 index 0000000..162da03 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/core.locals.props @@ -0,0 +1,8 @@ + + + + $([System.Environment]::GetFolderPath(SpecialFolder.ApplicationData))\Microsoft\UserSecrets\ + $([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))/.microsoft/usersecrets/ + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/core.locals.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/core.locals.targets new file mode 100644 index 0000000..fcae3d7 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/core.locals.targets @@ -0,0 +1,8 @@ + + + + + $(MSKit_LocalSecretsBaseDirectory)$(UserSecretsId) + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/git.root.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/git.root.props new file mode 100644 index 0000000..74b018a --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/git.root.props @@ -0,0 +1,29 @@ + + + + + $(GITHUB_HEAD_REF) + + + $(GITHUB_REF_NAME) + + + + $([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildProjectDirectory)', '.git')) + $([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildProjectDirectory)', '.git/HEAD')) + + + + <_MSKit_GitHeadFile Condition="Exists('$(MSKit_GitRoot)/.git/HEAD')">$(MSKit_GitRoot)/.git/HEAD + + <_MSKit_GitDirPointer Condition="'$(_MSKit_GitHeadFile)'=='' AND Exists('$(MSKit_GitRoot)/.git')">$([System.IO.File]::ReadAllText('$(MSKit_GitRoot)/.git').Trim().Replace('gitdir: ', '')) + <_MSKit_GitDirPointer Condition="'$(_MSKit_GitDirPointer)'!='' AND !$([System.IO.Path]::IsPathRooted('$(_MSKit_GitDirPointer)'))">$(MSKit_GitRoot)/$(_MSKit_GitDirPointer) + <_MSKit_GitHeadFile Condition="'$(_MSKit_GitDirPointer)'!='' AND Exists('$(_MSKit_GitDirPointer)/HEAD')">$(_MSKit_GitDirPointer)/HEAD + + + + $([System.IO.File]::ReadAllText('$(_MSKit_GitHeadFile)').Trim().Replace('ref: refs/heads/', '')) + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/git.routine.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/git.routine.props new file mode 100644 index 0000000..2993abe --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/git.routine.props @@ -0,0 +1,12 @@ + + + + $(GITHUB_REF_NAME) + unknown-branch + + ^(main|master|release/.+)$ + false + true + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/init.props new file mode 100644 index 0000000..edfb4ee --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/init.props @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/init.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/init.targets new file mode 100644 index 0000000..2869ae6 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/init.targets @@ -0,0 +1,5 @@ + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/project-types.autodetect.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/project-types.autodetect.props new file mode 100644 index 0000000..b6ae321 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/project-types.autodetect.props @@ -0,0 +1,46 @@ + + + + + (?<!^DragoAnt\.MSBuildKit\.Project)\.Analyzers$ + (?<!^DragoAnt\.MSBuildKit\.Project)\.CodeFixes$ + (?<!^DragoAnt\.MSBuildKit\.Project)\.SourceGenerator$ + + + + $([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectName), $(MSKit_CodeAnalyzerProjectNameRegex))) + True + + $([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectName), $(MSKit_CodeFixerProjectNameRegex))) + True + + $([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectName), $(MSKit_SourceGeneratorProjectNameRegex))) + true + + + + + <_MSKit_CodeAnalyzerProjectNameRegex_Shared>$(MSKit_CodeAnalyzerProjectNameRegex) + <_MSKit_CodeFixerProjectNameRegex_Shared>$(MSKit_CodeFixerProjectNameRegex) + <_MSKit_SourceGeneratorProjectNameRegex_Shared>$(MSKit_SourceGeneratorProjectNameRegex) + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/tfm.routine.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/tfm.routine.props new file mode 100644 index 0000000..0239a0f --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Core/tfm.routine.props @@ -0,0 +1,42 @@ + + + + + <_MSKit_DbpFilePath>$([MSBuild]::GetPathOfFileAbove('Directory.Build.props')) + <_MSKit_DbpText Condition="'$(_MSKit_DbpFilePath)' != '' AND Exists('$(_MSKit_DbpFilePath)')">$([System.IO.File]::ReadAllText('$(_MSKit_DbpFilePath)')) + + <_MSKit_DbpHasTargetFramework Condition="'$(_MSKit_DbpText)' != '' AND ($(_MSKit_DbpText.Contains('<TargetFramework>')) OR $(_MSKit_DbpText.Contains('<TargetFramework ')))">True + <_MSKit_DbpHasTargetFrameworks Condition="'$(_MSKit_DbpText)' != '' AND ($(_MSKit_DbpText.Contains('<TargetFrameworks>')) OR $(_MSKit_DbpText.Contains('<TargetFrameworks ')))">True + + $([System.Text.RegularExpressions.Regex]::Match($(_MSKit_DbpText), '<TargetFramework[^>/]*>([^<]*)</TargetFramework>').Groups[1].Value) + $([System.Text.RegularExpressions.Regex]::Match($(_MSKit_DbpText), '<TargetFrameworks[^>/]*>([^<]*)</TargetFrameworks>').Groups[1].Value) + + + + + <_MSKit_GuardXmlPeekRoutine Condition="'$(MSKit_GuardXmlPeekRoutine)'!='False'">True + <_MSKit_CsprojText Condition="'$(_MSKit_GuardXmlPeekRoutine)'=='True' AND '$(_MSKit_CsprojText)'==''">$([System.IO.File]::ReadAllText('$(MSBuildProjectFullPath)')) + <_MSKit_RoutineHasTargetFramework Condition="'$(_MSKit_GuardXmlPeekRoutine)'!='True'">True + <_MSKit_RoutineHasTargetFramework Condition="'$(_MSKit_GuardXmlPeekRoutine)'=='True' AND ($(_MSKit_CsprojText.Contains('<TargetFramework>')) OR $(_MSKit_CsprojText.Contains('<TargetFramework ')))">True + <_MSKit_RoutineHasTargetFrameworks Condition="'$(_MSKit_GuardXmlPeekRoutine)'!='True'">True + <_MSKit_RoutineHasTargetFrameworks Condition="'$(_MSKit_GuardXmlPeekRoutine)'=='True' AND ($(_MSKit_CsprojText.Contains('<TargetFrameworks>')) OR $(_MSKit_CsprojText.Contains('<TargetFrameworks ')))">True + + + + $([System.Text.RegularExpressions.Regex]::Match($(_MSKit_CsprojText), '<TargetFramework[^>/]*>([^<]*)</TargetFramework>').Groups[1].Value) + $([System.Text.RegularExpressions.Regex]::Match($(_MSKit_CsprojText), '<TargetFrameworks[^>/]*>([^<]*)</TargetFrameworks>').Groups[1].Value) + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/init.props new file mode 100644 index 0000000..5bc2ad5 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/init.props @@ -0,0 +1,9 @@ + + + + + $(MSBuildThisFileDirectory)scripts/ + + + diff --git a/src/.msbuild/shared/scripts/ef/add-migration.ps1 b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/scripts/add-migration.ps1 similarity index 100% rename from src/.msbuild/shared/scripts/ef/add-migration.ps1 rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/scripts/add-migration.ps1 diff --git a/src/.msbuild/shared/scripts/ef/apply-migrations.ps1 b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/scripts/apply-migrations.ps1 similarity index 100% rename from src/.msbuild/shared/scripts/ef/apply-migrations.ps1 rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/scripts/apply-migrations.ps1 diff --git a/src/.msbuild/shared/scripts/ef/init.ps1 b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/scripts/init.ps1 similarity index 100% rename from src/.msbuild/shared/scripts/ef/init.ps1 rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/scripts/init.ps1 diff --git a/src/.msbuild/shared/scripts/ef/remove-migration.ps1 b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/scripts/remove-migration.ps1 similarity index 100% rename from src/.msbuild/shared/scripts/ef/remove-migration.ps1 rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/scripts/remove-migration.ps1 diff --git a/src/.msbuild/shared/scripts/ef/test-migration-file.ps1 b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/scripts/test-migration-file.ps1 similarity index 100% rename from src/.msbuild/shared/scripts/ef/test-migration-file.ps1 rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.EF/scripts/test-migration-file.ps1 diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/init.props new file mode 100644 index 0000000..47e2180 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/init.props @@ -0,0 +1,3 @@ + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/init.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/init.targets new file mode 100644 index 0000000..3c6b4c8 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/init.targets @@ -0,0 +1,3 @@ + + + diff --git a/src/.msbuild/shared/local.cs.files.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/local.compile.props similarity index 57% rename from src/.msbuild/shared/local.cs.files.props rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/local.compile.props index 430f81c..b068b85 100644 --- a/src/.msbuild/shared/local.cs.files.props +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/local.compile.props @@ -1,7 +1,7 @@ - $(SecretsTemplatesDir)LocalCompile/ + $(MSKit_Templates)LocalCompile/ - \ No newline at end of file + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/local.compile.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/local.compile.targets new file mode 100644 index 0000000..77eb087 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Compile/local.compile.targets @@ -0,0 +1,40 @@ + + + + <_LocalCompileNamespace>$(RootNamespace) + <_LocalCompileNamespace Condition="'$(_LocalCompileNamespace)'==''">$(MSBuildProjectName) + + + + + + + + + + + + + %(Filename) + + + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/init.props new file mode 100644 index 0000000..effb46d --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/init.props @@ -0,0 +1,9 @@ + + + + True + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/init.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/init.targets new file mode 100644 index 0000000..d2456b2 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/init.targets @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/src/.msbuild/shared/local.directory.secrets.cleanup.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/local.directory.secrets.cleanup.targets similarity index 79% rename from src/.msbuild/shared/local.directory.secrets.cleanup.targets rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/local.directory.secrets.cleanup.targets index 8716bc3..eb8172a 100644 --- a/src/.msbuild/shared/local.directory.secrets.cleanup.targets +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/local.directory.secrets.cleanup.targets @@ -1,8 +1,5 @@ - - - @@ -11,7 +8,6 @@ - @@ -20,4 +16,4 @@ - \ No newline at end of file + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/local.directory.secrets.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/local.directory.secrets.props new file mode 100644 index 0000000..8dec6d3 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/local.directory.secrets.props @@ -0,0 +1,31 @@ + + + + $(MSKit_SlnFileName) + + False + + + + + $(MSKit_LocalSecretsBaseDirectory)$(MSKit_SlnSecretsId) + $(LocalSlnSecretsDir)/Directory.Secrets.props + + $(MSKit_Templates) + $(LocalSlnSecretsTemplateDir)/Directory.Secrets.props + + + + + + + False + + + + $(LocalSlnSecretsDir)/Directory.Secrets.targets + + $(LocalSlnSecretsTemplateDir)/Directory.Secrets.targets + + + diff --git a/src/.msbuild/shared/local.directory.secrets.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/local.directory.secrets.targets similarity index 53% rename from src/.msbuild/shared/local.directory.secrets.targets rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/local.directory.secrets.targets index bf41b54..71e24f6 100644 --- a/src/.msbuild/shared/local.directory.secrets.targets +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.DirectorySecrets/local.directory.secrets.targets @@ -1,9 +1,8 @@ - + - - Directory.Secrets.props @@ -21,72 +20,54 @@ - - - - - + File="$(LocalSlnSecretsTemplateProps)" + Overwrite="true" + Lines="$(LocalSlnSecretsEmptyTemplateNewBody)" /> - - - - + File="$(LocalSlnSecretsTemplateTargets)" + Overwrite="true" + Lines="$(LocalSlnSecretsEmptyTemplateNewBody)" /> - - - - - - - + - - - - - + - + File="$(LocalSlnSecretsTargets)" + Overwrite="true" + Condition="!Exists('$(LocalSlnSecretsTargets)')" Lines="$(LocalSlnSecretsEmptyTemplateNewBody)" /> - \ No newline at end of file + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/init.props new file mode 100644 index 0000000..b796e6c --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/init.props @@ -0,0 +1,7 @@ + + + + True + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/init.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/init.targets new file mode 100644 index 0000000..ce7b418 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/init.targets @@ -0,0 +1,14 @@ + + + + + + + + + + + + diff --git a/src/.msbuild/shared/local.secrets.cleanup.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/local.secrets.cleanup.targets similarity index 77% rename from src/.msbuild/shared/local.secrets.cleanup.targets rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/local.secrets.cleanup.targets index 6ea8f92..ed00d8e 100644 --- a/src/.msbuild/shared/local.secrets.cleanup.targets +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/local.secrets.cleanup.targets @@ -1,12 +1,10 @@ - - - \ No newline at end of file + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/local.secrets.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/local.secrets.props new file mode 100644 index 0000000..0de50b5 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/local.secrets.props @@ -0,0 +1,10 @@ + + + + $(LocalSecretsDir)/secrets.json + + $(MSKit_Templates) + $(LocalSecretsTemplateDir)/$(UserSecretsId).secrets.json + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/local.secrets.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/local.secrets.targets new file mode 100644 index 0000000..dcce4ad --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Locals.Secrets/local.secrets.targets @@ -0,0 +1,61 @@ + + + + appsettings + + false + + { +} + + + + + + + $(UserSecretsLinkNamePrefix).UserSecrets.json + + Always + + Always + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.PackageAsProj/init.last.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.PackageAsProj/init.last.targets new file mode 100644 index 0000000..876d52b --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.PackageAsProj/init.last.targets @@ -0,0 +1,8 @@ + + + + + + + diff --git a/src/.msbuild/shared/packageAsProj.routine.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.PackageAsProj/packageAsProj.targets similarity index 55% rename from src/.msbuild/shared/packageAsProj.routine.targets rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.PackageAsProj/packageAsProj.targets index 75a8387..03588d0 100644 --- a/src/.msbuild/shared/packageAsProj.routine.targets +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.PackageAsProj/packageAsProj.targets @@ -1,14 +1,14 @@ - - + - - + + - @@ -19,19 +19,11 @@ - - - ================================================================================ - = ATTENTION: Packages attached as ProjectReference instead of PackageReference = - ================================================================================ - Packages: @(PackageAsProj_ProjectReference) - - - - - - + + @@ -41,9 +33,10 @@ - - - \ No newline at end of file + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/audit/audit.package.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/audit/audit.package.targets new file mode 100644 index 0000000..06657dc --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/audit/audit.package.targets @@ -0,0 +1,128 @@ + + + + + + True + 30 + ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ + 128 + + api.codacy.com;api.codeclimate.com;api.dependabot.com;api.reuse.software;api.travis-ci.com;app.codacy.com;app.deepsource.com;avatars.githubusercontent.com;badgen.net;badges.gitter.im;camo.githubusercontent.com;caniuse.bitsofco.de;cdn.jsdelivr.net;cdn.syncfusion.com;ci.appveyor.com;circleci.com;cloudback.it;codecov.io;codefactor.io;coveralls.io;dev.azure.com;devpod.sh;flat.badgen.net;gitlab.com;i.imgur.com;img.shields.io;infragistics.com;isitmaintained.com;media.githubusercontent.com;opencollective.com;raw.github.com;raw.githubusercontent.com;snyk.io;sonarcloud.io;travis-ci.com;travis-ci.org;user-images.githubusercontent.com + <_MSKit_PkgRules>https://learn.microsoft.com/nuget/create-packages/package-authoring-best-practices + <_MSKit_PkgReadmeRules>https://learn.microsoft.com/nuget/nuget-org/package-readme-on-nuget-org + + + + + + + + + + + + + + + + + + <_MSKit_Description>$(PackageDescription) + <_MSKit_Description Condition="'$(_MSKit_Description)'==''">$(Description) + <_MSKit_Description>$(_MSKit_Description.Trim()) + <_MSKit_DescriptionIsPlaceholder Condition="'$(_MSKit_Description)'=='' OR '$(_MSKit_Description)'=='Package Description' OR '$(_MSKit_Description)'=='$(PackageId)' OR '$(_MSKit_Description)'=='$(MSBuildProjectName)'">True + <_MSKit_PkgVersion>$(PackageVersion) + <_MSKit_PkgVersion Condition="'$(_MSKit_PkgVersion)'==''">$(Version) + <_MSKit_RepoUrlFinal>$(RepositoryUrl) + <_MSKit_RepoUrlFinal Condition="'$(_MSKit_RepoUrlFinal)'==''">$(PrivateRepositoryUrl) + <_MSKit_LicenseIsOpen Condition="'$(PackageLicenseExpression)'!=''">True + + + + <_MSKit_PkgFinding Include="MSKIT_PKG001" Condition="'$(_MSKit_DescriptionIsPlaceholder)'=='True'" + Text="Package '$(PackageId)' has no real Description ('$(_MSKit_Description)'). nuget.org search shows it first: say what the package does and what sets it apart, in one or two sentences." + Rule="$(_MSKit_PkgRules)#description" /> + <_MSKit_PkgFinding Include="MSKIT_PKG002" Condition="'$(_MSKit_DescriptionIsPlaceholder)'!='True' AND $(_MSKit_Description.Length) < $(MSKit_PackageDescriptionMinLength)" + Text="Package '$(PackageId)' Description is $(_MSKit_Description.Length) characters ('$(_MSKit_Description)'); write at least $(MSKit_PackageDescriptionMinLength): what it does and for whom (MSKit_PackageDescriptionMinLength sets the bar)." + Rule="$(_MSKit_PkgRules)#description" /> + <_MSKit_PkgFinding Include="MSKIT_PKG003" Condition="'$(PackageReadmeFile)'==''" + Text="Package '$(PackageId)' ships no README. Add package.readme.md next to the csproj: what it is, how to start, a short example, where to give feedback." + Rule="$(_MSKit_PkgRules)#readme" /> + <_MSKit_PkgFinding Include="MSKIT_PKG004" Condition="'$(PackageTags)'==''" + Text="Package '$(PackageId)' has no PackageTags. Add a few search terms that are not already in the package id." + Rule="$(_MSKit_PkgRules)#tags" /> + <_MSKit_PkgFinding Include="MSKIT_PKG005" Condition="'$(PackageIcon)'==''" + Text="Package '$(PackageId)' has no icon. Set PackageIconPath to a 128x128 PNG (the company layer of the kit sets one for every package)." + Rule="$(_MSKit_PkgRules)#icon" /> + <_MSKit_PkgFinding Include="MSKIT_PKG006" Condition="'$(PackageLicenseExpression)'=='' AND '$(PackageLicenseFile)'==''" + Text="Package '$(PackageId)' has no licence. Without one nobody may use it. Set PackageLicenseExpression to an SPDX id (for example MIT)." + Rule="$(_MSKit_PkgRules)#licensing" /> + <_MSKit_PkgFinding Include="MSKIT_PKG007" Condition="'$(PackageLicenseUrl)'!=''" + Text="Package '$(PackageId)' uses the deprecated PackageLicenseUrl. Replace it with PackageLicenseExpression (an SPDX id) or PackageLicenseFile." + Rule="$(_MSKit_PkgRules)#licensing" /> + <_MSKit_PkgFinding Include="MSKIT_PKG008" Condition="'$(PackageIconUrl)'!=''" + Text="Package '$(PackageId)' uses the deprecated PackageIconUrl. Pack the image and point PackageIcon (or the kit's PackageIconPath) at it." + Rule="$(_MSKit_PkgRules)#icon" /> + <_MSKit_PkgFinding Include="MSKIT_PKG009" Condition="'$(_MSKit_RelativeImages)'!=''" + Text="The package README of '$(PackageId)' has relative images, which nuget.org does not render: $(_MSKit_RelativeImages). Use absolute https URLs from an allowed host." + Rule="$(_MSKit_PkgReadmeRules)#allowed-domains-for-images-and-badges" /> + <_MSKit_PkgFinding Include="MSKIT_PKG010" Condition="'$(_MSKit_HtmlTags)'!=''" + Text="The package README of '$(PackageId)' contains HTML, which nuget.org does not render: $(_MSKit_HtmlTags). Use Markdown instead." + Rule="$(_MSKit_PkgReadmeRules)#supported-markdown-features" /> + <_MSKit_PkgFinding Include="MSKIT_PKG011" Condition="'$(_MSKit_Alerts)'!=''" + Text="The package README of '$(PackageId)' uses GitHub alert blocks, which nuget.org shows as plain quotes: $(_MSKit_Alerts). Use a bold lead-in such as **Note:** instead." + Rule="$(_MSKit_PkgReadmeRules)#supported-markdown-features" /> + <_MSKit_PkgFinding Include="MSKIT_PKG012" Condition="'$(_MSKit_DisallowedImages)'!=''" + Text="The package README of '$(PackageId)' loads images from hosts nuget.org blocks: $(_MSKit_DisallowedImages). Host them on an allowed domain (img.shields.io, raw.githubusercontent.com, ...)." + Rule="$(_MSKit_PkgReadmeRules)#allowed-domains-for-images-and-badges" /> + <_MSKit_PkgFinding Include="MSKIT_PKG013" Condition="'$(_MSKit_PkgVersion)'!='' AND !$([System.Text.RegularExpressions.Regex]::IsMatch('$(_MSKit_PkgVersion)', '$(MSKit_SemVerRegex)'))" + Text="Package '$(PackageId)' version '$(_MSKit_PkgVersion)' is not SemVer 2.0 (MAJOR.MINOR.PATCH[-prerelease][+metadata])." + Rule="$(_MSKit_PkgRules)#package-version" /> + <_MSKit_PkgFinding Include="MSKIT_PKG014" Condition="'$(_MSKit_RepoUrlFinal)'=='' OR '$(PackageProjectUrl)'==''" + Text="Package '$(PackageId)' has no repository or project URL. Set RepositoryUrl, or build from a git clone whose origin remote Source Link can read." + Rule="$(_MSKit_PkgRules)#repository-type-and-url" /> + <_MSKit_PkgFinding Include="MSKIT_PKG015" Condition="'$(MSKit_PackageIconSourcePath)'!='' AND Exists('$(MSKit_PackageIconSourcePath)') AND ('$(_MSKit_IconIsPng)'!='True' OR '$(_MSKit_IconWidth)'!='$(MSKit_PackageIconSize)' OR '$(_MSKit_IconHeight)'!='$(MSKit_PackageIconSize)')" + Text="Package '$(PackageId)' icon is not a $(MSKit_PackageIconSize)x$(MSKit_PackageIconSize) PNG (PNG: $(_MSKit_IconIsPng), size: $(_MSKit_IconWidth)x$(_MSKit_IconHeight))." + Rule="$(_MSKit_PkgRules)#icon" /> + <_MSKit_PkgFinding Include="MSKIT_PKG016" Condition="'$(PackageReleaseNotes)'==''" + Text="Package '$(PackageId)' has no PackageReleaseNotes. Set them, or a link to the changelog (on GitHub the kit links the releases page by default)." + Rule="$(_MSKit_PkgRules)#release-notes" /> + <_MSKit_PkgFinding Include="MSKIT_PKG017" Condition="'$(_MSKit_RelativeLinks)'!=''" + Text="The package README of '$(PackageId)' has relative links, which break on nuget.org: $(_MSKit_RelativeLinks). Use absolute URLs." + Rule="$(_MSKit_PkgReadmeRules)" /> + <_MSKit_PkgFinding Include="MSKIT_PKG018" Condition="'$(_MSKit_LicenseIsOpen)'=='True' AND $(Copyright.ToLowerInvariant().Contains('all rights reserved'))" + Text="Package '$(PackageId)' is licensed '$(PackageLicenseExpression)' but its Copyright says 'all rights reserved' ('$(Copyright)'). Use 'Copyright (c) YEAR OWNER'." + Rule="$(_MSKit_PkgRules)#copyright" /> + <_MSKit_PkgFinding Include="MSKIT_PKG019" Condition="'$(_MSKit_HasMermaid)'=='True'" + Text="The package README of '$(PackageId)' contains a Mermaid diagram, which nuget.org shows as code. Link to the diagram on GitHub instead." + Rule="$(_MSKit_PkgReadmeRules)#supported-markdown-features" /> + + + + <_MSKit_PkgSkip Include="$(MSKit_SkipPackageChecks)" /> + <_MSKit_PkgSkip Include="$(NoWarn)" /> + <_MSKit_PkgFinding Remove="@(_MSKit_PkgSkip)" /> + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/init.props new file mode 100644 index 0000000..4d34098 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/init.props @@ -0,0 +1,20 @@ + + + + + + true + true + true + + True + + true + + true + all + low + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/init.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/init.targets new file mode 100644 index 0000000..1d52011 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/init.targets @@ -0,0 +1,5 @@ + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/package.inspect.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/package.inspect.targets new file mode 100644 index 0000000..4133174 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/package.inspect.targets @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + (); +var disallowedImages = new List(); +var relativeLinks = new List(); +var htmlTags = new List(); +var alerts = new List(); + +if (!string.IsNullOrEmpty(ReadmePath) && File.Exists(ReadmePath)) +{ + var text = File.ReadAllText(ReadmePath); + HasMermaid = Regex.IsMatch(text, @"^\s*(```|~~~)\s*mermaid\b", RegexOptions.Multiline | RegexOptions.IgnoreCase); + + var prose = Regex.Replace(text, @"^\s*(```|~~~)[\s\S]*?^\s*\1\s*$", "", RegexOptions.Multiline); + prose = Regex.Replace(prose, @"`[^`\r\n]*`", ""); + + var hosts = (AllowedImageHosts ?? "").Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries) + .Select(h => h.Trim().ToLowerInvariant()).Where(h => h.Length > 0).ToList(); + + var images = new List(); + foreach (Match m in Regex.Matches(prose, @"!\[[^\]]*\]\(\s*]+)")) + images.Add(m.Groups[1].Value); + foreach (Match m in Regex.Matches(prose, @"]*\bsrc\s*=\s*[""']([^""']+)[""']", RegexOptions.IgnoreCase)) + images.Add(m.Groups[1].Value); + + foreach (var url in images.Distinct()) + { + Uri uri; + if (!Uri.TryCreate(url, UriKind.Absolute, out uri) || (uri.Scheme != "https" && uri.Scheme != "http")) + { + relativeImages.Add(url); + continue; + } + var host = uri.Host.ToLowerInvariant(); + var allowed = hosts.Contains(host) + || (host == "github.com" && Regex.IsMatch(uri.AbsolutePath, @"^/[^/]+/[^/]+/(actions/)?workflows/[^/]+/badge\.svg$", RegexOptions.IgnoreCase)); + if (!allowed) + disallowedImages.Add(url); + } + + foreach (Match m in Regex.Matches(prose, @"(?]+)")) + { + var target = m.Groups[1].Value; + if (target.StartsWith("#") || Regex.IsMatch(target, @"^[A-Za-z][A-Za-z0-9+.-]*:")) + continue; + relativeLinks.Add(target); + } + + foreach (Match m in Regex.Matches(prose, @"]*)?/?>")) + { + if (m.Value.Contains("://") || m.Value.Contains("@")) + continue; + htmlTags.Add("<" + m.Groups[1].Value.ToLowerInvariant() + ">"); + } + + foreach (Match m in Regex.Matches(prose, @"^\s*>\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]", RegexOptions.Multiline | RegexOptions.IgnoreCase)) + alerts.Add("[!" + m.Groups[1].Value.ToUpperInvariant() + "]"); +} + +if (!string.IsNullOrEmpty(IconPath) && File.Exists(IconPath)) +{ + var header = new byte[24]; + using (var stream = File.OpenRead(IconPath)) + { + var read = stream.Read(header, 0, header.Length); + IconIsPng = read == 24 && header[0] == 0x89 && header[1] == 0x50 && header[2] == 0x4E && header[3] == 0x47; + } + if (IconIsPng) + { + IconWidth = (header[16] << 24) | (header[17] << 16) | (header[18] << 8) | header[19]; + IconHeight = (header[20] << 24) | (header[21] << 16) | (header[22] << 8) | header[23]; + } +} + +RelativeImages = string.Join(", ", relativeImages.Distinct()); +DisallowedImages = string.Join(", ", disallowedImages.Distinct()); +RelativeLinks = string.Join(", ", relativeLinks.Distinct()); +HtmlTags = string.Join(", ", htmlTags.Distinct()); +Alerts = string.Join(", ", alerts.Distinct()); +]]> + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/package.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/package.targets new file mode 100644 index 0000000..05add92 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Packaging/package.targets @@ -0,0 +1,80 @@ + + + + + + $(MSBuildProjectName) + false + git + $(RepositoryUrl) + + + true + false + snupkg + + + true + $(MSKit_PackageValidationBaselineVersion) + + + + + $(MSBuildProjectDirectory)/package.readme.md + $(MSBuildProjectDirectory)/README.md + readme.md + <_MSKit_PacksReadme Condition="'$(PackageReadmeFile)'!=''">True + + + $(MSBuildProjectDirectory)/$(PackageReadmeFile) + + + + + icon.png + <_MSKit_PacksIcon>True + + + $(PackageIconPath) + $(MSBuildProjectDirectory)/$(PackageIcon) + + + + + + + + + + + + + + <_MSKit_ResolvePackageUrlsDependsOn Condition="'$(SourceControlInformationFeatureSupported)'=='true'">InitializeSourceControlInformation + + + + <_MSKit_RepoUrl>$(RepositoryUrl) + <_MSKit_RepoUrl Condition="'$(_MSKit_RepoUrl)'==''">$(PrivateRepositoryUrl) + <_MSKit_RepoUrl Condition="$(_MSKit_RepoUrl.EndsWith('.git'))">$(_MSKit_RepoUrl.Substring(0, $([MSBuild]::Subtract($(_MSKit_RepoUrl.Length), 4)))) + $(_MSKit_RepoUrl) + + <_MSKit_IsGitHubUrl Condition="$(PackageProjectUrl.StartsWith('https://github.com/'))">True + $(PackageProjectUrl)/releases/tag/$(MSKit_ReleaseTagRaw) + $(PackageProjectUrl)/releases + + + + + + diff --git a/src/.msbuild/shared/common/init.common.final.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.PrivateAssets/init.last.targets similarity index 53% rename from src/.msbuild/shared/common/init.common.final.targets rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.PrivateAssets/init.last.targets index 12e2242..2d938a6 100644 --- a/src/.msbuild/shared/common/init.common.final.targets +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.PrivateAssets/init.last.targets @@ -1,7 +1,5 @@ - - - \ No newline at end of file + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.PrivateAssets/private.assets.references.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.PrivateAssets/private.assets.references.targets new file mode 100644 index 0000000..9226ef2 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.PrivateAssets/private.assets.references.targets @@ -0,0 +1,14 @@ + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/audit/audit.tests.project.xunit.v3.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/audit/audit.tests.project.xunit.v3.targets new file mode 100644 index 0000000..febe8d5 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/audit/audit.tests.project.xunit.v3.targets @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/implicit.package.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/implicit.package.targets new file mode 100644 index 0000000..29bd17d --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/implicit.package.targets @@ -0,0 +1,26 @@ + + + + 4.0.1 + $(MSKit_PackageVersion_XunitV3) + $(MSKit_PackageVersion_XunitV3) + 4.0.0 + + + + + + + + + + + + $(MSKit_PackageVersion_XunitV3) + $(MSKit_PackageVersion_XunitV3) + $(MSKit_PackageVersion_XunitV3Assert) + $(MSKit_PackageVersion_XunitV3ExtensibilityCore) + $(MSKit_PackageVersion_XunitRunnerVisualStudio) + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/init.last.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/init.last.targets new file mode 100644 index 0000000..ea85fe1 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/init.last.targets @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/init.props new file mode 100644 index 0000000..86ddd60 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/init.props @@ -0,0 +1,12 @@ + + + + true + <_MSKit_TestingFramework_xunit_v3_CommonPropsPath>$(MSBuildThisFileDirectory)tests.project.xunit.v3.common.props + <_MSKit_TestingFramework_xunit_v3_LibCommonPropsPath>$(MSBuildThisFileDirectory)tests.lib.project.xunit.v3.common.props + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/init.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/init.targets new file mode 100644 index 0000000..d12608e --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/init.targets @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.lib.project.xunit.v3.common.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.lib.project.xunit.v3.common.props new file mode 100644 index 0000000..962eec1 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.lib.project.xunit.v3.common.props @@ -0,0 +1,5 @@ + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.project.xunit.v3.common.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.project.xunit.v3.common.props new file mode 100644 index 0000000..7fa68e2 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.project.xunit.v3.common.props @@ -0,0 +1,8 @@ + + + + + true + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.project.xunit.v3.routine.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.project.xunit.v3.routine.props new file mode 100644 index 0000000..08b3e1f --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.project.xunit.v3.routine.props @@ -0,0 +1,8 @@ + + + + + true + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.project.xunit.v3.routine.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.project.xunit.v3.routine.targets new file mode 100644 index 0000000..095e1fc --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing.XUnit.v3/tests.project.xunit.v3.routine.targets @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + + + + + Exe + xunit.runner.json + + + + + + + + + + +{ + "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json" +} + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/audit/audit.internalsVisibleTo.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/audit/audit.internalsVisibleTo.targets new file mode 100644 index 0000000..8de8fe0 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/audit/audit.internalsVisibleTo.targets @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/audit/audit.tests.lib.project.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/audit/audit.tests.lib.project.targets new file mode 100644 index 0000000..11cb07e --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/audit/audit.tests.lib.project.targets @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/audit/audit.tests.project.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/audit/audit.tests.project.targets new file mode 100644 index 0000000..8075de2 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/audit/audit.tests.project.targets @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + <_MSKit_CsprojText013>$([System.IO.File]::ReadAllText('$(MSBuildProjectFullPath)')) + <_MSKit_CsprojText013>$([System.Text.RegularExpressions.Regex]::Replace($(_MSKit_CsprojText013), '<!--[\s\S]*?-->', '')) + <_MSKit_HasDirectIsTestsProject>$([System.Text.RegularExpressions.Regex]::IsMatch($(_MSKit_CsprojText013), '<IsTestsProject\s*>')) + + + + + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/implicit.package.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/implicit.package.targets new file mode 100644 index 0000000..68fa036 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/implicit.package.targets @@ -0,0 +1,42 @@ + + + + + [7.2.2] + 4.3.0 + 9.6.0 + 6.2.0 + 1.0.17 + 18.10.1 + 2.4.1 + 18.11.2 + + + + + + + + + + + + + + + + $(MSKit_PackageVersion_FluentAssertions) + $(MSKit_PackageVersion_Shouldly) + $(MSKit_PackageVersion_AwesomeAssertions) + $(MSKit_PackageVersion_NSubstitute) + $(MSKit_PackageVersion_NSubstituteAnalyzersCSharp) + $(MSKit_PackageVersion_MicrosoftNetTestSdk) + $(MSKit_PackageVersion_MicrosoftTestingExtensionsTrxReport) + $(MSKit_PackageVersion_MicrosoftTestingExtensionsCodeCoverage) + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/init.last.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/init.last.targets new file mode 100644 index 0000000..ea85fe1 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/init.last.targets @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/init.props new file mode 100644 index 0000000..73ea576 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/init.props @@ -0,0 +1,15 @@ + + + + + $(MSBuildThisFileDirectory)tests.project.common.props + $(MSBuildThisFileDirectory)tests.lib.project.common.props + AwesomeAssertions + NSubstitute + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/init.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/init.targets new file mode 100644 index 0000000..958c8f9 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/init.targets @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/test.project.internalsVisibleTo.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/test.project.internalsVisibleTo.targets new file mode 100644 index 0000000..d651dd7 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/test.project.internalsVisibleTo.targets @@ -0,0 +1,31 @@ + + + + + $(MSKit_SlnFileDirectory) + $(MSKit_GitRoot)/ + + + $(MSKit_TestsDir)/ + + + + <_AllCsprojsUnderTestsDir Include="$(MSKit_TestsDir)**/*.csproj" Exclude="$(MSKit_TestsDir)**/bin/**;$(MSKit_TestsDir)**/obj/**;$(MSKit_TestsDir)**/node_modules/**" /> + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.lib.project.common.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.lib.project.common.props new file mode 100644 index 0000000..9685d6b --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.lib.project.common.props @@ -0,0 +1,21 @@ + + + + + <_MSKit_TestingFrameworkAtLibCommonPropsImport>$(MSKit_TestingFramework) + <_MSKit_TestsLibProjectCommonPropsImported>True + True + + + + + + $(_MSKit_TestingFramework_xunit_v3_LibCommonPropsPath) + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.common.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.common.props new file mode 100644 index 0000000..72b358c --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.common.props @@ -0,0 +1,22 @@ + + + + + <_MSKit_TestingFrameworkAtCommonPropsImport>$(MSKit_TestingFramework) + <_MSKit_TestsProjectCommonPropsImported>True + True + True + + + + + + $(_MSKit_TestingFramework_xunit_v3_CommonPropsPath) + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.lib.global.usings.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.lib.global.usings.targets new file mode 100644 index 0000000..3c3053d --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.lib.global.usings.targets @@ -0,0 +1,28 @@ + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.mtp.routine.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.mtp.routine.targets new file mode 100644 index 0000000..253fb90 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.mtp.routine.targets @@ -0,0 +1,25 @@ + + + + testconfig.json + + + + + + + + + + +{ + "diagnosticMessages": false +} + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.props new file mode 100644 index 0000000..fce3b86 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.props @@ -0,0 +1,44 @@ + + + + + + \.(Tests(\.Integration|\.Unit)?|IntegrationTests|UnitTests)$ + $([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectName), $(MSKit_TestsProjectNameRegex))) + True + + + \.(TestsSuite|TestsFixtures|Fixtures)$ + $([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectName), $(MSKit_TestsLibProjectNameRegex))) + True + + <_MSKit_TestsProjectNameRegex_Shared>$(MSKit_TestsProjectNameRegex) + <_MSKit_TestsLibProjectNameRegex_Shared>$(MSKit_TestsLibProjectNameRegex) + + + + + + + + + + Exe + True + + --ignore-exit-code 8 + + + + <_MSKit_TestsProjectPropsImported>True + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.targets new file mode 100644 index 0000000..1bd4bba --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Testing/tests.project.targets @@ -0,0 +1,35 @@ + + + + + False + Library + + + + False + False + + + + True + + True + + + + True + + + + True + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.TfmConstants/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.TfmConstants/init.props new file mode 100644 index 0000000..0f2d9a1 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.TfmConstants/init.props @@ -0,0 +1,5 @@ + + + + + diff --git a/src/.msbuild/shared/common/tfm.constants.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.TfmConstants/tfm.constants.props similarity index 93% rename from src/.msbuild/shared/common/tfm.constants.props rename to src/.toolkit/msbuild/DragoAnt.MSBuildKit.TfmConstants/tfm.constants.props index 296c68e..fca8585 100644 --- a/src/.msbuild/shared/common/tfm.constants.props +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.TfmConstants/tfm.constants.props @@ -36,9 +36,9 @@ 9 10 11 - 12 - 13 - 14 + 12 + 13 + 14 - \ No newline at end of file + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Vcs.GitHub/ci.github.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Vcs.GitHub/ci.github.props new file mode 100644 index 0000000..30decc3 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Vcs.GitHub/ci.github.props @@ -0,0 +1,27 @@ + + + + + True + False + + $(GITHUB_RUN_ID) + + $(GITHUB_RUN_NUMBER) + $(GITHUB_SHA) + + True + $(GITHUB_REF_NAME) + $([System.Text.RegularExpressions.Regex]::Replace('$(MSKit_ReleaseTagRaw)', '^[vV]', '')) + + $([System.Text.RegularExpressions.Regex]::Match('$(GITHUB_REF)', 'refs/pull/(\d+)/').Groups[1].Value) + $([System.Text.RegularExpressions.Regex]::Match('$(GITHUB_REF_NAME)', '^\d+').Value) + + $(GITHUB_SERVER_URL)/$(GITHUB_REPOSITORY) + https://github.com/$(GITHUB_REPOSITORY) + + GitHub + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Vcs.GitHub/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Vcs.GitHub/init.props new file mode 100644 index 0000000..48bdbb4 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit.Vcs.GitHub/init.props @@ -0,0 +1,5 @@ + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.implicit.packages.duplicates.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.implicit.packages.duplicates.targets new file mode 100644 index 0000000..b03a750 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.implicit.packages.duplicates.targets @@ -0,0 +1,34 @@ + + + + + + False + + + + + <_MSKit_ConsumerIdentities Include="%(PackageVersion.Identity)" + Condition="'%(PackageVersion.ControlledBy)'==''" /> + + + <_MSKit_ConsumerIdsStr>;@(_MSKit_ConsumerIdentities, ';'); + + + <_MSKit_DuplicateReport Include="@(PackageVersion)" + Condition="'%(PackageVersion.ControlledBy)'!='' + AND $(_MSKit_ConsumerIdsStr.Contains(';%(PackageVersion.Identity);'))" /> + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.prerelease.packages.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.prerelease.packages.targets new file mode 100644 index 0000000..534e94f --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.prerelease.packages.targets @@ -0,0 +1,29 @@ + + + + + + true + + + + + <_MSKit_PackagesWithVersion Include="@(PackageReference)" Condition="'%(PackageReference.Version)' != ''" /> + <_MSKit_PackagesWithVersion Include="@(PackageVersion)" Condition="'%(PackageVersion.Version)' != ''" /> + <_MSKit_PrereleaseReferences Include="@(_MSKit_PackagesWithVersion)" + Condition="$([System.String]::Copy('%(_MSKit_PackagesWithVersion.Identity)').StartsWith('$(MSKit_PrereleasePackagePrefix)')) AND $([System.String]::Copy('%(_MSKit_PackagesWithVersion.Version)').Contains('-'))" /> + + + <_MSKit_PrereleaseText>Prerelease $(MSKit_PrereleasePackagePrefix)* packages referenced on stable branch '$(MSKit_Branch)':%0A@(_MSKit_PrereleaseReferences->' %(Identity) %(Version)', '%0A')%0AFix: replace them with stable versions in Directory.Packages.props or the csproj. + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.restrict.packages.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.restrict.packages.targets new file mode 100644 index 0000000..4fba85c --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.restrict.packages.targets @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.restrict.reference.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.restrict.reference.targets new file mode 100644 index 0000000..6e84fa3 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.restrict.reference.targets @@ -0,0 +1,35 @@ + + + + + + False + $(MSKit_RestrictReferences) + $(MSKit_RestrictReferences) + + + + + + + + + + + + <_MSKit_PackageReferenceNotAllowListed Include="@(PackageReference)" + Condition=" '%(PackageReference.Allowed)'!='True' AND '@(PackageReference)'!='' AND '%(Identity)'!=''" /> + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.shared.properties.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.shared.properties.targets new file mode 100644 index 0000000..eeda662 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.shared.properties.targets @@ -0,0 +1,98 @@ + + + + + + + <_MSKit_GuardXmlPeek Condition="'$(MSKit_GuardXmlPeekAudit)'!='False'">True + <_MSKit_SPC_CsprojText Condition="'$(_MSKit_GuardXmlPeek)'=='True'">$([System.IO.File]::ReadAllText('$(MSBuildProjectFullPath)')) + <_MSKit_HasTargetFramework Condition="'$(_MSKit_GuardXmlPeek)'!='True'">True + <_MSKit_HasTargetFramework Condition="'$(_MSKit_GuardXmlPeek)'=='True' AND ($(_MSKit_SPC_CsprojText.Contains('<TargetFramework>')) OR $(_MSKit_SPC_CsprojText.Contains('<TargetFramework ')))">True + <_MSKit_HasTargetFrameworks Condition="'$(_MSKit_GuardXmlPeek)'!='True'">True + <_MSKit_HasTargetFrameworks Condition="'$(_MSKit_GuardXmlPeek)'=='True' AND ($(_MSKit_SPC_CsprojText.Contains('<TargetFrameworks>')) OR $(_MSKit_SPC_CsprojText.Contains('<TargetFrameworks ')))">True + + + + + + + + + + <_MSKit_TF_ProjNodeCount>@(_MSKit_TF_NodeCheckXmlResult->Count()) + <_MSKit_TFs_ProjNodeCount>@(_MSKit_TFs_NodeCheckXmlResult->Count()) + + + + + + + + + + + + + + + + + + + + True + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.version.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.version.targets new file mode 100644 index 0000000..aaea8ee --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/audit/audit.version.targets @@ -0,0 +1,93 @@ + + + + + + + + <_MSKit_GuardXmlPeek Condition="'$(MSKit_GuardXmlPeekAudit)'!='False'">True + <_MSKit_RMV_CsprojText Condition="'$(_MSKit_GuardXmlPeek)'=='True'">$([System.IO.File]::ReadAllText('$(MSBuildProjectFullPath)')) + <_MSKit_HasVersion Condition="'$(_MSKit_GuardXmlPeek)'!='True'">True + <_MSKit_HasVersion Condition="'$(_MSKit_GuardXmlPeek)'=='True' AND ($(_MSKit_RMV_CsprojText.Contains('<Version>')) OR $(_MSKit_RMV_CsprojText.Contains('<Version ')))">True + + + + + + + + + + + + + + <_MSKit_ValidPlaceholders>prefix;buildNumber;pipelineId;branchSlug;branchTicket;branchAspectSuffix;buildDateUtcDash;buildDateUtcDot;versionTag;releaseTag;prNumber;commitShaShort + <_MSKit_PlaceholderHelp> +Valid placeholders: + {prefix} - $(VersionPrefix), declared in Directory.Version.props + {buildNumber} - CI run number (GITHUB_RUN_NUMBER); DateBased caps it at 65535 + {pipelineId} - CI run id (GITHUB_RUN_ID) + {releaseTag} - the release tag with a leading v removed (tag builds only) + {prNumber} - the pull request number (pull request builds only) + {branchSlug} - the branch name with every character outside [0-9A-Za-z-] replaced by '-' + {branchTicket} - the first [A-Za-z]+-[0-9]+ match in {branchSlug}, else {branchSlug} + {branchAspectSuffix} - the part of {branchSlug} from its first '--' to the end, else empty + {buildDateUtcDash} - UTC build time as yyyyMMdd-HHmmss + {buildDateUtcDot} - UTC build time as yyyy.M.d + {versionTag} - $(VersionTag) + {commitShaShort} - the first 8 characters of the commit SHA + + <_MSKit_AllTemplates>$(MSKit_VersionTemplate)|$(MSKit_StableVersionTemplate)|$(MSKit_ReleaseVersionTemplate)|$(MSKit_PullRequestVersionTemplate) + <_MSKit_TplHasTokens>false + <_MSKit_TplHasTokens Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(_MSKit_AllTemplates)', '\{[A-Za-z][A-Za-z0-9]*\}'))">true + <_MSKit_TplNames Condition="'$(_MSKit_TplHasTokens)'=='true'">$([System.Text.RegularExpressions.Regex]::Replace('$(_MSKit_AllTemplates)', '[^{}]*\{([A-Za-z][A-Za-z0-9]*)\}[^{}]*', '$1;').TrimEnd(';')) + + + + <_MSKit_ValidPlaceholder Include="$(_MSKit_ValidPlaceholders.Split(';'))" /> + <_MSKit_TplNameItem Include="$(_MSKit_TplNames.Split(';'))" Condition="'$(_MSKit_TplNames)'!=''" /> + <_MSKit_UnknownPlaceholder Include="@(_MSKit_TplNameItem)" Exclude="@(_MSKit_ValidPlaceholder)" /> + + + + + + + + + + + + + + + <_MSKit_ReleaseTagCore>$([System.Text.RegularExpressions.Regex]::Match('$(MSKit_ReleaseTag)', '^\d+\.\d+\.\d+').Value) + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.last.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.last.props new file mode 100644 index 0000000..5787c55 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.last.props @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.last.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.last.targets new file mode 100644 index 0000000..d4f4b5e --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.last.targets @@ -0,0 +1,7 @@ + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.props new file mode 100644 index 0000000..ef44584 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.props @@ -0,0 +1,17 @@ + + + + enable + enable + latest + True + False + True + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.targets new file mode 100644 index 0000000..8f6c1b4 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/init.targets @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/product.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/product.props new file mode 100644 index 0000000..85cd674 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/product.props @@ -0,0 +1,13 @@ + + + + $(MSBuildProjectName) + $([System.DateTime]::UtcNow.Year) + $(ManufacturerName) + $(FullManufacturerName) + + Copyright (c) $(Year) $(FullManufacturerName) + $(ManufacturerName) + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/project.global.metadata.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/project.global.metadata.targets new file mode 100644 index 0000000..9b34627 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/project.global.metadata.targets @@ -0,0 +1,31 @@ + + + + + + all + all + + + all + all + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/project.global.usings.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/project.global.usings.targets new file mode 100644 index 0000000..8e42751 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/project.global.usings.targets @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/twae.shared.init.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/twae.shared.init.props new file mode 100644 index 0000000..ffddb18 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/twae.shared.init.props @@ -0,0 +1,8 @@ + + + + + $(TreatWarningsAsErrors) + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/version.props b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/version.props new file mode 100644 index 0000000..6e356cf --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/version.props @@ -0,0 +1,145 @@ + + + + + + $(VersionPrefix) + + SemVer + DevEnv + + 0 + 0 + + ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ + false + true + + + + + $([System.Environment]::GetEnvironmentVariable('MSKit_BuildDateTimeUtc')) + + + <_MSKit_Ph_buildDateUtcDash>$([System.DateTime]::Parse('$(MSKit_BuildDateTimeUtc)').ToUniversalTime().ToString(yyyyMMdd-HHmmss)) + <_MSKit_Ph_buildDateUtcDot>$([System.DateTime]::Parse('$(MSKit_BuildDateTimeUtc)').ToUniversalTime().ToString(yyyy.M.d)) + + + <_MSKit_Ph_buildDateUtcDash>$([System.DateTime]::UtcNow.ToString(yyyyMMdd-HHmmss)) + <_MSKit_Ph_buildDateUtcDot>$([System.DateTime]::UtcNow.ToString(yyyy.M.d)) + + + + + + 0.0.0 + {releaseTag} + {prefix}-pr.{prNumber}.{buildNumber} + {prefix}-ci.{buildNumber} + {prefix}-ci.{buildNumber} + + + + + 1.0.0 + {prefix}-{buildDateUtcDash}-{branchTicket}{branchAspectSuffix} + {prefix} + + + + + 1.0.0 + {prefix}.{buildNumber}-{buildDateUtcDash}-{branchTicket}{branchAspectSuffix} + {prefix}.{buildNumber} + + + + + $(_MSKit_Ph_buildDateUtcDot) + $([MSBuild]::Modulo($(MSKit_CIPipelineId), 65535)) + 1 + {buildDateUtcDot}.{buildNumber}-{branchTicket}{branchAspectSuffix} + {buildDateUtcDot}.{buildNumber} + + + + + {versionTag} + {versionTag} + + + + + 9999.0.0 + + + 9999.0.0 + 9999.0.0 + + + + + + + + + + + + <_MSKit_Ph_prefix>$(VersionPrefix) + <_MSKit_Ph_versionTag>$(VersionTag) + <_MSKit_Ph_releaseTag Condition="'$(MSKit_IsReleaseTagValid)'=='true'">$(MSKit_ReleaseTag) + + <_MSKit_Ph_releaseTag Condition="'$(MSKit_IsReleaseTagValid)'!='true'">0.0.0-invalid-release-tag + <_MSKit_Ph_prNumber>$(MSKit_PullRequestNumber) + <_MSKit_Ph_buildNumber>$(MSKit_BuildNumber) + <_MSKit_Ph_pipelineId>$(MSKit_CIPipelineId) + <_MSKit_Ph_branchSlug>$([System.Text.RegularExpressions.Regex]::Replace('$(MSKit_Branch)', '[^0-9A-Za-z-]', '-')) + + <_MSKit_BranchTicketMatch>$([System.Text.RegularExpressions.Regex]::Match($(_MSKit_Ph_branchSlug), '[A-Za-z]+-\d+').Value) + <_MSKit_Ph_branchTicket Condition="'$(_MSKit_BranchTicketMatch)'!=''">$(_MSKit_BranchTicketMatch) + <_MSKit_Ph_branchTicket Condition="'$(_MSKit_BranchTicketMatch)'==''">$(_MSKit_Ph_branchSlug) + + <_MSKit_BranchAspectIdx>$(_MSKit_Ph_branchSlug.IndexOf('--')) + <_MSKit_Ph_branchAspectSuffix Condition="'$(_MSKit_BranchAspectIdx)'!='-1'">$(_MSKit_Ph_branchSlug.Substring($(_MSKit_BranchAspectIdx))) + + <_MSKit_Ph_commitShaShort Condition="$(MSKit_CommitSha.Length) >= 8">$(MSKit_CommitSha.Substring(0, 8)) + + + + <_MSKit_EffectiveTemplate Condition="'$(MSKit_IsStableBranch)'=='true'">$(MSKit_StableVersionTemplate) + <_MSKit_EffectiveTemplate Condition="'$(MSKit_IsStableBranch)'!='true'">$(MSKit_VersionTemplate) + <_MSKit_EffectiveTemplate Condition="'$(MSKit_PullRequestNumber)'!='' AND '$(MSKit_PullRequestVersionTemplate)'!=''">$(MSKit_PullRequestVersionTemplate) + <_MSKit_EffectiveTemplate Condition="'$(MSKit_IsReleaseTag)'=='True' AND '$(MSKit_ReleaseVersionTemplate)'!=''">$(MSKit_ReleaseVersionTemplate) + + <_MSKit_Rendered>$(_MSKit_EffectiveTemplate) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{prefix}', '$(_MSKit_Ph_prefix)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{buildNumber}', '$(_MSKit_Ph_buildNumber)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{pipelineId}', '$(_MSKit_Ph_pipelineId)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{branchSlug}', '$(_MSKit_Ph_branchSlug)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{branchTicket}', '$(_MSKit_Ph_branchTicket)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{branchAspectSuffix}', '$(_MSKit_Ph_branchAspectSuffix)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{buildDateUtcDash}', '$(_MSKit_Ph_buildDateUtcDash)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{buildDateUtcDot}', '$(_MSKit_Ph_buildDateUtcDot)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{versionTag}', '$(_MSKit_Ph_versionTag)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{releaseTag}', '$(_MSKit_Ph_releaseTag)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{prNumber}', '$(_MSKit_Ph_prNumber)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{commitShaShort}', '$(_MSKit_Ph_commitShaShort)')) + + <_MSKit_RenderHasUnknown>false + <_MSKit_RenderHasUnknown Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(_MSKit_Rendered)', '\{[A-Za-z][A-Za-z0-9]*\}'))">true + + $(_MSKit_Rendered) + + unknown placeholder: $(_MSKit_Rendered) + + + diff --git a/src/.toolkit/msbuild/DragoAnt.MSBuildKit/version.targets b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/version.targets new file mode 100644 index 0000000..8b72fe8 --- /dev/null +++ b/src/.toolkit/msbuild/DragoAnt.MSBuildKit/version.targets @@ -0,0 +1,38 @@ + + + + + + + <_MSKit_Ph_prefix>$(VersionPrefix) + + <_MSKit_EffectiveTemplate Condition="'$(MSKit_IsStableBranch)'=='true'">$(MSKit_StableVersionTemplate) + <_MSKit_EffectiveTemplate Condition="'$(MSKit_IsStableBranch)'!='true'">$(MSKit_VersionTemplate) + <_MSKit_EffectiveTemplate Condition="'$(MSKit_PullRequestNumber)'!='' AND '$(MSKit_PullRequestVersionTemplate)'!=''">$(MSKit_PullRequestVersionTemplate) + <_MSKit_EffectiveTemplate Condition="'$(MSKit_IsReleaseTag)'=='True' AND '$(MSKit_ReleaseVersionTemplate)'!=''">$(MSKit_ReleaseVersionTemplate) + + <_MSKit_Rendered>$(_MSKit_EffectiveTemplate) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{prefix}', '$(_MSKit_Ph_prefix)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{buildNumber}', '$(_MSKit_Ph_buildNumber)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{pipelineId}', '$(_MSKit_Ph_pipelineId)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{branchSlug}', '$(_MSKit_Ph_branchSlug)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{branchTicket}', '$(_MSKit_Ph_branchTicket)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{branchAspectSuffix}', '$(_MSKit_Ph_branchAspectSuffix)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{buildDateUtcDash}', '$(_MSKit_Ph_buildDateUtcDash)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{buildDateUtcDot}', '$(_MSKit_Ph_buildDateUtcDot)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{versionTag}', '$(_MSKit_Ph_versionTag)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{releaseTag}', '$(_MSKit_Ph_releaseTag)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{prNumber}', '$(_MSKit_Ph_prNumber)')) + <_MSKit_Rendered>$(_MSKit_Rendered.Replace('{commitShaShort}', '$(_MSKit_Ph_commitShaShort)')) + + $(_MSKit_Rendered) + $(_MSKit_Rendered) + + + + + diff --git a/src/.toolkit/msbuild/init.company.props b/src/.toolkit/msbuild/init.company.props new file mode 100644 index 0000000..587098c --- /dev/null +++ b/src/.toolkit/msbuild/init.company.props @@ -0,0 +1,35 @@ + + + + + DragoAnt + DragoAnt + + MIT + $(MSBuildThisFileDirectory)../res/package.icon.png + DragoAnt. + + ^(main|release/.+)$ + ReleaseTag + + + True + + True + + CS1591;xUnit1051;$(NoWarn) + + $(WarningsNotAsErrors);NU1901;NU1902;NU1903;NU1904 + + xunit.v3 + AwesomeAssertions + + + + + + + diff --git a/src/.toolkit/msbuild/init.company.targets b/src/.toolkit/msbuild/init.company.targets new file mode 100644 index 0000000..45bff74 --- /dev/null +++ b/src/.toolkit/msbuild/init.company.targets @@ -0,0 +1,5 @@ + + + + + diff --git a/src/.toolkit/msbuild/init.props b/src/.toolkit/msbuild/init.props new file mode 100644 index 0000000..580345c --- /dev/null +++ b/src/.toolkit/msbuild/init.props @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/.toolkit/msbuild/init.targets b/src/.toolkit/msbuild/init.targets new file mode 100644 index 0000000..0385214 --- /dev/null +++ b/src/.toolkit/msbuild/init.targets @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/.toolkit/res/package.icon.png b/src/.toolkit/res/package.icon.png new file mode 100644 index 0000000..e890a29 Binary files /dev/null and b/src/.toolkit/res/package.icon.png differ diff --git a/src/.toolkit/update.ps1 b/src/.toolkit/update.ps1 new file mode 100644 index 0000000..d5fdfea --- /dev/null +++ b/src/.toolkit/update.ps1 @@ -0,0 +1,214 @@ +#!/usr/bin/env pwsh +<# +.SYNOPSIS +Installs or updates DragoAnt.MSBuildKit in a repository's .toolkit/ folder. + +.DESCRIPTION +Downloads a release zip of the kit from GitHub, checks its SHA-256 against the published +checksum (and against .toolkit/kit.json when the version is unchanged), and rewrites +.toolkit/msbuild/ with the default parts plus the optional parts you selected. + +.EXAMPLE +pwsh .toolkit/update.ps1 # update to the version in kit.json, else the latest +pwsh .toolkit/update.ps1 -Version 0.2.0 -DryRun # show what 0.2.0 would change +pwsh .toolkit/update.ps1 -Add PackageAsProj # install an optional part +#> +[CmdletBinding()] +param( + # Kit version to install; default: the version in .toolkit/kit.json, else the latest release. + [string] $Version, + # Optional parts to install, e.g. PackageAsProj, EF, Project.SourceGenerator. + [string[]] $Add = @(), + # Optional parts to uninstall. + [string[]] $Remove = @(), + # Show what would change and change nothing. + [switch] $DryRun, + # Install from a local kit build (a folder containing .toolkit/ or a release zip). + [string] $Source, + # Expected SHA-256 of the release zip (or of a -Source zip). + [string] $Sha256, + # GitHub repository to download releases from. + [string] $Repo = 'DragoAnt/MSBuildKit', + # Repository root; default: the current folder. + [string] $Root +) + +Set-StrictMode -Version Latest +$ErrorActionPreference = 'Stop' + +function Say([string] $text) { Write-Host "update: $text" } +function Fail([string] $text) { throw "update: error: $text" } + +if (-not $Root) { $Root = (Get-Location).Path } +$Root = (Resolve-Path $Root).Path +$toolkit = Join-Path $Root '.toolkit' +$kitJsonPath = Join-Path $toolkit 'kit.json' +$kitJson = if (Test-Path $kitJsonPath) { Get-Content -Raw $kitJsonPath | ConvertFrom-Json } else { $null } +function KitJsonValue([string] $name) { + if ($null -ne $kitJson -and $kitJson.PSObject.Properties.Name -contains $name) { return $kitJson.$name } + return $null +} + +if ($Version) { $Version = $Version -replace '^[vV]', '' } +if ($Sha256) { $Sha256 = $Sha256.ToLowerInvariant() } +$recordedRepo = KitJsonValue 'repository' +if ($recordedRepo -and $Repo -eq 'DragoAnt/MSBuildKit') { $Repo = $recordedRepo } + +$work = Join-Path ([System.IO.Path]::GetTempPath()) ("msbuildkit-" + [guid]::NewGuid().ToString('N')) +New-Item -ItemType Directory -Path $work | Out-Null +try { + $actualSha = '' + $kitDir = $null + if ($Source) { + if (Test-Path $Source -PathType Container) { + if (-not (Test-Path (Join-Path $Source '.toolkit/msbuild/init.props'))) { Fail "'$Source' is not a kit build: no .toolkit/msbuild/init.props" } + $kitDir = (Resolve-Path $Source).Path + } + elseif (Test-Path $Source -PathType Leaf) { + $actualSha = (Get-FileHash -Algorithm SHA256 $Source).Hash.ToLowerInvariant() + if ($Sha256 -and $actualSha -ne $Sha256) { Fail "SHA-256 mismatch for '$Source': expected $Sha256, got $actualSha" } + $kitDir = Join-Path $work 'kit' + Expand-Archive -Path $Source -DestinationPath $kitDir + } + else { Fail "-Source '$Source' does not exist" } + if (-not $Version) { + $versionFile = Join-Path $kitDir '.toolkit/kit.version' + $Version = if (Test-Path $versionFile) { (Get-Content $versionFile -TotalCount 1).Trim() } else { '0.0.0-local' } + } + } + else { + if (-not $Version) { $Version = KitJsonValue 'version' } + if (-not $Version) { + $latest = Invoke-RestMethod -Uri "https://api.github.com/repos/$Repo/releases/latest" -Headers @{ 'User-Agent' = 'msbuildkit-update' } + $Version = ($latest.tag_name -replace '^[vV]', '') + if (-not $Version) { Fail "no release found in $Repo" } + } + $zipName = "msbuildkit-$Version.zip" + $base = "https://github.com/$Repo/releases/download/v$Version" + $zipPath = Join-Path $work $zipName + Say "downloading $base/$zipName" + Invoke-WebRequest -Uri "$base/$zipName" -OutFile $zipPath + Invoke-WebRequest -Uri "$base/$zipName.sha256" -OutFile "$zipPath.sha256" + $published = ((Get-Content "$zipPath.sha256" -TotalCount 1) -split '\s+')[0].ToLowerInvariant() + $actualSha = (Get-FileHash -Algorithm SHA256 $zipPath).Hash.ToLowerInvariant() + if ($actualSha -ne $published) { Fail "SHA-256 mismatch for ${zipName}: published $published, downloaded $actualSha" } + $pinned = KitJsonValue 'sha256' + if (-not $Sha256 -and (KitJsonValue 'version') -eq $Version -and $pinned) { $Sha256 = $pinned.ToLowerInvariant() } + if ($Sha256 -and $actualSha -ne $Sha256) { Fail "SHA-256 mismatch for ${zipName}: expected $Sha256 (kit.json or -Sha256), got $actualSha" } + $kitDir = Join-Path $work 'kit' + Expand-Archive -Path $zipPath -DestinationPath $kitDir + } + + $newToolkit = Join-Path $kitDir '.toolkit' + if (-not (Test-Path (Join-Path $newToolkit 'msbuild/init.props'))) { Fail 'the kit build has no .toolkit/msbuild/init.props' } + $partsPath = Join-Path $newToolkit 'kit.parts' + if (-not (Test-Path $partsPath)) { Fail 'the kit build has no .toolkit/kit.parts' } + if ((Test-Path $toolkit) -and (Resolve-Path $newToolkit).Path -eq (Resolve-Path $toolkit).Path) { + Fail 'the target .toolkit is the kit source itself; run from the repository you want to update, or pass -Root' + } + $parts = [ordered]@{} + foreach ($line in Get-Content $partsPath) { + $line = $line.Trim() + if (-not $line -or $line.StartsWith('#')) { continue } + $fields = $line -split '\s+' + $parts[$fields[0]] = [pscustomobject]@{ Kind = $fields[1]; Requires = @($fields | Select-Object -Skip 2) } + } + function PartDir([string] $name) { if ($name -eq 'Trunk') { 'DragoAnt.MSBuildKit' } else { "DragoAnt.MSBuildKit.$name" } } + + $optional = [System.Collections.Generic.List[string]]::new() + $recordedParts = @(KitJsonValue 'parts' | Where-Object { $_ }) + foreach ($p in @($recordedParts) + @($Add)) { + if (-not $parts.Contains($p)) { Fail "unknown part '$p'; known parts: $($parts.Keys -join ' ')" } + if ($parts[$p].Kind -eq 'optional' -and -not $optional.Contains($p)) { $optional.Add($p) } + } + foreach ($p in $Remove) { + if (-not $parts.Contains($p)) { Fail "unknown part '$p'" } + if ($parts[$p].Kind -ne 'optional') { Fail "'$p' is a default part and cannot be removed" } + [void]$optional.Remove($p) + } + + $selected = [System.Collections.Generic.List[string]]::new() + foreach ($name in $parts.Keys) { if ($parts[$name].Kind -eq 'default') { $selected.Add($name) } } + $pending = [System.Collections.Generic.Queue[string]]::new([string[]]$optional) + while ($pending.Count -gt 0) { + $p = $pending.Dequeue() + if ($selected.Contains($p)) { continue } + $selected.Add($p) + foreach ($d in $parts[$p].Requires) { $pending.Enqueue($d) } + } + $recorded = @($parts.Keys | Where-Object { $selected.Contains($_) -and $parts[$_].Kind -eq 'optional' }) + + $stage = Join-Path $work 'stage/msbuild' + New-Item -ItemType Directory -Path $stage -Force | Out-Null + Get-ChildItem -File (Join-Path $newToolkit 'msbuild') | Copy-Item -Destination $stage + foreach ($p in $selected) { + $d = PartDir $p + $from = Join-Path $newToolkit "msbuild/$d" + if (-not (Test-Path $from)) { Fail "the kit build has no part folder msbuild/$d" } + Copy-Item -Recurse $from (Join-Path $stage $d) + } + + $oldVersion = KitJsonValue 'version' + Say "kit $Repo $(if ($oldVersion) { $oldVersion } else { 'none' }) -> $Version$(if ($actualSha) { " (sha256 $actualSha)" })" + Say "parts: $($selected -join ' ')" + + $currentMsbuild = Join-Path $toolkit 'msbuild' + function RelativeFiles([string] $dir) { + if (-not (Test-Path $dir)) { return @() } + $full = (Resolve-Path $dir).Path + @(Get-ChildItem -Recurse -File $full | ForEach-Object { $_.FullName.Substring($full.Length + 1).Replace('\', '/') } | Sort-Object) + } + $old = RelativeFiles $currentMsbuild + $new = RelativeFiles $stage + $changes = 0 + foreach ($f in $new) { + if ($old -notcontains $f) { Say " add .toolkit/msbuild/$f"; $changes++ } + elseif ((Get-FileHash (Join-Path $currentMsbuild $f)).Hash -ne (Get-FileHash (Join-Path $stage $f)).Hash) { Say " change .toolkit/msbuild/$f"; $changes++ } + } + foreach ($f in $old) { if ($new -notcontains $f) { Say " remove .toolkit/msbuild/$f"; $changes++ } } + + $dbp = Join-Path $Root 'Directory.Build.props' + $dbt = Join-Path $Root 'Directory.Build.targets' + if ($DryRun) { + Say "$changes file(s) under .toolkit/msbuild would change" + if (-not (Test-Path $dbp)) { Say ' would create Directory.Build.props' } + if (-not (Test-Path $dbt)) { Say ' would create Directory.Build.targets' } + Say 'dry run: nothing changed' + return + } + + New-Item -ItemType Directory -Path $toolkit -Force | Out-Null + if (Test-Path $currentMsbuild) { Remove-Item -Recurse -Force $currentMsbuild } + Copy-Item -Recurse $stage $currentMsbuild + $res = Join-Path $newToolkit 'res' + if (Test-Path $res) { New-Item -ItemType Directory -Path (Join-Path $toolkit 'res') -Force | Out-Null; Copy-Item -Recurse -Force (Join-Path $res '*') (Join-Path $toolkit 'res') } + foreach ($f in 'update.sh', 'update.ps1', 'kit.parts') { + $from = Join-Path $newToolkit $f + if (Test-Path $from) { Copy-Item -Force $from (Join-Path $toolkit $f) } + } + Remove-Item -Force -ErrorAction SilentlyContinue (Join-Path $toolkit 'kit.version') + + $partsJson = ($recorded | ForEach-Object { "`"$_`"" }) -join ', ' + $json = "{`n `"repository`": `"$Repo`",`n `"version`": `"$Version`",`n `"sha256`": `"$actualSha`",`n `"parts`": [$partsJson]`n}`n" + [System.IO.File]::WriteAllText($kitJsonPath, $json) + Say "$changes file(s) under .toolkit/msbuild changed" + + if (-not (Test-Path $dbp)) { + [System.IO.File]::WriteAllText($dbp, "`n`n `n`n`n") + Say 'created Directory.Build.props' + } + elseif ((Get-Content -Raw $dbp) -notmatch '\.toolkit[/\\]msbuild[/\\]init\.props') { + Say 'add to Directory.Build.props: ' + } + if (-not (Test-Path $dbt)) { + [System.IO.File]::WriteAllText($dbt, "`n`n `n`n`n") + Say 'created Directory.Build.targets' + } + elseif ((Get-Content -Raw $dbt) -notmatch '\.toolkit[/\\]msbuild[/\\]init\.targets') { + Say 'add to Directory.Build.targets: ' + } + Say "done: DragoAnt.MSBuildKit $Version installed in $toolkit" +} +finally { + Remove-Item -Recurse -Force -ErrorAction SilentlyContinue $work +} diff --git a/src/.toolkit/update.sh b/src/.toolkit/update.sh new file mode 100644 index 0000000..9cec564 --- /dev/null +++ b/src/.toolkit/update.sh @@ -0,0 +1,222 @@ +#!/bin/sh +# Installs or updates DragoAnt.MSBuildKit in a repository's .toolkit/ folder. +# Usage: sh .toolkit/update.sh [--version X.Y.Z] [--add PART] [--remove PART] [--dry-run] +# [--source DIR|ZIP] [--sha256 HEX] [--repo OWNER/NAME] [--root DIR] +set -eu + +repo="DragoAnt/MSBuildKit" +version="" +source="" +expected_sha="" +root="" +dry_run=0 +add_parts="" +remove_parts="" + +usage() { + sed -n '2,4p' "$0" | sed 's/^# \{0,1\}//' + cat <<'EOF' + + --version X.Y.Z kit version to install (default: the version in .toolkit/kit.json, else the latest release) + --add PART install an optional part (repeatable), e.g. --add PackageAsProj + --remove PART uninstall an optional part (repeatable) + --dry-run show what would change and change nothing + --source DIR|ZIP install from a local kit build instead of a GitHub release + --sha256 HEX expected SHA-256 of the release zip (or of a --source zip) + --repo OWNER/NAME GitHub repository to download releases from (default: DragoAnt/MSBuildKit) + --root DIR repository root (default: the current folder) +EOF +} + +fail() { echo "update: error: $*" >&2; exit 1; } +say() { echo "update: $*"; } + +while [ $# -gt 0 ]; do + case "$1" in + --version) [ $# -ge 2 ] || fail "--version needs a value"; version="${2#v}"; shift 2 ;; + --source) [ $# -ge 2 ] || fail "--source needs a value"; source="$2"; shift 2 ;; + --sha256) [ $# -ge 2 ] || fail "--sha256 needs a value"; expected_sha=$(printf '%s' "$2" | tr 'A-F' 'a-f'); shift 2 ;; + --repo) [ $# -ge 2 ] || fail "--repo needs a value"; repo="$2"; shift 2 ;; + --root) [ $# -ge 2 ] || fail "--root needs a value"; root="$2"; shift 2 ;; + --add) [ $# -ge 2 ] || fail "--add needs a value"; add_parts="$add_parts $2"; shift 2 ;; + --remove) [ $# -ge 2 ] || fail "--remove needs a value"; remove_parts="$remove_parts $2"; shift 2 ;; + --dry-run) dry_run=1; shift ;; + -h|--help) usage; exit 0 ;; + *) fail "unknown argument '$1' (see --help)" ;; + esac +done + +[ -n "$root" ] || root=$(pwd) +[ -d "$root" ] || fail "root '$root' is not a directory" +toolkit="$root/.toolkit" +kit_json="$toolkit/kit.json" + +json_value() { [ -f "$kit_json" ] && sed -n "s/.*\"$1\"[[:space:]]*:[[:space:]]*\"\([^\"]*\)\".*/\1/p" "$kit_json" | head -n 1 || true; } +json_parts() { [ -f "$kit_json" ] && sed -n 's/.*"parts"[[:space:]]*:[[:space:]]*\[\(.*\)\].*/\1/p' "$kit_json" | tr -d '" ' | tr ',' ' ' || true; } + +sha256_of() { + if command -v sha256sum >/dev/null 2>&1; then sha256sum "$1" | cut -d' ' -f1 + elif command -v shasum >/dev/null 2>&1; then shasum -a 256 "$1" | cut -d' ' -f1 + else fail "neither sha256sum nor shasum is available"; fi +} + +download() { + if command -v curl >/dev/null 2>&1; then curl -fsSL --retry 3 -o "$2" "$1" + elif command -v wget >/dev/null 2>&1; then wget -q -O "$2" "$1" + else fail "neither curl nor wget is available"; fi +} + +extract_zip() { + if command -v unzip >/dev/null 2>&1; then unzip -q -o "$1" -d "$2" + else tar -xf "$1" -C "$2" || fail "cannot extract '$1': install unzip"; fi +} + +work=$(mktemp -d) +trap 'rm -rf "$work"' EXIT INT TERM +kit_dir="" +actual_sha="" + +[ -n "$repo" ] || fail "--repo is empty" +recorded_repo=$(json_value repository) +if [ -n "$recorded_repo" ] && [ "$repo" = "DragoAnt/MSBuildKit" ]; then repo="$recorded_repo"; fi + +if [ -n "$source" ]; then + if [ -d "$source" ]; then + [ -f "$source/.toolkit/msbuild/init.props" ] || fail "'$source' is not a kit build: no .toolkit/msbuild/init.props" + kit_dir="$source" + elif [ -f "$source" ]; then + actual_sha=$(sha256_of "$source") + if [ -n "$expected_sha" ] && [ "$actual_sha" != "$expected_sha" ]; then + fail "SHA-256 mismatch for '$source': expected $expected_sha, got $actual_sha" + fi + mkdir -p "$work/kit"; extract_zip "$source" "$work/kit"; kit_dir="$work/kit" + else + fail "--source '$source' does not exist" + fi + [ -n "$version" ] || version=$(sed -n '1p' "$kit_dir/.toolkit/kit.version" 2>/dev/null || true) + [ -n "$version" ] || version="0.0.0-local" +else + [ -n "$version" ] || version=$(json_value version) + if [ -z "$version" ]; then + download "https://api.github.com/repos/$repo/releases/latest" "$work/latest.json" || fail "cannot query the latest release of $repo" + tag=$(sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$work/latest.json" | head -n 1) + [ -n "$tag" ] || fail "no release found in $repo" + version="${tag#v}" + fi + zip_name="msbuildkit-$version.zip" + base="https://github.com/$repo/releases/download/v$version" + say "downloading $base/$zip_name" + download "$base/$zip_name" "$work/$zip_name" || fail "cannot download $base/$zip_name" + download "$base/$zip_name.sha256" "$work/$zip_name.sha256" || fail "cannot download $base/$zip_name.sha256" + published_sha=$(cut -d' ' -f1 "$work/$zip_name.sha256" | tr 'A-F' 'a-f') + actual_sha=$(sha256_of "$work/$zip_name") + [ "$actual_sha" = "$published_sha" ] || fail "SHA-256 mismatch for $zip_name: published $published_sha, downloaded $actual_sha" + pinned_sha=$(json_value sha256) + if [ -z "$expected_sha" ] && [ "$(json_value version)" = "$version" ] && [ -n "$pinned_sha" ]; then expected_sha="$pinned_sha"; fi + if [ -n "$expected_sha" ] && [ "$actual_sha" != "$expected_sha" ]; then + fail "SHA-256 mismatch for $zip_name: expected $expected_sha (kit.json or --sha256), got $actual_sha" + fi + mkdir -p "$work/kit"; extract_zip "$work/$zip_name" "$work/kit"; kit_dir="$work/kit" +fi + +new_toolkit="$kit_dir/.toolkit" +[ -f "$new_toolkit/msbuild/init.props" ] || fail "the kit build has no .toolkit/msbuild/init.props" +[ -f "$new_toolkit/kit.parts" ] || fail "the kit build has no .toolkit/kit.parts" +if [ -d "$toolkit" ] && [ "$(cd "$new_toolkit" && pwd -P)" = "$(cd "$toolkit" && pwd -P)" ]; then fail "the target .toolkit is the kit source itself; run from the repository you want to update, or pass --root"; fi +parts_file="$work/kit.parts" +tr -d '\r' < "$new_toolkit/kit.parts" | grep -v '^[[:space:]]*#' | grep -v '^[[:space:]]*$' > "$parts_file" + +part_kind() { awk -v p="$1" '$1==p {print $2}' "$parts_file"; } +part_deps() { awk -v p="$1" '$1==p {for (i=3;i<=NF;i++) print $i}' "$parts_file"; } +part_dir() { if [ "$1" = "Trunk" ]; then echo "DragoAnt.MSBuildKit"; else echo "DragoAnt.MSBuildKit.$1"; fi; } + +optional="" +for p in $(json_parts) $add_parts; do + kind=$(part_kind "$p") + [ -n "$kind" ] || fail "unknown part '$p'; known parts: $(awk '{print $1}' "$parts_file" | tr '\n' ' ')" + case " $optional " in *" $p "*) ;; *) if [ "$kind" = optional ]; then optional="$optional $p"; fi ;; esac +done +for p in $remove_parts; do + kind=$(part_kind "$p") + [ -n "$kind" ] || fail "unknown part '$p'" + [ "$kind" = optional ] || fail "'$p' is a default part and cannot be removed" + optional=$(echo " $optional " | sed "s/ $p / /g") +done + +selected=$(awk '$2=="default" {print $1}' "$parts_file") +pending="$optional" +while [ -n "$(echo $pending)" ]; do + next="" + for p in $pending; do + case " $(echo $selected) " in *" $p "*) continue ;; esac + selected="$selected $p" + for d in $(part_deps "$p"); do next="$next $d"; done + done + pending="$next" +done +recorded="" +for p in $selected; do if [ "$(part_kind "$p")" = optional ]; then recorded="$recorded $p"; fi; done +recorded=$(echo $recorded) + +stage="$work/stage" +mkdir -p "$stage/msbuild" +for f in "$new_toolkit"/msbuild/*; do [ -f "$f" ] && cp "$f" "$stage/msbuild/"; done +for p in $selected; do + d=$(part_dir "$p") + [ -d "$new_toolkit/msbuild/$d" ] || fail "the kit build has no part folder msbuild/$d" + cp -R "$new_toolkit/msbuild/$d" "$stage/msbuild/$d" +done + +old_version=$(json_value version) +say "kit $repo ${old_version:-none} -> $version${actual_sha:+ (sha256 $actual_sha)}" +say "parts: $(echo $selected)" +changes=0 +if [ -d "$toolkit/msbuild" ]; then + (cd "$toolkit/msbuild" && find . -type f | sort) > "$work/old.lst" +else + : > "$work/old.lst" +fi +(cd "$stage/msbuild" && find . -type f | sort) > "$work/new.lst" +for f in $(comm -13 "$work/old.lst" "$work/new.lst"); do say " add .toolkit/msbuild/${f#./}"; changes=$((changes+1)); done +for f in $(comm -23 "$work/old.lst" "$work/new.lst"); do say " remove .toolkit/msbuild/${f#./}"; changes=$((changes+1)); done +for f in $(comm -12 "$work/old.lst" "$work/new.lst"); do + cmp -s "$toolkit/msbuild/$f" "$stage/msbuild/$f" || { say " change .toolkit/msbuild/${f#./}"; changes=$((changes+1)); } +done + +dbp="$root/Directory.Build.props" +dbt="$root/Directory.Build.targets" + +if [ "$dry_run" -eq 1 ]; then + say "$changes file(s) under .toolkit/msbuild would change" + [ -f "$dbp" ] || say " would create Directory.Build.props" + [ -f "$dbt" ] || say " would create Directory.Build.targets" + say "dry run: nothing changed" + exit 0 +fi + +mkdir -p "$toolkit" +rm -rf "$toolkit/msbuild" +cp -R "$stage/msbuild" "$toolkit/msbuild" +if [ -d "$new_toolkit/res" ]; then mkdir -p "$toolkit/res"; cp -R "$new_toolkit/res/." "$toolkit/res/"; fi +for f in update.sh update.ps1 kit.parts; do [ -f "$new_toolkit/$f" ] && cp "$new_toolkit/$f" "$toolkit/$f"; done +rm -f "$toolkit/kit.version" +say "$changes file(s) under .toolkit/msbuild changed" + +parts_json="" +for p in $recorded; do parts_json="$parts_json${parts_json:+, }\"$p\""; done +printf '{\n "repository": "%s",\n "version": "%s",\n "sha256": "%s",\n "parts": [%s]\n}\n' \ + "$repo" "$version" "$actual_sha" "$parts_json" > "$kit_json" + +if [ ! -f "$dbp" ]; then + printf '\n\n \n\n\n' > "$dbp" + say "created Directory.Build.props" +elif ! grep -q '\.toolkit[/\\]msbuild[/\\]init\.props' "$dbp"; then + say "add to Directory.Build.props: " +fi +if [ ! -f "$dbt" ]; then + printf '\n\n \n\n\n' > "$dbt" + say "created Directory.Build.targets" +elif ! grep -q '\.toolkit[/\\]msbuild[/\\]init\.targets' "$dbt"; then + say "add to Directory.Build.targets: " +fi +say "done: DragoAnt.MSBuildKit $version installed in $toolkit" diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 20b7fb9..2f280a9 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,18 +1,27 @@ - TargetFrameworks net7.0;net8.0;net9.0 - $(NoWarn);CS1591;EF1001;xUnit1051 + Copyright (c) 2025 DragoAnt - + $(NoWarn);EF1001 + enable + enable + latest + True + + true $(NoWarn);NETSDK1138 + + efcore;entity-framework-core;migrations;database + + FluentAssertions - + net8.0;net9.0 - \ No newline at end of file + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index e42cfff..4308a67 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -1,5 +1,11 @@ - + - \ No newline at end of file + + + false + false + + + diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index e1a7314..d234a44 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -1,7 +1,5 @@ - - true false @@ -63,17 +61,10 @@ - - - - - - - \ No newline at end of file diff --git a/src/Directory.Version.props b/src/Directory.Version.props new file mode 100644 index 0000000..fa3ef2b --- /dev/null +++ b/src/Directory.Version.props @@ -0,0 +1,5 @@ + + + 9.0.1 + + diff --git a/src/DragoAnt.EntityConventions.Contacts/DragoAnt.EntityConventions.Contacts.csproj b/src/DragoAnt.EntityConventions.Contacts/DragoAnt.EntityConventions.Contacts.csproj deleted file mode 100644 index 7aac3c7..0000000 --- a/src/DragoAnt.EntityConventions.Contacts/DragoAnt.EntityConventions.Contacts.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Entity conventions contracts for map enities with commom functionality - enable - - - diff --git a/src/DragoAnt.EntityConventions.Contacts/package.readme.md b/src/DragoAnt.EntityConventions.Contacts/package.readme.md deleted file mode 100644 index b250892..0000000 --- a/src/DragoAnt.EntityConventions.Contacts/package.readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# DragoAnt.EntityConventions.Contacts - - Entity conventions contracts for map enities with commom functionality diff --git a/src/DragoAnt.EntityConventions.Contracts/DragoAnt.EntityConventions.Contracts.csproj b/src/DragoAnt.EntityConventions.Contracts/DragoAnt.EntityConventions.Contracts.csproj new file mode 100644 index 0000000..dc5000f --- /dev/null +++ b/src/DragoAnt.EntityConventions.Contracts/DragoAnt.EntityConventions.Contracts.csproj @@ -0,0 +1,8 @@ + + + + Marker interfaces and options for entity conventions such as create/concurrency auditing, discriminators and source-system ids. + enable + + + diff --git a/src/DragoAnt.EntityConventions.Contacts/DragoAnt.EntityConventions.Contacts.csproj.DotSettings b/src/DragoAnt.EntityConventions.Contracts/DragoAnt.EntityConventions.Contracts.csproj.DotSettings similarity index 100% rename from src/DragoAnt.EntityConventions.Contacts/DragoAnt.EntityConventions.Contacts.csproj.DotSettings rename to src/DragoAnt.EntityConventions.Contracts/DragoAnt.EntityConventions.Contracts.csproj.DotSettings diff --git a/src/DragoAnt.EntityConventions.Contacts/EntityConventionsCommonDefaultsOptions.cs b/src/DragoAnt.EntityConventions.Contracts/EntityConventionsCommonDefaultsOptions.cs similarity index 93% rename from src/DragoAnt.EntityConventions.Contacts/EntityConventionsCommonDefaultsOptions.cs rename to src/DragoAnt.EntityConventions.Contracts/EntityConventionsCommonDefaultsOptions.cs index f16e0fd..e7f8498 100644 --- a/src/DragoAnt.EntityConventions.Contacts/EntityConventionsCommonDefaultsOptions.cs +++ b/src/DragoAnt.EntityConventions.Contracts/EntityConventionsCommonDefaultsOptions.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; public sealed class EntityConventionsCommonDefaultsOptions { diff --git a/src/DragoAnt.EntityConventions.Contacts/EntityConventionsException.cs b/src/DragoAnt.EntityConventions.Contracts/EntityConventionsException.cs similarity index 91% rename from src/DragoAnt.EntityConventions.Contacts/EntityConventionsException.cs rename to src/DragoAnt.EntityConventions.Contracts/EntityConventionsException.cs index c36608e..ebaac8f 100644 --- a/src/DragoAnt.EntityConventions.Contacts/EntityConventionsException.cs +++ b/src/DragoAnt.EntityConventions.Contracts/EntityConventionsException.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; [Serializable] public class EntityConventionsException : Exception diff --git a/src/DragoAnt.EntityConventions.Contacts/ExceptionHelper.cs b/src/DragoAnt.EntityConventions.Contracts/ExceptionHelper.cs similarity index 88% rename from src/DragoAnt.EntityConventions.Contacts/ExceptionHelper.cs rename to src/DragoAnt.EntityConventions.Contracts/ExceptionHelper.cs index 3ce0604..8a905f9 100644 --- a/src/DragoAnt.EntityConventions.Contacts/ExceptionHelper.cs +++ b/src/DragoAnt.EntityConventions.Contracts/ExceptionHelper.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; public static class ExceptionHelper { diff --git a/src/DragoAnt.EntityConventions.Contacts/IConcurrentAuditedEntityConvention.cs b/src/DragoAnt.EntityConventions.Contracts/IConcurrentAuditedEntityConvention.cs similarity index 82% rename from src/DragoAnt.EntityConventions.Contacts/IConcurrentAuditedEntityConvention.cs rename to src/DragoAnt.EntityConventions.Contracts/IConcurrentAuditedEntityConvention.cs index 167aff3..243f05c 100644 --- a/src/DragoAnt.EntityConventions.Contacts/IConcurrentAuditedEntityConvention.cs +++ b/src/DragoAnt.EntityConventions.Contracts/IConcurrentAuditedEntityConvention.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; /// /// Entity with concurrent row version property diff --git a/src/DragoAnt.EntityConventions.Contacts/ICreateAuditedEntityConvention.cs b/src/DragoAnt.EntityConventions.Contracts/ICreateAuditedEntityConvention.cs similarity index 81% rename from src/DragoAnt.EntityConventions.Contacts/ICreateAuditedEntityConvention.cs rename to src/DragoAnt.EntityConventions.Contracts/ICreateAuditedEntityConvention.cs index 2337c24..0a72318 100644 --- a/src/DragoAnt.EntityConventions.Contacts/ICreateAuditedEntityConvention.cs +++ b/src/DragoAnt.EntityConventions.Contracts/ICreateAuditedEntityConvention.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; /// /// Entity with creation audited property Created diff --git a/src/DragoAnt.EntityConventions.Contacts/IEntityConventionContract.cs b/src/DragoAnt.EntityConventions.Contracts/IEntityConventionContract.cs similarity index 70% rename from src/DragoAnt.EntityConventions.Contacts/IEntityConventionContract.cs rename to src/DragoAnt.EntityConventions.Contracts/IEntityConventionContract.cs index bce9901..541af8a 100644 --- a/src/DragoAnt.EntityConventions.Contacts/IEntityConventionContract.cs +++ b/src/DragoAnt.EntityConventions.Contracts/IEntityConventionContract.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; /// /// Entity convention base interface diff --git a/src/DragoAnt.EntityConventions.Contacts/IWithDiscriminatorEntityConvention.cs b/src/DragoAnt.EntityConventions.Contracts/IWithDiscriminatorEntityConvention.cs similarity index 89% rename from src/DragoAnt.EntityConventions.Contacts/IWithDiscriminatorEntityConvention.cs rename to src/DragoAnt.EntityConventions.Contracts/IWithDiscriminatorEntityConvention.cs index d8722d7..64b5b54 100644 --- a/src/DragoAnt.EntityConventions.Contacts/IWithDiscriminatorEntityConvention.cs +++ b/src/DragoAnt.EntityConventions.Contracts/IWithDiscriminatorEntityConvention.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; /// /// Entity with discriminator for inheritance diff --git a/src/DragoAnt.EntityConventions.Contacts/IWithSourceSystemIdEntityConvention.cs b/src/DragoAnt.EntityConventions.Contracts/IWithSourceSystemIdEntityConvention.cs similarity index 87% rename from src/DragoAnt.EntityConventions.Contacts/IWithSourceSystemIdEntityConvention.cs rename to src/DragoAnt.EntityConventions.Contracts/IWithSourceSystemIdEntityConvention.cs index 41963ca..9e65b5c 100644 --- a/src/DragoAnt.EntityConventions.Contacts/IWithSourceSystemIdEntityConvention.cs +++ b/src/DragoAnt.EntityConventions.Contracts/IWithSourceSystemIdEntityConvention.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; /// /// Entity with source system id property diff --git a/src/DragoAnt.EntityConventions.Contacts/IWithSourceSystemIdEntityConventionGuid.cs b/src/DragoAnt.EntityConventions.Contracts/IWithSourceSystemIdEntityConventionGuid.cs similarity index 86% rename from src/DragoAnt.EntityConventions.Contacts/IWithSourceSystemIdEntityConventionGuid.cs rename to src/DragoAnt.EntityConventions.Contracts/IWithSourceSystemIdEntityConventionGuid.cs index 20fc283..cd9d1dc 100644 --- a/src/DragoAnt.EntityConventions.Contacts/IWithSourceSystemIdEntityConventionGuid.cs +++ b/src/DragoAnt.EntityConventions.Contracts/IWithSourceSystemIdEntityConventionGuid.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; /// /// Entity with creation audited property Created diff --git a/src/DragoAnt.EntityConventions.Contacts/Options/BasePropertyOptions.cs b/src/DragoAnt.EntityConventions.Contracts/Options/BasePropertyOptions.cs similarity index 91% rename from src/DragoAnt.EntityConventions.Contacts/Options/BasePropertyOptions.cs rename to src/DragoAnt.EntityConventions.Contracts/Options/BasePropertyOptions.cs index b52539a..df9d216 100644 --- a/src/DragoAnt.EntityConventions.Contacts/Options/BasePropertyOptions.cs +++ b/src/DragoAnt.EntityConventions.Contracts/Options/BasePropertyOptions.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; public abstract class BasePropertyOptions : Attribute { diff --git a/src/DragoAnt.EntityConventions.Contacts/Options/CreateAuditedOptions.cs b/src/DragoAnt.EntityConventions.Contracts/Options/CreateAuditedOptions.cs similarity index 92% rename from src/DragoAnt.EntityConventions.Contacts/Options/CreateAuditedOptions.cs rename to src/DragoAnt.EntityConventions.Contracts/Options/CreateAuditedOptions.cs index 90e0430..aa36d10 100644 --- a/src/DragoAnt.EntityConventions.Contacts/Options/CreateAuditedOptions.cs +++ b/src/DragoAnt.EntityConventions.Contracts/Options/CreateAuditedOptions.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; [AttributeUsage(AttributeTargets.Class)] public sealed class CreateAuditedOptions : BasePropertyOptions diff --git a/src/DragoAnt.EntityConventions.Contacts/Options/DiscriminatorOptions.cs b/src/DragoAnt.EntityConventions.Contracts/Options/DiscriminatorOptions.cs similarity index 69% rename from src/DragoAnt.EntityConventions.Contacts/Options/DiscriminatorOptions.cs rename to src/DragoAnt.EntityConventions.Contracts/Options/DiscriminatorOptions.cs index efc1b01..4c23ec2 100644 --- a/src/DragoAnt.EntityConventions.Contacts/Options/DiscriminatorOptions.cs +++ b/src/DragoAnt.EntityConventions.Contracts/Options/DiscriminatorOptions.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; [AttributeUsage(AttributeTargets.Class)] public sealed class DiscriminatorOptions : StringPropertyOptions diff --git a/src/DragoAnt.EntityConventions.Contacts/Options/SourceSystemIdOptions.cs b/src/DragoAnt.EntityConventions.Contracts/Options/SourceSystemIdOptions.cs similarity index 91% rename from src/DragoAnt.EntityConventions.Contacts/Options/SourceSystemIdOptions.cs rename to src/DragoAnt.EntityConventions.Contracts/Options/SourceSystemIdOptions.cs index aab4d19..095ff48 100644 --- a/src/DragoAnt.EntityConventions.Contacts/Options/SourceSystemIdOptions.cs +++ b/src/DragoAnt.EntityConventions.Contracts/Options/SourceSystemIdOptions.cs @@ -1,4 +1,4 @@ -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; [AttributeUsage(AttributeTargets.Class)] public sealed class SourceSystemIdOptions : StringPropertyOptions diff --git a/src/DragoAnt.EntityConventions.Contacts/Options/StringPropertyOptions.cs b/src/DragoAnt.EntityConventions.Contracts/Options/StringPropertyOptions.cs similarity index 92% rename from src/DragoAnt.EntityConventions.Contacts/Options/StringPropertyOptions.cs rename to src/DragoAnt.EntityConventions.Contracts/Options/StringPropertyOptions.cs index cab212d..629b900 100644 --- a/src/DragoAnt.EntityConventions.Contacts/Options/StringPropertyOptions.cs +++ b/src/DragoAnt.EntityConventions.Contracts/Options/StringPropertyOptions.cs @@ -1,6 +1,6 @@ using System.ComponentModel; -namespace DragoAnt.EntityConventions.Contacts; +namespace DragoAnt.EntityConventions.Contracts; public abstract class StringPropertyOptions : BasePropertyOptions { diff --git a/src/DragoAnt.EntityConventions.Contracts/package.readme.md b/src/DragoAnt.EntityConventions.Contracts/package.readme.md new file mode 100644 index 0000000..4000480 --- /dev/null +++ b/src/DragoAnt.EntityConventions.Contracts/package.readme.md @@ -0,0 +1,9 @@ +# DragoAnt.EntityConventions.Contracts + +Marker interfaces and options for entity conventions such as create/concurrency auditing, discriminators and source-system ids. + +```sh +dotnet add package DragoAnt.EntityConventions.Contracts +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityConventions.TriggerBased.Contacts/package.readme.md b/src/DragoAnt.EntityConventions.TriggerBased.Contacts/package.readme.md deleted file mode 100644 index 3af94ef..0000000 --- a/src/DragoAnt.EntityConventions.TriggerBased.Contacts/package.readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# DragoAnt.EntityConventions.TriggerBased.Contacts - - Entity conventions contracts for map enities with commom functionality diff --git a/src/DragoAnt.EntityConventions.TriggerBased.Contacts/DragoAnt.EntityConventions.TriggerBased.Contacts.csproj b/src/DragoAnt.EntityConventions.TriggerBased.Contracts/DragoAnt.EntityConventions.TriggerBased.Contracts.csproj similarity index 54% rename from src/DragoAnt.EntityConventions.TriggerBased.Contacts/DragoAnt.EntityConventions.TriggerBased.Contacts.csproj rename to src/DragoAnt.EntityConventions.TriggerBased.Contracts/DragoAnt.EntityConventions.TriggerBased.Contracts.csproj index 563d1db..809f8b8 100644 --- a/src/DragoAnt.EntityConventions.TriggerBased.Contacts/DragoAnt.EntityConventions.TriggerBased.Contacts.csproj +++ b/src/DragoAnt.EntityConventions.TriggerBased.Contracts/DragoAnt.EntityConventions.TriggerBased.Contracts.csproj @@ -1,12 +1,12 @@ - Entity conventions contracts for map enities with commom functionality + Marker interfaces for trigger-based entity conventions: soft delete and update auditing. enable - + diff --git a/src/DragoAnt.EntityConventions.TriggerBased.Contacts/DragoAnt.EntityConventions.TriggerBased.Contacts.csproj.DotSettings b/src/DragoAnt.EntityConventions.TriggerBased.Contracts/DragoAnt.EntityConventions.TriggerBased.Contracts.csproj.DotSettings similarity index 100% rename from src/DragoAnt.EntityConventions.TriggerBased.Contacts/DragoAnt.EntityConventions.TriggerBased.Contacts.csproj.DotSettings rename to src/DragoAnt.EntityConventions.TriggerBased.Contracts/DragoAnt.EntityConventions.TriggerBased.Contracts.csproj.DotSettings diff --git a/src/DragoAnt.EntityConventions.TriggerBased.Contacts/ISoftDeleteEntityConvention.cs b/src/DragoAnt.EntityConventions.TriggerBased.Contracts/ISoftDeleteEntityConvention.cs similarity index 73% rename from src/DragoAnt.EntityConventions.TriggerBased.Contacts/ISoftDeleteEntityConvention.cs rename to src/DragoAnt.EntityConventions.TriggerBased.Contracts/ISoftDeleteEntityConvention.cs index 1e5f66d..d2871c1 100644 --- a/src/DragoAnt.EntityConventions.TriggerBased.Contacts/ISoftDeleteEntityConvention.cs +++ b/src/DragoAnt.EntityConventions.TriggerBased.Contracts/ISoftDeleteEntityConvention.cs @@ -1,6 +1,6 @@ -using DragoAnt.EntityConventions.Contacts; +using DragoAnt.EntityConventions.Contracts; -namespace DragoAnt.EntityConventions.TriggerBased.Contacts; +namespace DragoAnt.EntityConventions.TriggerBased.Contracts; /// /// Entity with creation audited property Modified diff --git a/src/DragoAnt.EntityConventions.TriggerBased.Contacts/IUpdateAuditedEntityConvention.cs b/src/DragoAnt.EntityConventions.TriggerBased.Contracts/IUpdateAuditedEntityConvention.cs similarity index 68% rename from src/DragoAnt.EntityConventions.TriggerBased.Contacts/IUpdateAuditedEntityConvention.cs rename to src/DragoAnt.EntityConventions.TriggerBased.Contracts/IUpdateAuditedEntityConvention.cs index 55c4a25..9521c54 100644 --- a/src/DragoAnt.EntityConventions.TriggerBased.Contacts/IUpdateAuditedEntityConvention.cs +++ b/src/DragoAnt.EntityConventions.TriggerBased.Contracts/IUpdateAuditedEntityConvention.cs @@ -1,6 +1,6 @@ -using DragoAnt.EntityConventions.Contacts; +using DragoAnt.EntityConventions.Contracts; -namespace DragoAnt.EntityConventions.TriggerBased.Contacts; +namespace DragoAnt.EntityConventions.TriggerBased.Contracts; /// /// Entity with creation audited property Modified diff --git a/src/DragoAnt.EntityConventions.TriggerBased.Contracts/package.readme.md b/src/DragoAnt.EntityConventions.TriggerBased.Contracts/package.readme.md new file mode 100644 index 0000000..21ec60b --- /dev/null +++ b/src/DragoAnt.EntityConventions.TriggerBased.Contracts/package.readme.md @@ -0,0 +1,9 @@ +# DragoAnt.EntityConventions.TriggerBased.Contracts + +Marker interfaces for trigger-based entity conventions: soft delete and update auditing. + +```sh +dotnet add package DragoAnt.EntityConventions.TriggerBased.Contracts +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityDefinition.AspNetCore/DragoAnt.EntityDefinition.AspNetCore.csproj b/src/DragoAnt.EntityDefinition.AspNetCore/DragoAnt.EntityDefinition.AspNetCore.csproj index 10929f7..9952c04 100644 --- a/src/DragoAnt.EntityDefinition.AspNetCore/DragoAnt.EntityDefinition.AspNetCore.csproj +++ b/src/DragoAnt.EntityDefinition.AspNetCore/DragoAnt.EntityDefinition.AspNetCore.csproj @@ -1,7 +1,7 @@ - Definitions AspNet Core extensions + ASP.NET Core middleware that serves the entity definitions of an Entity Framework Core model as CSV. enable diff --git a/src/DragoAnt.EntityDefinition.AspNetCore/package.readme.md b/src/DragoAnt.EntityDefinition.AspNetCore/package.readme.md index 5207031..16b07b3 100644 --- a/src/DragoAnt.EntityDefinition.AspNetCore/package.readme.md +++ b/src/DragoAnt.EntityDefinition.AspNetCore/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityDefinition.AspNetCore - Definitions AspNet Core extensions +ASP.NET Core middleware that serves the entity definitions of an Entity Framework Core model as CSV. + +```sh +dotnet add package DragoAnt.EntityDefinition.AspNetCore +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityDefinition.Contracts/DragoAnt.EntityDefinition.Contracts.csproj b/src/DragoAnt.EntityDefinition.Contracts/DragoAnt.EntityDefinition.Contracts.csproj index 11f247b..145b2eb 100644 --- a/src/DragoAnt.EntityDefinition.Contracts/DragoAnt.EntityDefinition.Contracts.csproj +++ b/src/DragoAnt.EntityDefinition.Contracts/DragoAnt.EntityDefinition.Contracts.csproj @@ -1,7 +1,7 @@ - Definitions contracts + Attributes and builders for describing entities and their properties in an entity definition map. enable diff --git a/src/DragoAnt.EntityDefinition.Contracts/package.readme.md b/src/DragoAnt.EntityDefinition.Contracts/package.readme.md index c65f6d7..4a06deb 100644 --- a/src/DragoAnt.EntityDefinition.Contracts/package.readme.md +++ b/src/DragoAnt.EntityDefinition.Contracts/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityDefinition.Contracts - Definitions contracts +Attributes and builders for describing entities and their properties in an entity definition map. + +```sh +dotnet add package DragoAnt.EntityDefinition.Contracts +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart.csproj b/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart.csproj index 8775a12..874d0c5 100644 --- a/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart.csproj +++ b/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart.csproj @@ -1,7 +1,7 @@ - Definitions Marmaid Flowchart. Entity Framework implementation + Render the entity definitions of an Entity Framework Core model as a Mermaid flowchart. enable diff --git a/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart/package.readme.md b/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart/package.readme.md index c6c2204..36e645d 100644 --- a/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart/package.readme.md +++ b/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart - Definitions Marmaid Flowchart. Entity Framework implementation +Render the entity definitions of an Entity Framework Core model as a Mermaid flowchart. + +```sh +dotnet add package DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational.csproj b/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational.csproj index b20c187..8d26ae7 100644 --- a/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational.csproj +++ b/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational.csproj @@ -1,7 +1,7 @@ - Definitions Entity Framework Core Relational implementation + Relational definitions (tables, columns, keys) for entity definitions built from an Entity Framework Core model. enable diff --git a/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational/package.readme.md b/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational/package.readme.md index 97c17a6..d188055 100644 --- a/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational/package.readme.md +++ b/src/DragoAnt.EntityDefinition.EntityFrameworkCore.Relational/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityDefinition.EntityFrameworkCore.Relational - Definitions Entity Framework Core Relational implementation +Relational definitions (tables, columns, keys) for entity definitions built from an Entity Framework Core model. + +```sh +dotnet add package DragoAnt.EntityDefinition.EntityFrameworkCore.Relational +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityDefinition.EntityFrameworkCore/DragoAnt.EntityDefinition.EntityFrameworkCore.csproj b/src/DragoAnt.EntityDefinition.EntityFrameworkCore/DragoAnt.EntityDefinition.EntityFrameworkCore.csproj index 99f3406..ca2e36b 100644 --- a/src/DragoAnt.EntityDefinition.EntityFrameworkCore/DragoAnt.EntityDefinition.EntityFrameworkCore.csproj +++ b/src/DragoAnt.EntityDefinition.EntityFrameworkCore/DragoAnt.EntityDefinition.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@ - Definitions Entity Framework Core implementation + Build entity definitions from an Entity Framework Core model and its CLR types. enable diff --git a/src/DragoAnt.EntityDefinition.EntityFrameworkCore/package.readme.md b/src/DragoAnt.EntityDefinition.EntityFrameworkCore/package.readme.md index 7202ea7..9911321 100644 --- a/src/DragoAnt.EntityDefinition.EntityFrameworkCore/package.readme.md +++ b/src/DragoAnt.EntityDefinition.EntityFrameworkCore/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityDefinition.EntityFrameworkCore - Definitions Entity Framework Core implementation +Build entity definitions from an Entity Framework Core model and its CLR types. + +```sh +dotnet add package DragoAnt.EntityDefinition.EntityFrameworkCore +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityDefinition.Flowchart/DragoAnt.EntityDefinition.Flowchart.csproj b/src/DragoAnt.EntityDefinition.Flowchart/DragoAnt.EntityDefinition.Flowchart.csproj index 2e8d823..0cd08cb 100644 --- a/src/DragoAnt.EntityDefinition.Flowchart/DragoAnt.EntityDefinition.Flowchart.csproj +++ b/src/DragoAnt.EntityDefinition.Flowchart/DragoAnt.EntityDefinition.Flowchart.csproj @@ -1,7 +1,7 @@ - Definitions Marmaid Flowchart + Render entity definitions as a Mermaid flowchart diagram of entities, properties and relations. enable @@ -15,16 +15,4 @@ - - - - - - - - - - - - diff --git a/src/DragoAnt.EntityDefinition.Flowchart/Types/FlowchartEntityOptions.cs b/src/DragoAnt.EntityDefinition.Flowchart/Types/FlowchartEntityOptions.cs deleted file mode 100644 index 64d38bb..0000000 --- a/src/DragoAnt.EntityDefinition.Flowchart/Types/FlowchartEntityOptions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using Stenn.EntityDefinition.Contracts; -using Stenn.EntityDefinition.Contracts.Definitions; - -namespace Stenn.EntityDefinition.Flowchart.Types -{ - //TODO: Implement it for graph based on clr type system - - public sealed class FlowchartEntityOptions :FlowchartEntityOptionsBase, IFlowchartEntityOptions - { - /// - DefinitionInfo IFlowchartEntityOptions.Id => Id; - - /// - DefinitionInfo IFlowchartEntityOptions.Caption => Caption; - - /// - DefinitionInfo IFlowchartEntityOptions.Type => Type; - - /// - DefinitionInfo IFlowchartEntityOptions.BaseType => BaseType; - - /// - DefinitionInfo IFlowchartEntityOptions.IsAbstract => IsAbstract; - - public Definition Id { get; set; } = EFCommonDefinitions.Entities.Name; - public Definition Caption { get; set; } = EFCommonDefinitions.Entities.Name; - public Definition Type { get; set; } = EFCommonDefinitions.Entities.EntityType; - public Definition BaseType { get; set; } = EFCommonDefinitions.Entities.BaseEntityType; - public Definition IsAbstract { get; set; } = EFCommonDefinitions.Entities.IsAbstract; - } -} \ No newline at end of file diff --git a/src/DragoAnt.EntityDefinition.Flowchart/Types/FlowchartGraphBuilderOptions.cs b/src/DragoAnt.EntityDefinition.Flowchart/Types/FlowchartGraphBuilderOptions.cs deleted file mode 100644 index f910d8b..0000000 --- a/src/DragoAnt.EntityDefinition.Flowchart/Types/FlowchartGraphBuilderOptions.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Stenn.EntityDefinition.Flowchart.Types -{ - public sealed class FlowchartGraphBuilderOptions : FlowchartGraphBuilderBaseOptions - { - } -} \ No newline at end of file diff --git a/src/DragoAnt.EntityDefinition.Flowchart/Types/FlowchartPropertyOptions.cs b/src/DragoAnt.EntityDefinition.Flowchart/Types/FlowchartPropertyOptions.cs deleted file mode 100644 index 06cbd2f..0000000 --- a/src/DragoAnt.EntityDefinition.Flowchart/Types/FlowchartPropertyOptions.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using Stenn.EntityDefinition.Contracts; -using Stenn.EntityDefinition.Contracts.Definitions; - -namespace Stenn.EntityDefinition.Flowchart.Types -{ - //TODO: Implement it for graph based on clr type system - - public sealed class FlowchartPropertyOptions : FlowchartPropertyOptionsBase, IFlowchartPropertyOptions - { - /// - DefinitionInfo IFlowchartPropertyOptions.Id => Id; - - /// - DefinitionInfo IFlowchartPropertyOptions.ItemId => ItemId; - - /// - DefinitionInfo IFlowchartPropertyOptions.Caption => Caption; - - /// - DefinitionInfo IFlowchartPropertyOptions.IsNavigation => IsNavigation; - - /// - DefinitionInfo IFlowchartPropertyOptions.IsNavigationCollection => IsNavigationCollection; - - /// - DefinitionInfo IFlowchartPropertyOptions.IsOnDependent => IsOnDependent; - - /// - DefinitionInfo IFlowchartPropertyOptions.TargetType => TargetType; - - /// - DefinitionInfo IFlowchartPropertyOptions.TargetId => TargetId; - - /// - DefinitionInfo IFlowchartPropertyOptions.RelationCaption => RelationCaption; - - public Definition Id { get; set; } = CommonDefinitions.PropertyInfo; - public Definition ItemId { get; set; } = CommonDefinitions.Name; - public Definition Caption { get; set; } = CommonDefinitions.Name; - public Definition IsNavigation { get; set; } = CommonDefinitions.Navigation.IsNavigation; - public Definition IsNavigationCollection { get; set; } = CommonDefinitions.IsCollection; - public Definition IsOnDependent { get; set; } = CommonDefinitions.Navigation.IsOnDependent; - public Definition TargetType { get; set; } = CommonDefinitions.Navigation.TargetEntityType; - public Definition TargetId { get; set; } = CommonDefinitions.Properties.Navigation.TargetPropertyId; - public Definition RelationCaption { get; set; } = CommonDefinitions.Properties.Navigation.RelationCaption; - } -} \ No newline at end of file diff --git a/src/DragoAnt.EntityDefinition.Flowchart/package.readme.md b/src/DragoAnt.EntityDefinition.Flowchart/package.readme.md index fb09a76..4f7a05b 100644 --- a/src/DragoAnt.EntityDefinition.Flowchart/package.readme.md +++ b/src/DragoAnt.EntityDefinition.Flowchart/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityDefinition.Flowchart - Definitions Marmaid Flowchart +Render entity definitions as a Mermaid flowchart diagram of entities, properties and relations. + +```sh +dotnet add package DragoAnt.EntityDefinition.Flowchart +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityDefinition/DragoAnt.EntityDefinition.csproj b/src/DragoAnt.EntityDefinition/DragoAnt.EntityDefinition.csproj index df9b2cf..de8edfe 100644 --- a/src/DragoAnt.EntityDefinition/DragoAnt.EntityDefinition.csproj +++ b/src/DragoAnt.EntityDefinition/DragoAnt.EntityDefinition.csproj @@ -1,7 +1,7 @@ - Definitions implementation + Read entity definitions (descriptions, remarks, XML comments) from a model and write them out as tables such as CSV. enable diff --git a/src/DragoAnt.EntityDefinition/package.readme.md b/src/DragoAnt.EntityDefinition/package.readme.md index f6e082e..b2a7db6 100644 --- a/src/DragoAnt.EntityDefinition/package.readme.md +++ b/src/DragoAnt.EntityDefinition/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityDefinition - Definitions implementation +Read entity definitions (descriptions, remarks, XML comments) from a model and write them out as tables such as CSV. + +```sh +dotnet add package DragoAnt.EntityDefinition +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Animal.cs b/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Animal.cs index 802de70..f5e9574 100644 --- a/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Animal.cs +++ b/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Animal.cs @@ -1,5 +1,5 @@ -using DragoAnt.EntityConventions.Contacts; -using DragoAnt.EntityConventions.TriggerBased.Contacts; +using DragoAnt.EntityConventions.Contracts; +using DragoAnt.EntityConventions.TriggerBased.Contracts; namespace DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute; diff --git a/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Contact2.cs b/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Contact2.cs index 50f4ba7..f1eb5d7 100644 --- a/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Contact2.cs +++ b/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Contact2.cs @@ -1,4 +1,4 @@ -using DragoAnt.EntityConventions.Contacts; +using DragoAnt.EntityConventions.Contracts; namespace DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute; diff --git a/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Role.cs b/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Role.cs index c548d04..8fd0733 100644 --- a/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Role.cs +++ b/src/DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute/Role.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -using DragoAnt.EntityConventions.Contacts; -using DragoAnt.EntityConventions.TriggerBased.Contacts; +using DragoAnt.EntityConventions.Contracts; +using DragoAnt.EntityConventions.TriggerBased.Contracts; namespace DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute; diff --git a/src/DragoAnt.EntityFrameworkCore.Data.Main/Animal.cs b/src/DragoAnt.EntityFrameworkCore.Data.Main/Animal.cs index 31c2633..b40efca 100644 --- a/src/DragoAnt.EntityFrameworkCore.Data.Main/Animal.cs +++ b/src/DragoAnt.EntityFrameworkCore.Data.Main/Animal.cs @@ -1,5 +1,5 @@ -using DragoAnt.EntityConventions.Contacts; -using DragoAnt.EntityConventions.TriggerBased.Contacts; +using DragoAnt.EntityConventions.Contracts; +using DragoAnt.EntityConventions.TriggerBased.Contracts; namespace DragoAnt.EntityFrameworkCore.Data.Main; diff --git a/src/DragoAnt.EntityFrameworkCore.Data.Main/Contact2.cs b/src/DragoAnt.EntityFrameworkCore.Data.Main/Contact2.cs index c2551c7..26a4005 100644 --- a/src/DragoAnt.EntityFrameworkCore.Data.Main/Contact2.cs +++ b/src/DragoAnt.EntityFrameworkCore.Data.Main/Contact2.cs @@ -1,4 +1,4 @@ -using DragoAnt.EntityConventions.Contacts; +using DragoAnt.EntityConventions.Contracts; namespace DragoAnt.EntityFrameworkCore.Data.Main; diff --git a/src/DragoAnt.EntityFrameworkCore.Data.Main/Role.cs b/src/DragoAnt.EntityFrameworkCore.Data.Main/Role.cs index 619f60a..d674279 100644 --- a/src/DragoAnt.EntityFrameworkCore.Data.Main/Role.cs +++ b/src/DragoAnt.EntityFrameworkCore.Data.Main/Role.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -using DragoAnt.EntityConventions.Contacts; -using DragoAnt.EntityConventions.TriggerBased.Contacts; +using DragoAnt.EntityConventions.Contracts; +using DragoAnt.EntityConventions.TriggerBased.Contracts; namespace DragoAnt.EntityFrameworkCore.Data.Main; diff --git a/src/DragoAnt.EntityFrameworkCore.DependencyInjection/DragoAnt.EntityFrameworkCore.DependencyInjection.csproj b/src/DragoAnt.EntityFrameworkCore.DependencyInjection/DragoAnt.EntityFrameworkCore.DependencyInjection.csproj index fbf2527..53ead08 100644 --- a/src/DragoAnt.EntityFrameworkCore.DependencyInjection/DragoAnt.EntityFrameworkCore.DependencyInjection.csproj +++ b/src/DragoAnt.EntityFrameworkCore.DependencyInjection/DragoAnt.EntityFrameworkCore.DependencyInjection.csproj @@ -1,7 +1,7 @@ - Dependency injection extensions for DragoAnt.EntityFrameworkCore + Register static migrations, SQL resource files and enum lookup tables for an Entity Framework Core DbContext. enable diff --git a/src/DragoAnt.EntityFrameworkCore.DependencyInjection/package.readme.md b/src/DragoAnt.EntityFrameworkCore.DependencyInjection/package.readme.md index 78e537f..767ed29 100644 --- a/src/DragoAnt.EntityFrameworkCore.DependencyInjection/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.DependencyInjection/package.readme.md @@ -1,3 +1,9 @@ -# DragoAnt.EntityFrameworkCore.Extensions.DependencyInjection +# DragoAnt.EntityFrameworkCore.DependencyInjection - Dependency injection extensions for DragoAnt.EntityFrameworkCore +Register static migrations, SQL resource files and enum lookup tables for an Entity Framework Core DbContext. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.DependencyInjection +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection.csproj b/src/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection.csproj index 5cc591a..4023b14 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection.csproj +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection.csproj @@ -1,6 +1,7 @@ + Enable entity conventions on a DbContext with UseEntityConventions. enable diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection/package.readme.md b/src/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection/package.readme.md index 73dc703..328e1b4 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection/package.readme.md @@ -1,3 +1,9 @@ -# DragoAnt.EntityFrameworkCore.EntityConventions.Extensions.DependencyInjection +# DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection - DragoAnt.EntityFrameworkCore.EntityConventions.Extensions.DependencyInjection +Enable entity conventions on a DbContext with UseEntityConventions. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection.csproj b/src/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection.csproj index c4f7a5b..d100aca 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection.csproj +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection.csproj @@ -1,5 +1,9 @@ + + Enable entity conventions on a SQL Server DbContext with UseEntityConventionsSqlServer. + + diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection/package.readme.md b/src/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection/package.readme.md index df9d734..967e41d 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection/package.readme.md @@ -1,3 +1,9 @@ -# DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.Extensions.DependencyInjection +# DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection - DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.Extensions.DependencyInjection +Enable entity conventions on a SQL Server DbContext with UseEntityConventionsSqlServer. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer.csproj b/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer.csproj index 62b32bc..2a7d31c 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer.csproj +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer.csproj @@ -1,7 +1,7 @@ - Entity Framework Core SqlServer specific extensions + SQL Server triggers for the trigger-based entity conventions, applied through static migrations. enable diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer/package.readme.md b/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer/package.readme.md index 990f5e6..cc9e449 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer - Entity Framework Core SqlServer specific extensions +SQL Server triggers for the trigger-based entity conventions, applied through static migrations. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.csproj b/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.csproj index ec0bfeb..e755188 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.csproj +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.csproj @@ -1,7 +1,7 @@ - Entity Framework Core conventions + Trigger-based entity conventions (soft delete, update auditing) applied through static migrations. enable @@ -11,8 +11,8 @@ - - + + diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/ModelBuilderConventionsExtensions.cs b/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/ModelBuilderConventionsExtensions.cs index 06e289b..81e013c 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/ModelBuilderConventionsExtensions.cs +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/ModelBuilderConventionsExtensions.cs @@ -2,8 +2,8 @@ using System.Reflection; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using DragoAnt.EntityConventions.Contacts; -using DragoAnt.EntityConventions.TriggerBased.Contacts; +using DragoAnt.EntityConventions.Contracts; +using DragoAnt.EntityConventions.TriggerBased.Contracts; using DragoAnt.EntityFrameworkCore.Relational; namespace DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased; diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/package.readme.md b/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/package.readme.md index cccda11..7c677d5 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased - Entity Framework Core conventions +Trigger-based entity conventions (soft delete, update auditing) applied through static migrations. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions/DiscriminatorExtensions.cs b/src/DragoAnt.EntityFrameworkCore.EntityConventions/DiscriminatorExtensions.cs index 20d5e43..468e033 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions/DiscriminatorExtensions.cs +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions/DiscriminatorExtensions.cs @@ -1,5 +1,5 @@ using Microsoft.EntityFrameworkCore.Metadata.Builders; -using DragoAnt.EntityConventions.Contacts; +using DragoAnt.EntityConventions.Contracts; namespace DragoAnt.EntityFrameworkCore.EntityConventions; diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions/DragoAnt.EntityFrameworkCore.EntityConventions.csproj b/src/DragoAnt.EntityFrameworkCore.EntityConventions/DragoAnt.EntityFrameworkCore.EntityConventions.csproj index 36ea318..155c705 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions/DragoAnt.EntityFrameworkCore.EntityConventions.csproj +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions/DragoAnt.EntityFrameworkCore.EntityConventions.csproj @@ -1,7 +1,7 @@ - Entity Framework Core conventions + Apply entity conventions (auditing, discriminators, source-system ids) to an Entity Framework Core model by interface. enable @@ -11,7 +11,7 @@ - + diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions/EntityConventionsBuilder.cs b/src/DragoAnt.EntityFrameworkCore.EntityConventions/EntityConventionsBuilder.cs index 559df24..beaedb7 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions/EntityConventionsBuilder.cs +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions/EntityConventionsBuilder.cs @@ -2,7 +2,7 @@ using System.Reflection; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using DragoAnt.EntityConventions.Contacts; +using DragoAnt.EntityConventions.Contracts; namespace DragoAnt.EntityFrameworkCore.EntityConventions; diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions/EntityConventionsOptions.cs b/src/DragoAnt.EntityFrameworkCore.EntityConventions/EntityConventionsOptions.cs index c4f6f73..0844bb7 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions/EntityConventionsOptions.cs +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions/EntityConventionsOptions.cs @@ -1,4 +1,4 @@ -using DragoAnt.EntityConventions.Contacts; +using DragoAnt.EntityConventions.Contracts; namespace DragoAnt.EntityFrameworkCore.EntityConventions; diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions/IEntityConventionsBuilder.cs b/src/DragoAnt.EntityFrameworkCore.EntityConventions/IEntityConventionsBuilder.cs index dbdd120..38aae9a 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions/IEntityConventionsBuilder.cs +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions/IEntityConventionsBuilder.cs @@ -1,7 +1,7 @@ using System.Linq.Expressions; using System.Reflection; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using DragoAnt.EntityConventions.Contacts; +using DragoAnt.EntityConventions.Contracts; namespace DragoAnt.EntityFrameworkCore.EntityConventions; diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions/ModelBuilderConventionsExtensions.cs b/src/DragoAnt.EntityFrameworkCore.EntityConventions/ModelBuilderConventionsExtensions.cs index a21d334..258a2cf 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions/ModelBuilderConventionsExtensions.cs +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions/ModelBuilderConventionsExtensions.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Microsoft.EntityFrameworkCore.Metadata.Internal; -using DragoAnt.EntityConventions.Contacts; +using DragoAnt.EntityConventions.Contracts; namespace DragoAnt.EntityFrameworkCore.EntityConventions; diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions/SourceSystemIdValueGenerator.cs b/src/DragoAnt.EntityFrameworkCore.EntityConventions/SourceSystemIdValueGenerator.cs index 5415d78..abf6ebd 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions/SourceSystemIdValueGenerator.cs +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions/SourceSystemIdValueGenerator.cs @@ -1,6 +1,6 @@ using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.EntityFrameworkCore.ValueGeneration; -using DragoAnt.EntityConventions.Contacts; +using DragoAnt.EntityConventions.Contracts; namespace DragoAnt.EntityFrameworkCore.EntityConventions; diff --git a/src/DragoAnt.EntityFrameworkCore.EntityConventions/package.readme.md b/src/DragoAnt.EntityFrameworkCore.EntityConventions/package.readme.md index d76857c..2a8675c 100644 --- a/src/DragoAnt.EntityFrameworkCore.EntityConventions/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.EntityConventions/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityFrameworkCore.EntityConventions - Entity Framework Core conventions +Apply entity conventions (auditing, discriminators, source-system ids) to an Entity Framework Core model by interface. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.EntityConventions +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection.csproj b/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection.csproj index f78b3e6..bfc7e9a 100644 --- a/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection.csproj +++ b/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection.csproj @@ -1,7 +1,7 @@ - Dependency injection extensions for DragoAnt.AspNetCore.OData.Versioning + Enable historical migrations on a DbContext with UseHistoricalMigrations. enable diff --git a/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection/package.readme.md b/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection/package.readme.md index a44692c..be86785 100644 --- a/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection/package.readme.md @@ -1,3 +1,9 @@ -# DragoAnt.EntityFrameworkCore.HistoricalMigrations.Extensions.DependencyInjection +# DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection - Dependency injection extensions for DragoAnt.AspNetCore.OData.Versioning +Enable historical migrations on a DbContext with UseHistoricalMigrations. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations/DragoAnt.EntityFrameworkCore.HistoricalMigrations.csproj b/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations/DragoAnt.EntityFrameworkCore.HistoricalMigrations.csproj index 74df3dd..9341b2b 100644 --- a/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations/DragoAnt.EntityFrameworkCore.HistoricalMigrations.csproj +++ b/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations/DragoAnt.EntityFrameworkCore.HistoricalMigrations.csproj @@ -1,7 +1,7 @@ - Dependency injection extensions for DragoAnt.AspNetCore.OData.Versioning + Squash an Entity Framework Core migration history into an initial migration while keeping existing databases on track. enable EF1001;$(NoWarn) diff --git a/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations/package.readme.md b/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations/package.readme.md index 479cdb0..449c985 100644 --- a/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.HistoricalMigrations/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityFrameworkCore.HistoricalMigrations - Dependency injection extensions for DragoAnt.AspNetCore.OData.Versioning +Squash an Entity Framework Core migration history into an initial migration while keeping existing databases on track. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.HistoricalMigrations +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection.csproj b/src/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection.csproj index 1a9af37..5246184 100644 --- a/src/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection.csproj +++ b/src/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection.csproj @@ -1,7 +1,7 @@ - Dependency injection extensions for DragoAnt.AspNetCore.OData.Versioning + Use static migrations with the Entity Framework Core in-memory provider (UseStaticMigrationsInMemoryDatabase). enable diff --git a/src/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection/package.readme.md b/src/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection/package.readme.md index 86f0ae9..115a6c5 100644 --- a/src/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection/package.readme.md @@ -1,3 +1,9 @@ -# DragoAnt.EntityFrameworkCore.InMemory.Extensions.DependencyInjection +# DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection - Dependency injection extensions for DragoAnt.AspNetCore.OData.Versioning +Use static migrations with the Entity Framework Core in-memory provider (UseStaticMigrationsInMemoryDatabase). + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.InMemory.Tests/MigrationsTest.cs b/src/DragoAnt.EntityFrameworkCore.InMemory.Tests/MigrationsTest.cs index f43d92b..4677265 100644 --- a/src/DragoAnt.EntityFrameworkCore.InMemory.Tests/MigrationsTest.cs +++ b/src/DragoAnt.EntityFrameworkCore.InMemory.Tests/MigrationsTest.cs @@ -1,5 +1,5 @@ -using DragoAnt.EntityConventions.Contacts; -using DragoAnt.EntityConventions.TriggerBased.Contacts; +using DragoAnt.EntityConventions.Contracts; +using DragoAnt.EntityConventions.TriggerBased.Contracts; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using DragoAnt.EntityFrameworkCore.Data.Initial; diff --git a/src/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection.csproj b/src/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection.csproj index 579afd8..5a3fd73 100644 --- a/src/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection.csproj +++ b/src/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection.csproj @@ -2,7 +2,7 @@ DragoAnt.EntityFrameworkCore.DependencyInjection - Entity Framework Core PostgreSQL specific extensions for dependency injection + Use static migrations with the Npgsql PostgreSQL provider (UseStaticMigrationsNpgsql). enable @@ -16,4 +16,4 @@ - \ No newline at end of file + diff --git a/src/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection/package.readme.md b/src/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection/package.readme.md index 3d3d8c1..de2a8df 100644 --- a/src/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection/package.readme.md @@ -1,3 +1,9 @@ -# DragoAnt.EntityFrameworkCore.PostgreSQL.Extensions.DependencyInjection +# DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection - Entity Framework Core PostgreSQL specific extensions for dependency injection +Use static migrations with the Npgsql PostgreSQL provider (UseStaticMigrationsNpgsql). + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.PostgreSQL/CompatibilitySuppressions.xml b/src/DragoAnt.EntityFrameworkCore.PostgreSQL/CompatibilitySuppressions.xml new file mode 100644 index 0000000..f8fdf5c --- /dev/null +++ b/src/DragoAnt.EntityFrameworkCore.PostgreSQL/CompatibilitySuppressions.xml @@ -0,0 +1,10 @@ + + + + + CP0002 + M:DragoAnt.EntityFrameworkCore.PostgreSQL.NpgsqlMigratorWithStaticMigrations.#ctor(Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly,Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository,Microsoft.EntityFrameworkCore.Storage.IDatabaseCreator,Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator,Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder,Microsoft.EntityFrameworkCore.Migrations.IMigrationCommandExecutor,Microsoft.EntityFrameworkCore.Storage.IRelationalConnection,Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper,Microsoft.EntityFrameworkCore.Infrastructure.ICurrentDbContext,Microsoft.EntityFrameworkCore.Infrastructure.IModelRuntimeInitializer,Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger{Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations},Microsoft.EntityFrameworkCore.Diagnostics.IRelationalCommandDiagnosticsLogger,Microsoft.EntityFrameworkCore.Storage.IDatabaseProvider,DragoAnt.EntityFrameworkCore.StaticMigrations.IStaticMigrationsService) + lib/net8.0/DragoAnt.EntityFrameworkCore.PostgreSQL.dll + lib/net9.0/DragoAnt.EntityFrameworkCore.PostgreSQL.dll + + \ No newline at end of file diff --git a/src/DragoAnt.EntityFrameworkCore.PostgreSQL/DragoAnt.EntityFrameworkCore.PostgreSQL.csproj b/src/DragoAnt.EntityFrameworkCore.PostgreSQL/DragoAnt.EntityFrameworkCore.PostgreSQL.csproj index 37b0e0f..44155a2 100644 --- a/src/DragoAnt.EntityFrameworkCore.PostgreSQL/DragoAnt.EntityFrameworkCore.PostgreSQL.csproj +++ b/src/DragoAnt.EntityFrameworkCore.PostgreSQL/DragoAnt.EntityFrameworkCore.PostgreSQL.csproj @@ -1,7 +1,7 @@ - Entity Framework Core PostgreSQL specific extensions + PostgreSQL support for static migrations: migrator, history repository and enum tables for Npgsql. enable @@ -14,4 +14,4 @@ - \ No newline at end of file + diff --git a/src/DragoAnt.EntityFrameworkCore.PostgreSQL/package.readme.md b/src/DragoAnt.EntityFrameworkCore.PostgreSQL/package.readme.md index f1b1d91..ba90d35 100644 --- a/src/DragoAnt.EntityFrameworkCore.PostgreSQL/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.PostgreSQL/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityFrameworkCore.PostgreSQL - Entity Framework Core PostgreSQL specific extensions +PostgreSQL support for static migrations: migrator, history repository and enum tables for Npgsql. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.PostgreSQL +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.Relational/DragoAnt.EntityFrameworkCore.Relational.csproj b/src/DragoAnt.EntityFrameworkCore.Relational/DragoAnt.EntityFrameworkCore.Relational.csproj index 71c6837..a21fc27 100644 --- a/src/DragoAnt.EntityFrameworkCore.Relational/DragoAnt.EntityFrameworkCore.Relational.csproj +++ b/src/DragoAnt.EntityFrameworkCore.Relational/DragoAnt.EntityFrameworkCore.Relational.csproj @@ -1,7 +1,7 @@ - Entity Framework Core common extensions + Relational model extensions for Entity Framework Core: entity mapping types and table metadata helpers. enable diff --git a/src/DragoAnt.EntityFrameworkCore.Relational/package.readme.md b/src/DragoAnt.EntityFrameworkCore.Relational/package.readme.md index 282736c..13a67aa 100644 --- a/src/DragoAnt.EntityFrameworkCore.Relational/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.Relational/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityFrameworkCore.Relational - Entity Framework Core common extensions +Relational model extensions for Entity Framework Core: entity mapping types and table metadata helpers. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.Relational +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection.csproj b/src/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection.csproj index 8b190aa..548234c 100644 --- a/src/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection.csproj +++ b/src/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection.csproj @@ -2,7 +2,7 @@ DragoAnt.EntityFrameworkCore.DependencyInjection - Dependency injection extensions for DragoAnt.AspNetCore.OData.Versioning + Use static migrations with the SQL Server provider (UseStaticMigrationsSqlServer). enable diff --git a/src/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection/package.readme.md b/src/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection/package.readme.md index 62173c4..ffc178d 100644 --- a/src/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection/package.readme.md @@ -1,3 +1,9 @@ -# DragoAnt.EntityFrameworkCore.SqlServer.Extensions.DependencyInjection +# DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection - Dependency injection extensions for DragoAnt.AspNetCore.OData.Versioning +Use static migrations with the SQL Server provider (UseStaticMigrationsSqlServer). + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.SqlServer.Tests/HistoricalMigrationsRegistrationTests.cs b/src/DragoAnt.EntityFrameworkCore.SqlServer.Tests/HistoricalMigrationsRegistrationTests.cs index 80ed699..3ab9d7f 100644 --- a/src/DragoAnt.EntityFrameworkCore.SqlServer.Tests/HistoricalMigrationsRegistrationTests.cs +++ b/src/DragoAnt.EntityFrameworkCore.SqlServer.Tests/HistoricalMigrationsRegistrationTests.cs @@ -1,5 +1,5 @@ -using DragoAnt.EntityConventions.Contacts; -using DragoAnt.EntityConventions.TriggerBased.Contacts; +using DragoAnt.EntityConventions.Contracts; +using DragoAnt.EntityConventions.TriggerBased.Contracts; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using DragoAnt.EntityFrameworkCore.Data.Main; diff --git a/src/DragoAnt.EntityFrameworkCore.SqlServer.Tests/MigrationsTest.cs b/src/DragoAnt.EntityFrameworkCore.SqlServer.Tests/MigrationsTest.cs index fadd4ce..ec0b8c7 100644 --- a/src/DragoAnt.EntityFrameworkCore.SqlServer.Tests/MigrationsTest.cs +++ b/src/DragoAnt.EntityFrameworkCore.SqlServer.Tests/MigrationsTest.cs @@ -1,6 +1,6 @@ using System.Data.Common; -using DragoAnt.EntityConventions.Contacts; -using DragoAnt.EntityConventions.TriggerBased.Contacts; +using DragoAnt.EntityConventions.Contracts; +using DragoAnt.EntityConventions.TriggerBased.Contracts; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; using DragoAnt.EntityFrameworkCore.Data.Initial; diff --git a/src/DragoAnt.EntityFrameworkCore.SqlServer/DragoAnt.EntityFrameworkCore.SqlServer.csproj b/src/DragoAnt.EntityFrameworkCore.SqlServer/DragoAnt.EntityFrameworkCore.SqlServer.csproj index 0337428..eefc8fc 100644 --- a/src/DragoAnt.EntityFrameworkCore.SqlServer/DragoAnt.EntityFrameworkCore.SqlServer.csproj +++ b/src/DragoAnt.EntityFrameworkCore.SqlServer/DragoAnt.EntityFrameworkCore.SqlServer.csproj @@ -1,7 +1,7 @@ - Entity Framework Core SqlServer specific extensions + SQL Server support for static migrations: history repository and enum tables. enable diff --git a/src/DragoAnt.EntityFrameworkCore.SqlServer/package.readme.md b/src/DragoAnt.EntityFrameworkCore.SqlServer/package.readme.md index fbed47b..836a2f4 100644 --- a/src/DragoAnt.EntityFrameworkCore.SqlServer/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.SqlServer/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityFrameworkCore.SqlServer - Entity Framework Core SqlServer specific extensions +SQL Server support for static migrations: history repository and enum tables. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.SqlServer +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.StaticMigrations/CompatibilitySuppressions.xml b/src/DragoAnt.EntityFrameworkCore.StaticMigrations/CompatibilitySuppressions.xml new file mode 100644 index 0000000..562f212 --- /dev/null +++ b/src/DragoAnt.EntityFrameworkCore.StaticMigrations/CompatibilitySuppressions.xml @@ -0,0 +1,16 @@ + + + + + CP0002 + M:DragoAnt.EntityFrameworkCore.StaticMigrations.BaseMigratorWithStaticMigrations.#ctor(Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly,Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository,Microsoft.EntityFrameworkCore.Storage.IDatabaseCreator,Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator,Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder,Microsoft.EntityFrameworkCore.Migrations.IMigrationCommandExecutor,Microsoft.EntityFrameworkCore.Storage.IRelationalConnection,Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper,Microsoft.EntityFrameworkCore.Infrastructure.ICurrentDbContext,Microsoft.EntityFrameworkCore.Infrastructure.IModelRuntimeInitializer,Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger{Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations},Microsoft.EntityFrameworkCore.Diagnostics.IRelationalCommandDiagnosticsLogger,Microsoft.EntityFrameworkCore.Storage.IDatabaseProvider,DragoAnt.EntityFrameworkCore.StaticMigrations.IStaticMigrationsService) + lib/net8.0/DragoAnt.EntityFrameworkCore.StaticMigrations.dll + lib/net9.0/DragoAnt.EntityFrameworkCore.StaticMigrations.dll + + + CP0002 + M:DragoAnt.EntityFrameworkCore.StaticMigrations.MigratorWithStaticMigrations.#ctor(Microsoft.EntityFrameworkCore.Migrations.IMigrationsAssembly,Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository,Microsoft.EntityFrameworkCore.Storage.IDatabaseCreator,Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator,Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder,Microsoft.EntityFrameworkCore.Migrations.IMigrationCommandExecutor,Microsoft.EntityFrameworkCore.Storage.IRelationalConnection,Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper,Microsoft.EntityFrameworkCore.Infrastructure.ICurrentDbContext,Microsoft.EntityFrameworkCore.Infrastructure.IModelRuntimeInitializer,Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger{Microsoft.EntityFrameworkCore.DbLoggerCategory.Migrations},Microsoft.EntityFrameworkCore.Diagnostics.IRelationalCommandDiagnosticsLogger,Microsoft.EntityFrameworkCore.Storage.IDatabaseProvider,DragoAnt.EntityFrameworkCore.StaticMigrations.IStaticMigrationsService) + lib/net8.0/DragoAnt.EntityFrameworkCore.StaticMigrations.dll + lib/net9.0/DragoAnt.EntityFrameworkCore.StaticMigrations.dll + + \ No newline at end of file diff --git a/src/DragoAnt.EntityFrameworkCore.StaticMigrations/DragoAnt.EntityFrameworkCore.StaticMigrations.csproj b/src/DragoAnt.EntityFrameworkCore.StaticMigrations/DragoAnt.EntityFrameworkCore.StaticMigrations.csproj index 6adfbc1..87763d0 100644 --- a/src/DragoAnt.EntityFrameworkCore.StaticMigrations/DragoAnt.EntityFrameworkCore.StaticMigrations.csproj +++ b/src/DragoAnt.EntityFrameworkCore.StaticMigrations/DragoAnt.EntityFrameworkCore.StaticMigrations.csproj @@ -1,7 +1,7 @@ - Entity Framework Core static migrations + Static migrations for Entity Framework Core: SQL scripts and enum tables re-applied on every migrate, beside the regular migrations. enable diff --git a/src/DragoAnt.EntityFrameworkCore.StaticMigrations/package.readme.md b/src/DragoAnt.EntityFrameworkCore.StaticMigrations/package.readme.md index f4c52c3..7589a62 100644 --- a/src/DragoAnt.EntityFrameworkCore.StaticMigrations/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.StaticMigrations/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityFrameworkCore.StaticMigrations - Entity Framework Core static migrations +Static migrations for Entity Framework Core: SQL scripts and enum tables re-applied on every migrate, beside the regular migrations. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.StaticMigrations +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.Testing/DragoAnt.EntityFrameworkCore.Testing.csproj b/src/DragoAnt.EntityFrameworkCore.Testing/DragoAnt.EntityFrameworkCore.Testing.csproj index 92a8823..01ffcfe 100644 --- a/src/DragoAnt.EntityFrameworkCore.Testing/DragoAnt.EntityFrameworkCore.Testing.csproj +++ b/src/DragoAnt.EntityFrameworkCore.Testing/DragoAnt.EntityFrameworkCore.Testing.csproj @@ -1,7 +1,7 @@ - Entity Framework Core extensions for testing purposes + Test helpers for Entity Framework Core, such as checking a DbContext's entity mapping. enable diff --git a/src/DragoAnt.EntityFrameworkCore.Testing/package.readme.md b/src/DragoAnt.EntityFrameworkCore.Testing/package.readme.md index 221163e..0f1eb8b 100644 --- a/src/DragoAnt.EntityFrameworkCore.Testing/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore.Testing/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityFrameworkCore.Testing - Entity Framework Core extensions for testing purposes +Test helpers for Entity Framework Core, such as checking a DbContext's entity mapping. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore.Testing +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.EntityFrameworkCore.sln b/src/DragoAnt.EntityFrameworkCore.sln deleted file mode 100644 index de13b30..0000000 --- a/src/DragoAnt.EntityFrameworkCore.sln +++ /dev/null @@ -1,324 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.3.32825.248 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".msbuild", ".msbuild", "{BA3CF70D-79A2-4BD5-AE60-C4485E591D87}" - ProjectSection(SolutionItems) = preProject - .msbuild\package.icon.png = .msbuild\package.icon.png - .msbuild\init.company.specific.props = .msbuild\init.company.specific.props - .msbuild\init.company.specific.targets = .msbuild\init.company.specific.targets - .msbuild\README.md = .msbuild\README.md - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.StaticMigrations", "DragoAnt.EntityFrameworkCore.StaticMigrations\DragoAnt.EntityFrameworkCore.StaticMigrations.csproj", "{3762C10B-20AE-432E-AE0A-6261886D4A54}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.SqlServer", "DragoAnt.EntityFrameworkCore.SqlServer\DragoAnt.EntityFrameworkCore.SqlServer.csproj", "{3416A707-49CC-45BA-A488-9C6A823BAA18}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".workflows", ".workflows", "{1EEB475D-C4E1-4DD8-BE10-44D2185F355B}" - ProjectSection(SolutionItems) = preProject - ..\.github\workflows\build_and_publish_nuget.yml = ..\.github\workflows\build_and_publish_nuget.yml - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".tests", ".tests", "{4D0A2092-01C6-4396-A117-31263DD64D57}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.SqlServer.Tests", "DragoAnt.EntityFrameworkCore.SqlServer.Tests\DragoAnt.EntityFrameworkCore.SqlServer.Tests.csproj", "{DE6BA20E-12D9-4D41-A8BB-10A19E32327A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.Data.Initial", "DragoAnt.EntityFrameworkCore.Data.Initial\DragoAnt.EntityFrameworkCore.Data.Initial.csproj", "{4760014A-CF66-4FDA-87D5-4A9CEAF7108B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.Data.Main", "DragoAnt.EntityFrameworkCore.Data.Main\DragoAnt.EntityFrameworkCore.Data.Main.csproj", "{9AC4BAED-EE42-4E9A-94C8-71B5A43EA764}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.DependencyInjection", "DragoAnt.EntityFrameworkCore.DependencyInjection\DragoAnt.EntityFrameworkCore.DependencyInjection.csproj", "{602B6A0A-AE67-49CF-A9FD-2A1934E8BC36}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection", "DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection\DragoAnt.EntityFrameworkCore.SqlServer.DependencyInjection.csproj", "{5BB6F7AA-78F8-4C96-BCBC-E7130B13C505}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.StaticMigrations", "DragoAnt.StaticMigrations\DragoAnt.StaticMigrations.csproj", "{863A163D-F238-4EA3-83A0-64DA8F01E05C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection", "DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection\DragoAnt.EntityFrameworkCore.InMemory.DependencyInjection.csproj", "{47F66573-8405-44C1-A58C-93D9CF3D72F2}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.InMemory.Tests", "DragoAnt.EntityFrameworkCore.InMemory.Tests\DragoAnt.EntityFrameworkCore.InMemory.Tests.csproj", "{A78EA959-6F65-498F-A5B7-5CB07747C0EA}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore", "DragoAnt.EntityFrameworkCore\DragoAnt.EntityFrameworkCore.csproj", "{1C854E64-04E1-47EA-AE70-B184E0E57401}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.Tests", "DragoAnt.EntityFrameworkCore.Tests\DragoAnt.EntityFrameworkCore.Tests.csproj", "{B7D95CE3-8FDE-490B-932B-E127F4EC6ADE}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityConventions.Contacts", "DragoAnt.EntityConventions.Contacts\DragoAnt.EntityConventions.Contacts.csproj", "{8FC76529-1E69-46B1-993F-AA3BF252AB7E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.EntityConventions", "DragoAnt.EntityFrameworkCore.EntityConventions\DragoAnt.EntityFrameworkCore.EntityConventions.csproj", "{9D173795-BE10-4366-BD34-83BA59B3F486}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Conventions", "Conventions", "{883F8EE3-E05C-4066-BD02-7F23BE62080D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.Data.Main.Migrations.Step1", "DragoAnt.EntityFrameworkCore.Data.Main.Migrations.Step1\DragoAnt.EntityFrameworkCore.Data.Main.Migrations.Step1.csproj", "{F19D4945-4921-40EF-90C5-19AB688EB617}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.Data.Main.Migrations.Step2", "DragoAnt.EntityFrameworkCore.Data.Main.MigrationsV2\DragoAnt.EntityFrameworkCore.Data.Main.Migrations.Step2.csproj", "{400665A8-CA03-4E79-B154-75CF44DDDAE3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.HistoricalMigrations", "DragoAnt.EntityFrameworkCore.HistoricalMigrations\DragoAnt.EntityFrameworkCore.HistoricalMigrations.csproj", "{EBB1B628-BA84-4AA9-94B8-90CE824A3694}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection", "DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection\DragoAnt.EntityFrameworkCore.HistoricalMigrations.DependencyInjection.csproj", "{4CD745FF-C7ED-467E-A273-3815D4A40FAB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityConventions.TriggerBased.Contacts", "DragoAnt.EntityConventions.TriggerBased.Contacts\DragoAnt.EntityConventions.TriggerBased.Contacts.csproj", "{8C96DFD8-9286-4DB8-AD8F-9AF4AF5C846F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased", "DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased\DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.csproj", "{9834F941-47B0-44CC-9DAE-839BD6F71F65}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.Data.Main.HistoricalInitial", "DragoAnt.EntityFrameworkCore.Data.Main.HistoricalInitial\DragoAnt.EntityFrameworkCore.Data.Main.HistoricalInitial.csproj", "{94A58282-915A-4174-9D30-9A46A28E6D5B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection", "DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection\DragoAnt.EntityFrameworkCore.EntityConventions.DependencyInjection.csproj", "{8B80B54A-6EB7-46A6-8C3C-1E607B094E3D}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection", "DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection\DragoAnt.EntityFrameworkCore.EntityConventions.SqlServer.DependencyInjection.csproj", "{43720D28-FD68-4953-A360-5D02CF9C67A2}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer", "DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer\DragoAnt.EntityFrameworkCore.EntityConventions.TriggerBased.SqlServer.csproj", "{B5A6B581-554B-4584-AD6D-C0E514E13E0E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.Data.Main.EF6Initial", "DragoAnt.EntityFrameworkCore.Data.Main.EF6Initial\DragoAnt.EntityFrameworkCore.Data.Main.EF6Initial.csproj", "{EC1B995A-8CC5-4526-A131-C23D64DE5099}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.Relational", "DragoAnt.EntityFrameworkCore.Relational\DragoAnt.EntityFrameworkCore.Relational.csproj", "{EC2E874A-E30E-49ED-90D8-BA4FEE398FCC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityFrameworkCore.Testing", "DragoAnt.EntityFrameworkCore.Testing\DragoAnt.EntityFrameworkCore.Testing.csproj", "{C597F4B2-FC7A-45DB-BE85-D086C35A1A0D}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EntityDefinitions", "EntityDefinitions", "{98BA18D4-FF7C-4775-A133-29C6513CDDD8}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityDefinition.Contracts", "DragoAnt.EntityDefinition.Contracts\DragoAnt.EntityDefinition.Contracts.csproj", "{68B0AC04-0A8A-4831-ADE9-52E84A59AC5E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityDefinition", "DragoAnt.EntityDefinition\DragoAnt.EntityDefinition.csproj", "{3197257D-5609-4CA8-BAE3-E43E744D78A9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityDefinition.EntityFrameworkCore", "DragoAnt.EntityDefinition.EntityFrameworkCore\DragoAnt.EntityDefinition.EntityFrameworkCore.csproj", "{D6BEDCD3-3910-43EC-BEF2-58A7C83619BC}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityDefinition.EntityFrameworkCore.Relational", "DragoAnt.EntityDefinition.EntityFrameworkCore.Relational\DragoAnt.EntityDefinition.EntityFrameworkCore.Relational.csproj", "{235A1ADC-0B3C-4FEB-9254-E0780C76A569}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityDefinition.Model", "DragoAnt.EntityDefinition.Model\DragoAnt.EntityDefinition.Model.csproj", "{5D3AB714-5232-433A-8C4C-20D59A9C623C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityDefinition.InMemory.Tests", "DragoAnt.EntityDefinition.InMemory.Tests\DragoAnt.EntityDefinition.InMemory.Tests.csproj", "{2B9CD3CD-EA5F-4A38-AC08-07A27D2F7C37}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityDefinition.SqlServer.Tests", "DragoAnt.EntityDefinition.SqlServer.Tests\DragoAnt.EntityDefinition.SqlServer.Tests.csproj", "{25AE795A-BC2E-44D7-9247-732E160CDE1E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityDefinition.AspNetCore", "DragoAnt.EntityDefinition.AspNetCore\DragoAnt.EntityDefinition.AspNetCore.csproj", "{358EFCFB-25C9-44C0-B859-A59E37871C0E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityDefinition.Flowchart", "DragoAnt.EntityDefinition.Flowchart\DragoAnt.EntityDefinition.Flowchart.csproj", "{65573D12-2507-4467-A5DC-9DB3B85E2D91}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart", "DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart\DragoAnt.EntityDefinition.EntityFrameworkCore.Flowchart.csproj", "{9675133B-FC61-4C1A-B3D6-9C2E5BBCF211}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute", "DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute\DragoAnt.EntityFrameworkCore.Data.Main.HistoricalWithoutAttribute.csproj", "{BB84DD77-FA18-45F6-A9B4-27F59C693BF7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DragoAnt.EntityFrameworkCore.Data.Main.Migrations.Step1PlusStep2", "DragoAnt.EntityFrameworkCore.Data.Main.Migrations.Step1PlusStep2\DragoAnt.EntityFrameworkCore.Data.Main.Migrations.Step1PlusStep2.csproj", "{4C8823C1-CBB9-4EFF-A0A4-D7C51B63CD7A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".slnItems", ".slnItems", "{D4A8F72D-7EE1-4B05-AF52-8840374C8C9C}" - ProjectSection(SolutionItems) = preProject - Directory.Build.props = Directory.Build.props - Directory.Build.targets = Directory.Build.targets - Directory.PackageAsProj.targets = Directory.PackageAsProj.targets - Directory.Packages.props = Directory.Packages.props - global.json = global.json - nuget.config = nuget.config - PackageAsProj.targets = PackageAsProj.targets - Directory.Packages.Metadata.targets = Directory.Packages.Metadata.targets - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DragoAnt.EntityFrameworkCore.PostgreSQL", "DragoAnt.EntityFrameworkCore.PostgreSQL\DragoAnt.EntityFrameworkCore.PostgreSQL.csproj", "{006FAC19-B07D-4562-9A2A-9FF7ACCC688E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection", "DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection\DragoAnt.EntityFrameworkCore.PostgreSQL.DependencyInjection.csproj", "{B5B7C862-D7C3-4E0D-93BD-8D6DD602B7EF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{328F904C-E00A-4AAE-8B8E-C1BE80167E9A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3762C10B-20AE-432E-AE0A-6261886D4A54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3762C10B-20AE-432E-AE0A-6261886D4A54}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3762C10B-20AE-432E-AE0A-6261886D4A54}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3762C10B-20AE-432E-AE0A-6261886D4A54}.Release|Any CPU.Build.0 = Release|Any CPU - {3416A707-49CC-45BA-A488-9C6A823BAA18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3416A707-49CC-45BA-A488-9C6A823BAA18}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3416A707-49CC-45BA-A488-9C6A823BAA18}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3416A707-49CC-45BA-A488-9C6A823BAA18}.Release|Any CPU.Build.0 = Release|Any CPU - {DE6BA20E-12D9-4D41-A8BB-10A19E32327A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DE6BA20E-12D9-4D41-A8BB-10A19E32327A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DE6BA20E-12D9-4D41-A8BB-10A19E32327A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4760014A-CF66-4FDA-87D5-4A9CEAF7108B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4760014A-CF66-4FDA-87D5-4A9CEAF7108B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4760014A-CF66-4FDA-87D5-4A9CEAF7108B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4760014A-CF66-4FDA-87D5-4A9CEAF7108B}.Release|Any CPU.Build.0 = Release|Any CPU - {9AC4BAED-EE42-4E9A-94C8-71B5A43EA764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9AC4BAED-EE42-4E9A-94C8-71B5A43EA764}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9AC4BAED-EE42-4E9A-94C8-71B5A43EA764}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9AC4BAED-EE42-4E9A-94C8-71B5A43EA764}.Release|Any CPU.Build.0 = Release|Any CPU - {602B6A0A-AE67-49CF-A9FD-2A1934E8BC36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {602B6A0A-AE67-49CF-A9FD-2A1934E8BC36}.Debug|Any CPU.Build.0 = Debug|Any CPU - {602B6A0A-AE67-49CF-A9FD-2A1934E8BC36}.Release|Any CPU.ActiveCfg = Release|Any CPU - {602B6A0A-AE67-49CF-A9FD-2A1934E8BC36}.Release|Any CPU.Build.0 = Release|Any CPU - {5BB6F7AA-78F8-4C96-BCBC-E7130B13C505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5BB6F7AA-78F8-4C96-BCBC-E7130B13C505}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5BB6F7AA-78F8-4C96-BCBC-E7130B13C505}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5BB6F7AA-78F8-4C96-BCBC-E7130B13C505}.Release|Any CPU.Build.0 = Release|Any CPU - {863A163D-F238-4EA3-83A0-64DA8F01E05C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {863A163D-F238-4EA3-83A0-64DA8F01E05C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {863A163D-F238-4EA3-83A0-64DA8F01E05C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {863A163D-F238-4EA3-83A0-64DA8F01E05C}.Release|Any CPU.Build.0 = Release|Any CPU - {47F66573-8405-44C1-A58C-93D9CF3D72F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {47F66573-8405-44C1-A58C-93D9CF3D72F2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {47F66573-8405-44C1-A58C-93D9CF3D72F2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {47F66573-8405-44C1-A58C-93D9CF3D72F2}.Release|Any CPU.Build.0 = Release|Any CPU - {A78EA959-6F65-498F-A5B7-5CB07747C0EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A78EA959-6F65-498F-A5B7-5CB07747C0EA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A78EA959-6F65-498F-A5B7-5CB07747C0EA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1C854E64-04E1-47EA-AE70-B184E0E57401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1C854E64-04E1-47EA-AE70-B184E0E57401}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1C854E64-04E1-47EA-AE70-B184E0E57401}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1C854E64-04E1-47EA-AE70-B184E0E57401}.Release|Any CPU.Build.0 = Release|Any CPU - {B7D95CE3-8FDE-490B-932B-E127F4EC6ADE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B7D95CE3-8FDE-490B-932B-E127F4EC6ADE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B7D95CE3-8FDE-490B-932B-E127F4EC6ADE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8FC76529-1E69-46B1-993F-AA3BF252AB7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8FC76529-1E69-46B1-993F-AA3BF252AB7E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8FC76529-1E69-46B1-993F-AA3BF252AB7E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8FC76529-1E69-46B1-993F-AA3BF252AB7E}.Release|Any CPU.Build.0 = Release|Any CPU - {9D173795-BE10-4366-BD34-83BA59B3F486}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D173795-BE10-4366-BD34-83BA59B3F486}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D173795-BE10-4366-BD34-83BA59B3F486}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D173795-BE10-4366-BD34-83BA59B3F486}.Release|Any CPU.Build.0 = Release|Any CPU - {F19D4945-4921-40EF-90C5-19AB688EB617}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F19D4945-4921-40EF-90C5-19AB688EB617}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F19D4945-4921-40EF-90C5-19AB688EB617}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F19D4945-4921-40EF-90C5-19AB688EB617}.Release|Any CPU.Build.0 = Release|Any CPU - {400665A8-CA03-4E79-B154-75CF44DDDAE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {400665A8-CA03-4E79-B154-75CF44DDDAE3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {400665A8-CA03-4E79-B154-75CF44DDDAE3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {400665A8-CA03-4E79-B154-75CF44DDDAE3}.Release|Any CPU.Build.0 = Release|Any CPU - {EBB1B628-BA84-4AA9-94B8-90CE824A3694}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EBB1B628-BA84-4AA9-94B8-90CE824A3694}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EBB1B628-BA84-4AA9-94B8-90CE824A3694}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EBB1B628-BA84-4AA9-94B8-90CE824A3694}.Release|Any CPU.Build.0 = Release|Any CPU - {4CD745FF-C7ED-467E-A273-3815D4A40FAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4CD745FF-C7ED-467E-A273-3815D4A40FAB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4CD745FF-C7ED-467E-A273-3815D4A40FAB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4CD745FF-C7ED-467E-A273-3815D4A40FAB}.Release|Any CPU.Build.0 = Release|Any CPU - {8C96DFD8-9286-4DB8-AD8F-9AF4AF5C846F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8C96DFD8-9286-4DB8-AD8F-9AF4AF5C846F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8C96DFD8-9286-4DB8-AD8F-9AF4AF5C846F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8C96DFD8-9286-4DB8-AD8F-9AF4AF5C846F}.Release|Any CPU.Build.0 = Release|Any CPU - {9834F941-47B0-44CC-9DAE-839BD6F71F65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9834F941-47B0-44CC-9DAE-839BD6F71F65}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9834F941-47B0-44CC-9DAE-839BD6F71F65}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9834F941-47B0-44CC-9DAE-839BD6F71F65}.Release|Any CPU.Build.0 = Release|Any CPU - {94A58282-915A-4174-9D30-9A46A28E6D5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {94A58282-915A-4174-9D30-9A46A28E6D5B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {94A58282-915A-4174-9D30-9A46A28E6D5B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {94A58282-915A-4174-9D30-9A46A28E6D5B}.Release|Any CPU.Build.0 = Release|Any CPU - {8B80B54A-6EB7-46A6-8C3C-1E607B094E3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B80B54A-6EB7-46A6-8C3C-1E607B094E3D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B80B54A-6EB7-46A6-8C3C-1E607B094E3D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B80B54A-6EB7-46A6-8C3C-1E607B094E3D}.Release|Any CPU.Build.0 = Release|Any CPU - {43720D28-FD68-4953-A360-5D02CF9C67A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {43720D28-FD68-4953-A360-5D02CF9C67A2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {43720D28-FD68-4953-A360-5D02CF9C67A2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {43720D28-FD68-4953-A360-5D02CF9C67A2}.Release|Any CPU.Build.0 = Release|Any CPU - {B5A6B581-554B-4584-AD6D-C0E514E13E0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B5A6B581-554B-4584-AD6D-C0E514E13E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B5A6B581-554B-4584-AD6D-C0E514E13E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B5A6B581-554B-4584-AD6D-C0E514E13E0E}.Release|Any CPU.Build.0 = Release|Any CPU - {EC1B995A-8CC5-4526-A131-C23D64DE5099}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC1B995A-8CC5-4526-A131-C23D64DE5099}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC1B995A-8CC5-4526-A131-C23D64DE5099}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC1B995A-8CC5-4526-A131-C23D64DE5099}.Release|Any CPU.Build.0 = Release|Any CPU - {EC2E874A-E30E-49ED-90D8-BA4FEE398FCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC2E874A-E30E-49ED-90D8-BA4FEE398FCC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC2E874A-E30E-49ED-90D8-BA4FEE398FCC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC2E874A-E30E-49ED-90D8-BA4FEE398FCC}.Release|Any CPU.Build.0 = Release|Any CPU - {C597F4B2-FC7A-45DB-BE85-D086C35A1A0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C597F4B2-FC7A-45DB-BE85-D086C35A1A0D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C597F4B2-FC7A-45DB-BE85-D086C35A1A0D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C597F4B2-FC7A-45DB-BE85-D086C35A1A0D}.Release|Any CPU.Build.0 = Release|Any CPU - {68B0AC04-0A8A-4831-ADE9-52E84A59AC5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {68B0AC04-0A8A-4831-ADE9-52E84A59AC5E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {68B0AC04-0A8A-4831-ADE9-52E84A59AC5E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {68B0AC04-0A8A-4831-ADE9-52E84A59AC5E}.Release|Any CPU.Build.0 = Release|Any CPU - {3197257D-5609-4CA8-BAE3-E43E744D78A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3197257D-5609-4CA8-BAE3-E43E744D78A9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3197257D-5609-4CA8-BAE3-E43E744D78A9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3197257D-5609-4CA8-BAE3-E43E744D78A9}.Release|Any CPU.Build.0 = Release|Any CPU - {D6BEDCD3-3910-43EC-BEF2-58A7C83619BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D6BEDCD3-3910-43EC-BEF2-58A7C83619BC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D6BEDCD3-3910-43EC-BEF2-58A7C83619BC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D6BEDCD3-3910-43EC-BEF2-58A7C83619BC}.Release|Any CPU.Build.0 = Release|Any CPU - {235A1ADC-0B3C-4FEB-9254-E0780C76A569}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {235A1ADC-0B3C-4FEB-9254-E0780C76A569}.Debug|Any CPU.Build.0 = Debug|Any CPU - {235A1ADC-0B3C-4FEB-9254-E0780C76A569}.Release|Any CPU.ActiveCfg = Release|Any CPU - {235A1ADC-0B3C-4FEB-9254-E0780C76A569}.Release|Any CPU.Build.0 = Release|Any CPU - {5D3AB714-5232-433A-8C4C-20D59A9C623C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5D3AB714-5232-433A-8C4C-20D59A9C623C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5D3AB714-5232-433A-8C4C-20D59A9C623C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5D3AB714-5232-433A-8C4C-20D59A9C623C}.Release|Any CPU.Build.0 = Release|Any CPU - {2B9CD3CD-EA5F-4A38-AC08-07A27D2F7C37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B9CD3CD-EA5F-4A38-AC08-07A27D2F7C37}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B9CD3CD-EA5F-4A38-AC08-07A27D2F7C37}.Release|Any CPU.ActiveCfg = Release|Any CPU - {25AE795A-BC2E-44D7-9247-732E160CDE1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {25AE795A-BC2E-44D7-9247-732E160CDE1E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {25AE795A-BC2E-44D7-9247-732E160CDE1E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {358EFCFB-25C9-44C0-B859-A59E37871C0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {358EFCFB-25C9-44C0-B859-A59E37871C0E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {358EFCFB-25C9-44C0-B859-A59E37871C0E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {358EFCFB-25C9-44C0-B859-A59E37871C0E}.Release|Any CPU.Build.0 = Release|Any CPU - {65573D12-2507-4467-A5DC-9DB3B85E2D91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65573D12-2507-4467-A5DC-9DB3B85E2D91}.Debug|Any CPU.Build.0 = Debug|Any CPU - {65573D12-2507-4467-A5DC-9DB3B85E2D91}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65573D12-2507-4467-A5DC-9DB3B85E2D91}.Release|Any CPU.Build.0 = Release|Any CPU - {9675133B-FC61-4C1A-B3D6-9C2E5BBCF211}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9675133B-FC61-4C1A-B3D6-9C2E5BBCF211}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9675133B-FC61-4C1A-B3D6-9C2E5BBCF211}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9675133B-FC61-4C1A-B3D6-9C2E5BBCF211}.Release|Any CPU.Build.0 = Release|Any CPU - {BB84DD77-FA18-45F6-A9B4-27F59C693BF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BB84DD77-FA18-45F6-A9B4-27F59C693BF7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BB84DD77-FA18-45F6-A9B4-27F59C693BF7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BB84DD77-FA18-45F6-A9B4-27F59C693BF7}.Release|Any CPU.Build.0 = Release|Any CPU - {4C8823C1-CBB9-4EFF-A0A4-D7C51B63CD7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4C8823C1-CBB9-4EFF-A0A4-D7C51B63CD7A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4C8823C1-CBB9-4EFF-A0A4-D7C51B63CD7A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4C8823C1-CBB9-4EFF-A0A4-D7C51B63CD7A}.Release|Any CPU.Build.0 = Release|Any CPU - {006FAC19-B07D-4562-9A2A-9FF7ACCC688E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {006FAC19-B07D-4562-9A2A-9FF7ACCC688E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {006FAC19-B07D-4562-9A2A-9FF7ACCC688E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {006FAC19-B07D-4562-9A2A-9FF7ACCC688E}.Release|Any CPU.Build.0 = Release|Any CPU - {B5B7C862-D7C3-4E0D-93BD-8D6DD602B7EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B5B7C862-D7C3-4E0D-93BD-8D6DD602B7EF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B5B7C862-D7C3-4E0D-93BD-8D6DD602B7EF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B5B7C862-D7C3-4E0D-93BD-8D6DD602B7EF}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {DE6BA20E-12D9-4D41-A8BB-10A19E32327A} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {4760014A-CF66-4FDA-87D5-4A9CEAF7108B} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {9AC4BAED-EE42-4E9A-94C8-71B5A43EA764} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {A78EA959-6F65-498F-A5B7-5CB07747C0EA} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {B7D95CE3-8FDE-490B-932B-E127F4EC6ADE} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {8FC76529-1E69-46B1-993F-AA3BF252AB7E} = {883F8EE3-E05C-4066-BD02-7F23BE62080D} - {9D173795-BE10-4366-BD34-83BA59B3F486} = {883F8EE3-E05C-4066-BD02-7F23BE62080D} - {F19D4945-4921-40EF-90C5-19AB688EB617} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {400665A8-CA03-4E79-B154-75CF44DDDAE3} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {8C96DFD8-9286-4DB8-AD8F-9AF4AF5C846F} = {883F8EE3-E05C-4066-BD02-7F23BE62080D} - {9834F941-47B0-44CC-9DAE-839BD6F71F65} = {883F8EE3-E05C-4066-BD02-7F23BE62080D} - {94A58282-915A-4174-9D30-9A46A28E6D5B} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {8B80B54A-6EB7-46A6-8C3C-1E607B094E3D} = {883F8EE3-E05C-4066-BD02-7F23BE62080D} - {43720D28-FD68-4953-A360-5D02CF9C67A2} = {883F8EE3-E05C-4066-BD02-7F23BE62080D} - {B5A6B581-554B-4584-AD6D-C0E514E13E0E} = {883F8EE3-E05C-4066-BD02-7F23BE62080D} - {EC1B995A-8CC5-4526-A131-C23D64DE5099} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {68B0AC04-0A8A-4831-ADE9-52E84A59AC5E} = {98BA18D4-FF7C-4775-A133-29C6513CDDD8} - {3197257D-5609-4CA8-BAE3-E43E744D78A9} = {98BA18D4-FF7C-4775-A133-29C6513CDDD8} - {D6BEDCD3-3910-43EC-BEF2-58A7C83619BC} = {98BA18D4-FF7C-4775-A133-29C6513CDDD8} - {235A1ADC-0B3C-4FEB-9254-E0780C76A569} = {98BA18D4-FF7C-4775-A133-29C6513CDDD8} - {5D3AB714-5232-433A-8C4C-20D59A9C623C} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {2B9CD3CD-EA5F-4A38-AC08-07A27D2F7C37} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {25AE795A-BC2E-44D7-9247-732E160CDE1E} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {358EFCFB-25C9-44C0-B859-A59E37871C0E} = {98BA18D4-FF7C-4775-A133-29C6513CDDD8} - {65573D12-2507-4467-A5DC-9DB3B85E2D91} = {98BA18D4-FF7C-4775-A133-29C6513CDDD8} - {9675133B-FC61-4C1A-B3D6-9C2E5BBCF211} = {98BA18D4-FF7C-4775-A133-29C6513CDDD8} - {BB84DD77-FA18-45F6-A9B4-27F59C693BF7} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {4C8823C1-CBB9-4EFF-A0A4-D7C51B63CD7A} = {4D0A2092-01C6-4396-A117-31263DD64D57} - {328F904C-E00A-4AAE-8B8E-C1BE80167E9A} = {BA3CF70D-79A2-4BD5-AE60-C4485E591D87} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {90A61DCC-4469-4042-B534-C37020F4A7EF} - EndGlobalSection -EndGlobal diff --git a/src/DragoAnt.EntityFrameworkCore.slnx b/src/DragoAnt.EntityFrameworkCore.slnx new file mode 100644 index 0000000..64ba9b9 --- /dev/null +++ b/src/DragoAnt.EntityFrameworkCore.slnx @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/DragoAnt.EntityFrameworkCore/DragoAnt.EntityFrameworkCore.csproj b/src/DragoAnt.EntityFrameworkCore/DragoAnt.EntityFrameworkCore.csproj index db3c474..4f0c492 100644 --- a/src/DragoAnt.EntityFrameworkCore/DragoAnt.EntityFrameworkCore.csproj +++ b/src/DragoAnt.EntityFrameworkCore/DragoAnt.EntityFrameworkCore.csproj @@ -1,7 +1,7 @@ - Entity Framework Core common extensions + Entity Framework Core extensions: model helpers and fixed queries shared by the other DragoAnt.EntityFrameworkCore packages. enable diff --git a/src/DragoAnt.EntityFrameworkCore/package.readme.md b/src/DragoAnt.EntityFrameworkCore/package.readme.md index db9bc17..466deca 100644 --- a/src/DragoAnt.EntityFrameworkCore/package.readme.md +++ b/src/DragoAnt.EntityFrameworkCore/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.EntityFrameworkCore - Entity Framework Core common extensions +Entity Framework Core extensions: model helpers and fixed queries shared by the other DragoAnt.EntityFrameworkCore packages. + +```sh +dotnet add package DragoAnt.EntityFrameworkCore +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/DragoAnt.Shared/DragoAnt.Shared.csproj b/src/DragoAnt.Shared/DragoAnt.Shared.csproj deleted file mode 100644 index e224677..0000000 --- a/src/DragoAnt.Shared/DragoAnt.Shared.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - Csv common extensions - enable - - - - - - - diff --git a/src/DragoAnt.Shared/Resources/AssemblyExtensions.cs b/src/DragoAnt.Shared/Resources/AssemblyExtensions.cs deleted file mode 100644 index 0ff7838..0000000 --- a/src/DragoAnt.Shared/Resources/AssemblyExtensions.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using System.Text; - -namespace Stenn.Shared.Resources -{ - /// - /// Resources extensions - /// - public static class ResourcesExtensions - { - /// - /// Resource file exists or not - /// - /// - /// - /// - public static bool ResExists(this Assembly assembly, string embeddedResFileName) - { - var info = assembly.GetManifestResourceInfo(embeddedResFileName); - return info != null; - } - - /// - /// Read resource file as a stream - /// - /// - /// - /// - /// - public static Stream ResReadStream(this Assembly assembly, string embeddedResFileName) - { - var stream = assembly.GetManifestResourceStream(embeddedResFileName); - if (stream == null) - { - throw new ArgumentException($"Can't find embedded resource with name '{embeddedResFileName}' in assembly '{assembly.FullName}'"); - } - return stream; - } - - /// - /// Read resource file as a string - /// - /// - /// - /// - /// - public static string ResRead(this Assembly assembly, string embeddedResFileName, Encoding? encoding = null) - { - using var stream = assembly.ResReadStream(embeddedResFileName); - using var reader = new StreamReader(stream, encoding, true, -1, false); - return reader.ReadToEnd(); - } - } -} \ No newline at end of file diff --git a/src/DragoAnt.Shared/Resources/ResFile.cs b/src/DragoAnt.Shared/Resources/ResFile.cs deleted file mode 100644 index 96f0bba..0000000 --- a/src/DragoAnt.Shared/Resources/ResFile.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using System.Text; - -namespace Stenn.Shared.Resources -{ - public class ResFile - { - private ResFile(Assembly assembly, string path, Encoding? encoding = null) - { - Assembly = assembly ?? throw new ArgumentNullException(nameof(assembly)); - Path = path ?? throw new ArgumentNullException(nameof(path)); - Encoding = encoding; - } - - public Assembly Assembly { get; } - public string Path { get; } - public Encoding? Encoding { get; } - - private static string PrepareResPath(Assembly assembly, string resPath) - { - resPath = resPath.Replace('\\', '.').Replace('/', '.'); - if (resPath.StartsWith('.')) - { - var assemblyName = assembly.GetName().Name; - //NOTE: This mean relative path - return assemblyName + "." + resPath.TrimStart('.'); - } - return resPath; - } - - public static ResFile Absolute(string absolutePath, Assembly? assembly = null, Encoding? encoding = null) - { - if (string.IsNullOrWhiteSpace(absolutePath)) - { - throw new ArgumentException("Value cannot be null or whitespace.", nameof(absolutePath)); - } - assembly ??= Assembly.GetCallingAssembly(); - absolutePath = PrepareResPath(assembly, absolutePath); - return new ResFile(assembly, absolutePath); - } - - public static ResFile Relative(string relativePath, Assembly? assembly = null, Encoding? encoding = null) - { - if (string.IsNullOrWhiteSpace(relativePath)) - { - throw new ArgumentException("Value cannot be null or whitespace.", nameof(relativePath)); - } - relativePath = "." + relativePath; - assembly ??= Assembly.GetCallingAssembly(); - relativePath = PrepareResPath(assembly, relativePath); - return new ResFile(assembly, relativePath, encoding); - } - - public bool Exists() - { - return Assembly.ResExists(Path); - } - - public string Read() - { - return Assembly.ResRead(Path, Encoding); - } - - public Stream ReadStream() - { - return Assembly.ResReadStream(Path); - } - } -} \ No newline at end of file diff --git a/src/DragoAnt.Shared/Tables/ITableWriter.cs b/src/DragoAnt.Shared/Tables/ITableWriter.cs deleted file mode 100644 index 197cb9d..0000000 --- a/src/DragoAnt.Shared/Tables/ITableWriter.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Stenn.Shared.Tables -{ - public interface ITableWriter - { - void SetColumns(params TableWriterColumn[] columns); - void WriteRow(T?[] values); - } -} \ No newline at end of file diff --git a/src/DragoAnt.Shared/Tables/TableWriterColumn.cs b/src/DragoAnt.Shared/Tables/TableWriterColumn.cs deleted file mode 100644 index ecc3493..0000000 --- a/src/DragoAnt.Shared/Tables/TableWriterColumn.cs +++ /dev/null @@ -1,6 +0,0 @@ -using System; - -namespace Stenn.Shared.Tables -{ - public record TableWriterColumn(string Name, Type ColumnType); -} \ No newline at end of file diff --git a/src/DragoAnt.StaticMigrations/DragoAnt.StaticMigrations.csproj b/src/DragoAnt.StaticMigrations/DragoAnt.StaticMigrations.csproj index cc277e6..6d4297d 100644 --- a/src/DragoAnt.StaticMigrations/DragoAnt.StaticMigrations.csproj +++ b/src/DragoAnt.StaticMigrations/DragoAnt.StaticMigrations.csproj @@ -1,7 +1,7 @@ - Static migrations + Provider-independent model for static migrations: items, collections and apply conditions. enable diff --git a/src/DragoAnt.StaticMigrations/package.readme.md b/src/DragoAnt.StaticMigrations/package.readme.md index 2016ff6..aa7ed02 100644 --- a/src/DragoAnt.StaticMigrations/package.readme.md +++ b/src/DragoAnt.StaticMigrations/package.readme.md @@ -1,3 +1,9 @@ # DragoAnt.StaticMigrations - Static migrations +Provider-independent model for static migrations: items, collections and apply conditions. + +```sh +dotnet add package DragoAnt.StaticMigrations +``` + +Source, issues and releases: https://github.com/DragoAnt/Extensions.EntityFrameworkCore diff --git a/src/PackageAsProj.targets b/src/PackageAsProj.targets index bfd843d..30bf469 100644 --- a/src/PackageAsProj.targets +++ b/src/PackageAsProj.targets @@ -5,12 +5,12 @@ <_AsProj_DragoAnt_EntityFrameworkCore Condition="'$(PackageAsProj_DragoAnt)'=='true' Or '$(PackageAsProj_DragoAnt_EntityFrameworkCore)'=='true'">true - -