diff --git a/.github/release.yml b/.github/release.yml index eaa0b09..63a329a 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -1,18 +1,19 @@ changelog: exclude: - labels: - - ci - - good first issue - - help wanted - - invalid - - question - categories: - - title: Bugfixes - labels: - - bug - - title: New Backports - labels: - - request - - title: Other changes - labels: - - '*' + labels: + - ci + - good first issue + - help wanted + - invalid + - question + categories: + - title: Bugfixes + labels: + - bug + - title: New Backports + labels: + - request + - title: Other changes + labels: + - "*" + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 35c26ef..81ccce6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,92 +1,90 @@ -name: Build - -on: - workflow_call: - inputs: - version: - required: true - type: string - no-suffix: - type: boolean - default: false - - -defaults: - run: - shell: pwsh - -env: - DOTNET_TELEMETRY_OPTOUT: true - DOTNET_NOLOGO: true - NUGET_PACKAGES: ${{github.workspace}}/artifacts/pkg - -jobs: - build: - runs-on: ubuntu-latest - name: Build - env: - VersionSuffix: ${{ !inputs.no-suffix && inputs.version }} - DoNotAddSuffix: ${{ inputs.no-suffix && '1' }} - ContinuousIntegrationBuild: true - steps: - - name: Configure git - run: | - git config --global core.autocrlf input - - - name: Checkout - uses: actions/checkout@v4 - with: - lfs: true - submodules: recursive - - # TODO: maybe we can eventually use package locks for package caching? - - - name: Install .NET SDK - uses: nike4613/install-dotnet@533307d1c90c37993c8ef1397388bc9783e7b87c - with: - global-json: global.json - - # NOTE: manual package caching - - name: Cache restored NuGet packages - uses: actions/cache@v4 - with: - path: ${{ env.NUGET_PACKAGES }} - key: ${{ runner.os }}-nuget-v1-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets', 'nuget.config', 'global.json') }} - restore-keys: ${{ runner.os }}-nuget-v1- - - - name: Restore - run: dotnet restore -bl:restore.binlog -noAutoRsp - - - name: Build - run: dotnet build --no-restore -c Release -bl:build.binlog -clp:NoSummary -noAutoRsp - - - name: Pack - run: dotnet pack --no-restore -c Release -bl:pack.binlog -clp:NoSummary -noAutoRsp - - - # TODO: if/when we add tests, run them here and hook up test reporting - #- name: Run auxiliary tests - # run: dotnet test --no-build -c Release -l:"trx;LogFileName=$($env:LOG_FILE_NAME)" - # - #- name: Upload test results - # uses: actions/upload-artifact@v4 - # if: ${{ always() }} - # with: - # name: test-results aux ${{ runner.os }} - # retention-days: 1 - # path: 'TestResults/*.trx' - # if-no-files-found: ignore - - - name: Upload binlogs - uses: actions/upload-artifact@v4 - if: ${{ always() }} - with: - name: binlogs-${{ runner.os }} - path: '*.binlog' - retention-days: 7 - - - name: Archive packages - uses: actions/upload-artifact@v4 - with: - name: packages - path: artifacts/package/release/*.nupkg +name: Build + +on: + workflow_call: + inputs: + version: + required: true + type: string + no-suffix: + type: boolean + default: false + +defaults: + run: + shell: pwsh + +env: + DOTNET_TELEMETRY_OPTOUT: true + DOTNET_NOLOGO: true + NUGET_PACKAGES: ${{github.workspace}}/artifacts/pkg + +jobs: + build: + runs-on: ubuntu-latest + name: Build + env: + VersionSuffix: ${{ !inputs.no-suffix && inputs.version }} + DoNotAddSuffix: ${{ inputs.no-suffix && '1' }} + ContinuousIntegrationBuild: true + steps: + - name: Configure git + run: | + git config --global core.autocrlf input + + - name: Checkout + uses: actions/checkout@v6 + with: + lfs: true + submodules: recursive + + # TODO: maybe we can eventually use package locks for package caching? + + - name: Install .NET SDK + uses: nike4613/install-dotnet@533307d1c90c37993c8ef1397388bc9783e7b87c + with: + global-json: global.json + + # NOTE: manual package caching + - name: Cache restored NuGet packages + uses: actions/cache@v5 + with: + path: ${{ env.NUGET_PACKAGES }} + key: ${{ runner.os }}-nuget-v1-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets', 'nuget.config', 'global.json') }} + restore-keys: ${{ runner.os }}-nuget-v1- + + - name: Restore + run: dotnet restore -bl:restore.binlog -noAutoRsp + + - name: Build + run: dotnet build --no-restore -c Release -bl:build.binlog -clp:NoSummary -noAutoRsp + + - name: Pack + run: dotnet pack --no-restore -c Release -bl:pack.binlog -clp:NoSummary -noAutoRsp + + # TODO: if/when we add tests, run them here and hook up test reporting + #- name: Run auxiliary tests + # run: dotnet test --no-build -c Release -l:"trx;LogFileName=$($env:LOG_FILE_NAME)" + # + #- name: Upload test results + # uses: actions/upload-artifact@v4 + # if: ${{ always() }} + # with: + # name: test-results aux ${{ runner.os }} + # retention-days: 1 + # path: 'TestResults/*.trx' + # if-no-files-found: ignore + + - name: Upload binlogs + uses: actions/upload-artifact@v6 + if: ${{ always() }} + with: + name: binlogs-${{ runner.os }} + path: "*.binlog" + retention-days: 7 + + - name: Archive packages + uses: actions/upload-artifact@v6 + with: + name: packages + path: artifacts/package/release/*.nupkg diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 664defb..b700c3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: pull_request: - + defaults: run: shell: pwsh @@ -13,7 +13,7 @@ env: NUGET_PACKAGES: ${{github.workspace}}/artifacts/pkg concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} cancel-in-progress: true jobs: @@ -27,20 +27,20 @@ jobs: ver: ${{ steps.computever.outputs.ver }} checkid: ${{ steps.result_check.outpus.check_id }} steps: - - name: Check if this run should be skipped - id: skip_check - uses: fkirc/skip-duplicate-actions@v5 - with: - cancel_others: true - concurrent_skipping: same_content_newer - - - name: Check if this run is skipped by commit message - id: msg_check - run: echo "skip=${{ github.event_name == 'push' && contains(github.event.head_commit.message, '[skip-ci]') }}" >> $env:GITHUB_OUTPUT - - - name: Compute Version - id: computever - run: echo "ver=$(Get-Date -Format y.M.d).${{ github.run_number }}.${{ github.run_attempt }}" >> $env:GITHUB_OUTPUT + - name: Check if this run should be skipped + id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + cancel_others: true + concurrent_skipping: same_content_newer + + - name: Check if this run is skipped by commit message + id: msg_check + run: echo "skip=${{ github.event_name == 'push' && contains(github.event.head_commit.message, '[skip-ci]') }}" >> $env:GITHUB_OUTPUT + + - name: Compute Version + id: computever + run: echo "ver=$(Get-Date -Format y.M.d).${{ github.run_number }}.${{ github.run_attempt }}" >> $env:GITHUB_OUTPUT build: needs: [setup] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9996011..328bcfc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,9 @@ on: required: true default: Patch options: - - Patch - - Minor - - Major + - Patch + - Minor + - Major prerelease: description: This is a prerelease type: boolean @@ -25,7 +25,7 @@ on: description: Prerelease suffix type: string default: "" - + defaults: run: shell: pwsh @@ -36,7 +36,7 @@ env: NUGET_PACKAGES: ${{github.workspace}}/artifacts/pkg concurrency: - group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} cancel-in-progress: true jobs: @@ -46,20 +46,20 @@ jobs: outputs: ver: ${{ steps.computever.outputs.ver }} steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Get Version - id: computever - run: | - $ver = ([xml](Get-Content Version.props)).Project.PropertyGroup.VersionPrefix; - $suffix = "${{ inputs.prerelease && format('-{0}', inputs.prerelease-str) || '' }}" - echo "ver=$($ver)$($suffix)" >> $env:GITHUB_OUTPUT + - name: Checkout + uses: actions/checkout@v6 + + - name: Get Version + id: computever + run: | + $ver = ([xml](Get-Content Version.props)).Project.PropertyGroup.VersionPrefix; + $suffix = "${{ inputs.prerelease && format('-{0}', inputs.prerelease-str) || '' }}" + echo "ver=$($ver)$($suffix)" >> $env:GITHUB_OUTPUT build: needs: [setup] if: needs.setup.outputs.should_skip != 'true' - name: 'Build ${{ needs.setup.outputs.ver }}' + name: "Build ${{ needs.setup.outputs.ver }}" uses: ./.github/workflows/build.yml with: version: ${{ inputs.prerelease-str }} @@ -67,7 +67,7 @@ jobs: upload-github: needs: [setup, build] - if: '!inputs.dryrun' + if: "!inputs.dryrun" name: Upload Packages (GitHub) uses: ./.github/workflows/upload-packages.yml with: @@ -75,7 +75,7 @@ jobs: upload-nuget: needs: [setup, build] - if: '!inputs.dryrun' + if: "!inputs.dryrun" name: Upload Packages (NuGet) uses: ./.github/workflows/upload-packages.yml with: @@ -94,73 +94,72 @@ jobs: contents: write steps: - - name: Authenticate as app - uses: actions/create-github-app-token@v2 - id: app_tok - with: - app-id: ${{ vars.APP_ID }} - private-key: ${{ secrets.APP_PRIVKEY }} - - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ steps.app_tok.outputs.token }} # checkout using the app token so we can push directly to the repo head - lfs: true - submodules: true - - - name: Download compiled packages - uses: actions/download-artifact@v4 - with: - name: packages - path: artifacts/package/release/ - github-token: ${{ github.token }} - run-id: ${{ github.run_id }} - - # first, make release/tag - - name: Create release - uses: softprops/action-gh-release@v2 - if: '!inputs.dryrun' - with: - token: ${{ steps.app_tok.outputs.token }} - files: artifacts/package/release/*.nupkg - tag_name: v${{ needs.setup.outputs.ver }} - prerelease: ${{ inputs.prerelease }} - generate_release_notes: true - - # NOTE: manual package caching - - name: Cache restored NuGet packages - if: '!inputs.prerelease' - uses: actions/cache@v4 - with: - path: ${{ env.NUGET_PACKAGES }} - key: ${{ runner.os }}-nuget-v1-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets', 'nuget.config', 'global.json') }} - restore-keys: ${{ runner.os }}-nuget-v1- - - - name: Install .NET SDK - if: '!inputs.prerelease' - uses: nike4613/install-dotnet@533307d1c90c37993c8ef1397388bc9783e7b87c - with: - global-json: global.json - - # then, bump the version (if appropriate) - - name: Update version - if: '!inputs.prerelease' - run: ./tools/bump_version.ps1 -BumpVersion ${{ inputs.bumpkind }} - - - name: Update compat suppressions - if: '!inputs.prerelease' - run: | - dotnet pack -c Release -clp:NoSummary -noAutoRsp -p:RunAnalyzers=false -p:ApiCompatGenerateSuppressionFile=true - - - name: Commit updated version - if: '!inputs.prerelease' - uses: EndBug/add-and-commit@v9 - with: - message: | - [BOT]: Bump version after ${{ needs.setup.outputs.ver }} release - - [skip-ci] - default_author: github_actions - push: ${{ !inputs.dryrun && 'origin --force --set-upstream' || 'false' }} - pathspec_error_handling: exitAtEnd + - name: Authenticate as app + uses: actions/create-github-app-token@v2 + id: app_tok + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVKEY }} + + - name: Checkout + uses: actions/checkout@v6 + with: + token: ${{ steps.app_tok.outputs.token }} # checkout using the app token so we can push directly to the repo head + lfs: true + submodules: true + + - name: Download compiled packages + uses: actions/download-artifact@v7 + with: + name: packages + path: artifacts/package/release/ + github-token: ${{ github.token }} + run-id: ${{ github.run_id }} + + # first, make release/tag + - name: Create release + uses: softprops/action-gh-release@v2 + if: "!inputs.dryrun" + with: + token: ${{ steps.app_tok.outputs.token }} + files: artifacts/package/release/*.nupkg + tag_name: v${{ needs.setup.outputs.ver }} + prerelease: ${{ inputs.prerelease }} + generate_release_notes: true + + # NOTE: manual package caching + - name: Cache restored NuGet packages + if: "!inputs.prerelease" + uses: actions/cache@v5 + with: + path: ${{ env.NUGET_PACKAGES }} + key: ${{ runner.os }}-nuget-v1-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets', 'nuget.config', 'global.json') }} + restore-keys: ${{ runner.os }}-nuget-v1- + + - name: Install .NET SDK + if: "!inputs.prerelease" + uses: nike4613/install-dotnet@cc706db77ed67745a4a4cbae19b2869220e34d27 + with: + global-json: global.json + + # then, bump the version (if appropriate) + - name: Update version + if: "!inputs.prerelease" + run: ./tools/bump_version.ps1 -BumpVersion ${{ inputs.bumpkind }} + + - name: Update compat suppressions + if: "!inputs.prerelease" + run: | + dotnet pack -c Release -clp:NoSummary -noAutoRsp -p:RunAnalyzers=false -p:ApiCompatGenerateSuppressionFile=true + + - name: Commit updated version + if: "!inputs.prerelease" + uses: EndBug/add-and-commit@v9 + with: + message: | + [BOT]: Bump version after ${{ needs.setup.outputs.ver }} release + [skip-ci] + default_author: github_actions + push: ${{ !inputs.dryrun && 'origin --force --set-upstream' || 'false' }} + pathspec_error_handling: exitAtEnd diff --git a/.github/workflows/upload-packages.yml b/.github/workflows/upload-packages.yml index b500687..9a42814 100644 --- a/.github/workflows/upload-packages.yml +++ b/.github/workflows/upload-packages.yml @@ -1,59 +1,59 @@ -name: Upload Packages - -on: - workflow_call: - inputs: - run-id: - type: string - default: ${{ github.run_id }} - description: The ID of the workflow to upload packages from - nuget-url: - type: string - default: "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" - description: URL of the nuget feed to upload to - secrets: - nuget-key: - -defaults: - run: - shell: pwsh - -env: - DOTNET_TELEMETRY_OPTOUT: true - DOTNET_NOLOGO: true - NUGET_PACKAGES: ${{github.workspace}}/artifacts/pkg - -jobs: - build: - runs-on: ubuntu-latest - name: Upload - env: - VersionSuffix: ${{ !inputs.no-suffix && format('daily.{0}', inputs.version) }} - DoNotAddSuffix: ${{ inputs.no-suffix && '1' }} - ContinuousIntegrationBuild: true - permissions: - contents: read - packages: write - steps: - - name: Configure git - run: | - git config --global core.autocrlf input - - - name: Checkout - uses: actions/checkout@v4 - - - name: Install .NET SDK - uses: nike4613/install-dotnet@533307d1c90c37993c8ef1397388bc9783e7b87c - with: - global-json: global.json - - - name: Wait for packages to be available - if: github.run_id != inputs.run-id - shell: pwsh - env: - GH_TOKEN: ${{ github.token }} - RUN_ID: ${{ inputs.run-id }} - run: | +name: Upload Packages + +on: + workflow_call: + inputs: + run-id: + type: string + default: ${{ github.run_id }} + description: The ID of the workflow to upload packages from + nuget-url: + type: string + default: "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" + description: URL of the nuget feed to upload to + secrets: + nuget-key: + +defaults: + run: + shell: pwsh + +env: + DOTNET_TELEMETRY_OPTOUT: true + DOTNET_NOLOGO: true + NUGET_PACKAGES: ${{github.workspace}}/artifacts/pkg + +jobs: + build: + runs-on: ubuntu-latest + name: Upload + env: + VersionSuffix: ${{ !inputs.no-suffix && format('daily.{0}', inputs.version) }} + DoNotAddSuffix: ${{ inputs.no-suffix && '1' }} + ContinuousIntegrationBuild: true + permissions: + contents: read + packages: write + steps: + - name: Configure git + run: | + git config --global core.autocrlf input + + - name: Checkout + uses: actions/checkout@v6 + + - name: Install .NET SDK + uses: nike4613/install-dotnet@cc706db77ed67745a4a4cbae19b2869220e34d27 + with: + global-json: global.json + + - name: Wait for packages to be available + if: github.run_id != inputs.run-id + shell: pwsh + env: + GH_TOKEN: ${{ github.token }} + RUN_ID: ${{ inputs.run-id }} + run: | while ($true) { $conclusion = gh api -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" ` @@ -75,15 +75,14 @@ jobs: } Start-Sleep -Seconds 30; } - - - name: Download compiled packages - uses: actions/download-artifact@v4 - with: - name: packages - path: artifacts/package/release/ - github-token: ${{ github.token }} - run-id: ${{ inputs.run-id }} - - - name: Push packages - run: dotnet nuget push -s "${{ inputs.nuget-url }}" -k ${{ secrets.nuget-key || github.token }} (Get-Item artifacts/package/release/*.nupkg) - + + - name: Download compiled packages + uses: actions/download-artifact@v7 + with: + name: packages + path: artifacts/package/release/ + github-token: ${{ github.token }} + run-id: ${{ inputs.run-id }} + + - name: Push packages + run: dotnet nuget push -s "${{ inputs.nuget-url }}" -k ${{ secrets.nuget-key || github.token }} (Get-Item artifacts/package/release/*.nupkg) diff --git a/LICENSE b/LICENSE index 182e7db..14dcc8e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2024 MonoMod - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2026 MonoMod + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/global.json b/global.json index 93e4ca5..dc5cc64 100644 --- a/global.json +++ b/global.json @@ -2,10 +2,10 @@ "sdk": { "allowPrerelease": true, "rollForward": "latestPatch", - "version": "9.0.300" + "version": "10.0.102" }, "msbuild-sdks": { - "Microsoft.Build.NoTargets": "3.7.56", - "Microsoft.NET.Sdk.IL": "9.0.0" + "Microsoft.Build.NoTargets": "3.7.134", + "Microsoft.NET.Sdk.IL": "10.0.3" } -} \ No newline at end of file +} diff --git a/src/MonoMod.Backports.Shims/ApiCompat.targets b/src/MonoMod.Backports.Shims/ApiCompat.targets index 5fd044d..1e0059e 100644 --- a/src/MonoMod.Backports.Shims/ApiCompat.targets +++ b/src/MonoMod.Backports.Shims/ApiCompat.targets @@ -7,19 +7,19 @@ Reference="false" ReferenceOutputAssembly="false" OutputItemType="MMGenApiCompat" Private="false" Pack="false" - SetTargetFramework="TargetFramework=net9.0" + SetTargetFramework="TargetFramework=net10.0" SkipGetTargetFrameworkProperties="true" /> @@ -270,4 +270,4 @@ - \ No newline at end of file + diff --git a/src/MonoMod.Backports.Shims/Directory.Build.targets b/src/MonoMod.Backports.Shims/Directory.Build.targets index ded548d..bebb4b3 100644 --- a/src/MonoMod.Backports.Shims/Directory.Build.targets +++ b/src/MonoMod.Backports.Shims/Directory.Build.targets @@ -8,7 +8,7 @@ Reference="false" ReferenceOutputAssembly="false" OutputItemType="MMShimGen" Private="false" Pack="false" - SetTargetFramework="TargetFramework=net9.0" + SetTargetFramework="TargetFramework=net10.0" SkipGetTargetFrameworkProperties="true" /> @@ -287,4 +287,4 @@ - \ No newline at end of file + diff --git a/src/MonoMod.Backports/MonoMod.Backports.csproj b/src/MonoMod.Backports/MonoMod.Backports.csproj index 11368ee..8629c04 100644 --- a/src/MonoMod.Backports/MonoMod.Backports.csproj +++ b/src/MonoMod.Backports/MonoMod.Backports.csproj @@ -23,7 +23,7 @@ - + diff --git a/src/MonoMod.Backports/System/Runtime/CompilerServices/ExtensionMarkerAttribute,gte_core_10.0.cs b/src/MonoMod.Backports/System/Runtime/CompilerServices/ExtensionMarkerAttribute,gte_core_10.0.cs new file mode 100644 index 0000000..a821248 --- /dev/null +++ b/src/MonoMod.Backports/System/Runtime/CompilerServices/ExtensionMarkerAttribute,gte_core_10.0.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: TypeForwardedTo(typeof(ExtensionMarkerAttribute))] \ No newline at end of file diff --git a/src/MonoMod.Backports/System/Runtime/CompilerServices/ExtensionMarkerAttribute,lt_core_10.0,is_std,is_fx.cs b/src/MonoMod.Backports/System/Runtime/CompilerServices/ExtensionMarkerAttribute,lt_core_10.0,is_std,is_fx.cs new file mode 100644 index 0000000..ed7255d --- /dev/null +++ b/src/MonoMod.Backports/System/Runtime/CompilerServices/ExtensionMarkerAttribute,lt_core_10.0,is_std,is_fx.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.ComponentModel; + +namespace System.Runtime.CompilerServices +{ + /// + /// This attribute is used to mark extension members and associate them with a specific marker type (which provides detailed information about an extension block and its receiver parameter). + /// This attribute should not be used by developers in source code. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false)] + public sealed class ExtensionMarkerAttribute : Attribute + { + /// Initializes a new instance of the class. + /// The name of the marker type this extension member is associated with. + public ExtensionMarkerAttribute(string name) + => Name = name; + + /// The name of the marker type this extension member is associated with. + public string Name { get; } + } +} \ No newline at end of file diff --git a/src/MonoMod.Backports/System/Runtime/CompilerServices/RequiresLocationAttribute,gte_core_8.0.cs b/src/MonoMod.Backports/System/Runtime/CompilerServices/RequiresLocationAttribute,gte_core_8.0.cs new file mode 100644 index 0000000..2a8718c --- /dev/null +++ b/src/MonoMod.Backports/System/Runtime/CompilerServices/RequiresLocationAttribute,gte_core_8.0.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: TypeForwardedTo(typeof(RequiresLocationAttribute))] \ No newline at end of file diff --git a/src/MonoMod.Backports/System/Runtime/CompilerServices/RequiresLocationAttribute,lt_core_8.0,is_std,is_fx.cs b/src/MonoMod.Backports/System/Runtime/CompilerServices/RequiresLocationAttribute,lt_core_8.0,is_std,is_fx.cs new file mode 100644 index 0000000..ea62b66 --- /dev/null +++ b/src/MonoMod.Backports/System/Runtime/CompilerServices/RequiresLocationAttribute,lt_core_8.0,is_std,is_fx.cs @@ -0,0 +1,21 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.ComponentModel; + +namespace System.Runtime.CompilerServices +{ + /// + /// Reserved for use by a compiler for tracking metadata. + /// This attribute should not be used by developers in source code. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + [AttributeUsage(AttributeTargets.Parameter, Inherited = false)] + public sealed class RequiresLocationAttribute : Attribute + { + /// Initializes the attribute. + public RequiresLocationAttribute() + { + } + } +} \ No newline at end of file diff --git a/src/build/ArApiCompat/ArApiCompat.csproj b/src/build/ArApiCompat/ArApiCompat.csproj index b38574a..24b38e3 100644 --- a/src/build/ArApiCompat/ArApiCompat.csproj +++ b/src/build/ArApiCompat/ArApiCompat.csproj @@ -2,15 +2,15 @@ Exe - net9.0 + net10.0 enable false enable - $(NoWarn);CA1043;CA1028;CA1031 + $(NoWarn);CA1043;CA1028;CA1031;CA1515 - + diff --git a/src/build/FilterPackagesForRestore/FilterPackagesForRestore.csproj b/src/build/FilterPackagesForRestore/FilterPackagesForRestore.csproj index 248f4ac..a5fc838 100644 --- a/src/build/FilterPackagesForRestore/FilterPackagesForRestore.csproj +++ b/src/build/FilterPackagesForRestore/FilterPackagesForRestore.csproj @@ -2,15 +2,15 @@ Exe - net9.0 + net10.0 enable enable false - - + + - \ No newline at end of file + diff --git a/src/build/GenApiCompatDll/GenApiCompatDll.csproj b/src/build/GenApiCompatDll/GenApiCompatDll.csproj index 0bf0557..267a7ce 100644 --- a/src/build/GenApiCompatDll/GenApiCompatDll.csproj +++ b/src/build/GenApiCompatDll/GenApiCompatDll.csproj @@ -2,16 +2,16 @@ Exe - net9.0 + net10.0 enable enable false - - - + + + diff --git a/src/build/MonoMod.Backports.Tasks/MonoMod.Backports.Tasks.csproj b/src/build/MonoMod.Backports.Tasks/MonoMod.Backports.Tasks.csproj index a9c69e0..175ff04 100644 --- a/src/build/MonoMod.Backports.Tasks/MonoMod.Backports.Tasks.csproj +++ b/src/build/MonoMod.Backports.Tasks/MonoMod.Backports.Tasks.csproj @@ -11,6 +11,7 @@ + diff --git a/src/build/ShimGen/ShimGen.csproj b/src/build/ShimGen/ShimGen.csproj index 7823bc7..ca3a892 100644 --- a/src/build/ShimGen/ShimGen.csproj +++ b/src/build/ShimGen/ShimGen.csproj @@ -2,15 +2,15 @@ Exe - net9.0 + net10.0 enable enable false - - + + diff --git a/tools/Common.CS.props b/tools/Common.CS.props index 8a564bf..0d51d1e 100644 --- a/tools/Common.CS.props +++ b/tools/Common.CS.props @@ -1,39 +1,39 @@ - - - - - - preview - true - enable - $(WarningsAsErrors);nullable - prompt - 4 - - true - true - true - - false - - true - true - All - 8.0 - - $(NoWarn);CS1591 - $(NoWarn);CA1716 - $(NoWarn);CA1003 - $(NoWarn);CA2020 - $(NoWarn);CA1303 - - 4.14.0 - 17.12.6 - - - - - - - - \ No newline at end of file + + + + + + preview + true + enable + $(WarningsAsErrors);nullable + prompt + 4 + + true + true + true + + false + + true + true + All + 10.0 + + $(NoWarn);CS1591 + $(NoWarn);CA1716 + $(NoWarn);CA1003 + $(NoWarn);CA2020 + $(NoWarn);CA1303 + + 5.3.0-2.final + 18.0.2 + + + + + + + + diff --git a/tools/Common.CS.targets b/tools/Common.CS.targets index 7859d39..f726185 100644 --- a/tools/Common.CS.targets +++ b/tools/Common.CS.targets @@ -1,55 +1,55 @@ - - - - - - $(NoWarn);NG0101 - - - - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - EnsureSupportedMSBuildVersion; - $(CoreCompileDependsOn); - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - $(CoreCompileDependsOn);_DisableAnalyzers - - - - - <_RemoveAnalyzer>%(RemoveAnalyzer.Identity) - - - - - - - - + + + + + + $(NoWarn);NG0101 + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + EnsureSupportedMSBuildVersion; + $(CoreCompileDependsOn); + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + $(CoreCompileDependsOn);_DisableAnalyzers + + + + + <_RemoveAnalyzer>%(RemoveAnalyzer.Identity) + + + + + + + + diff --git a/tools/Common.NoTargets.props b/tools/Common.NoTargets.props index 8f51252..6333a9f 100644 --- a/tools/Common.NoTargets.props +++ b/tools/Common.NoTargets.props @@ -3,7 +3,7 @@ - net8.0 + net10.0 false false false @@ -14,4 +14,4 @@ - \ No newline at end of file + diff --git a/tools/Common.props b/tools/Common.props index c244a13..ed106bb 100644 --- a/tools/Common.props +++ b/tools/Common.props @@ -1,85 +1,85 @@ - - - - - - Debug;Release - Debug - portable - true - false - - - - - net6.0;net5.0;net7.0;net8.0;net9.0; - netcoreapp2.1;netcoreapp3.0;netcoreapp3.1; - netstandard2.0;netstandard2.1; - net35;net40;net45;net452;net462;net47 - - - - - $(AssemblyName.ToUpper().Replace('.', '_'));$(DefineConstants) - - false - - false - - - $(MSBuildThisFileDirectory) - $(MMToolsPath)..\ - $(MMRootPath)src\ - $(MMRootPath)artifacts\ - $(MMRootPath)external\ - $(MMRootPath)docs\ - - - true - $(MMArtifactsPath) - - true - false - - - $(MMRootPath)MonoMod.snk - true - false - false - - - false - true - - - - - true - false - DEBUG;$(DefineConstants) - - - - - true - - - - - - - - - Unknown - CS - IL - NoTargets - $(MMToolsPath)Common.$(MMProjectLanguage).props - $(MMToolsPath)Common.$(MMProjectLanguage).targets - - - - - - - + + + + + + Debug;Release + Debug + portable + true + false + + + + + net6.0;net5.0;net7.0;net8.0;net9.0;net10.0; + netcoreapp2.1;netcoreapp3.0;netcoreapp3.1; + netstandard2.0;netstandard2.1; + net35;net40;net45;net452;net462;net47 + + + + + $(AssemblyName.ToUpper().Replace('.', '_'));$(DefineConstants) + + false + + false + + + $(MSBuildThisFileDirectory) + $(MMToolsPath)..\ + $(MMRootPath)src\ + $(MMRootPath)artifacts\ + $(MMRootPath)external\ + $(MMRootPath)docs\ + + + true + $(MMArtifactsPath) + + true + false + + + $(MMRootPath)MonoMod.snk + true + false + false + + + false + true + + + + + true + false + DEBUG;$(DefineConstants) + + + + + true + + + + + + + + + Unknown + CS + IL + NoTargets + $(MMToolsPath)Common.$(MMProjectLanguage).props + $(MMToolsPath)Common.$(MMProjectLanguage).targets + + + + + + + diff --git a/tools/NuGet.props b/tools/NuGet.props index f3eb31d..93c6ef6 100644 --- a/tools/NuGet.props +++ b/tools/NuGet.props @@ -1,53 +1,52 @@ - - - - - $(MSBuildProjectName) - 0x0ade, DaNike - - alpha.dev - - Copyright $([System.DateTime]::Now.ToString(yyyy)) $(Authors) - polyfill;dotnet;net;netcore;netstandard;library;$(PackageTags) - MIT - https://github.com/MonoMod/MonoMod.Backports - https://github.com/MonoMod - - true - - icon.png - https://user-images.githubusercontent.com/1200380/47308180-28242880-d631-11e8-89d2-14d86f3db113.png - - false - - - - - - - - true - true - true - snupkg - - - - - - all - runtime; build; native; contentfiles; analyzers - - - - all - runtime; build; native; contentfiles; analyzers - - - - - - true - - - \ No newline at end of file + + + + + $(MSBuildProjectName) + 0x0ade, DaNike + alpha.dev + + Copyright $([System.DateTime]::Now.ToString(yyyy)) $(Authors) + polyfill;dotnet;net;netcore;netstandard;library;$(PackageTags) + MIT + https://github.com/MonoMod/MonoMod.Backports + https://github.com/MonoMod + + true + + icon.png + https://user-images.githubusercontent.com/1200380/47308180-28242880-d631-11e8-89d2-14d86f3db113.png + + false + + + + + + + + true + true + true + snupkg + + + + + + all + runtime; build; native; contentfiles; analyzers + + + + all + runtime; build; native; contentfiles; analyzers + + + + + + true + + +