diff --git a/.github/workflows/Pkg EdFi.Database.Admin.yml b/.github/workflows/Pkg EdFi.Database.Admin.yml index 7aa489e110..5147a0c868 100644 --- a/.github/workflows/Pkg EdFi.Database.Admin.yml +++ b/.github/workflows/Pkg EdFi.Database.Admin.yml @@ -112,8 +112,10 @@ jobs: nuget pack $AdminPostgreSQLNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes - name: Install-credential-handler if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} - run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" - shell: powershell + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 InstallCredentialHandler + shell: powershell - name: Publish Nuget package if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} working-directory: ./Ed-Fi-ODS/ diff --git a/.github/workflows/Pkg EdFi.Database.Security.yml b/.github/workflows/Pkg EdFi.Database.Security.yml index d315e1726b..82b90c1302 100644 --- a/.github/workflows/Pkg EdFi.Database.Security.yml +++ b/.github/workflows/Pkg EdFi.Database.Security.yml @@ -112,8 +112,10 @@ jobs: nuget pack $SecurityPostgreSQLNuspecFilePath -OutputDirectory $packageOutput -Version $version -Properties "configuration=release" -Properties "authors=Ed-Fi Alliance" -Properties "owners=Ed-Fi Alliance" -Properties "copyright=Copyright © $(date +'%Y') Ed-Fi Alliance, LLC and Contributors" -NoPackageAnalysis -NoDefaultExcludes - name: Install-credential-handler if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} - run: iex "& { $(irm https://aka.ms/install-artifacts-credprovider.ps1) } -AddNetfx" - shell: powershell + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 InstallCredentialHandler + shell: powershell - name: Publish Nuget package working-directory: ./Ed-Fi-ODS/ if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} diff --git a/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml new file mode 100644 index 0000000000..c5e128a24e --- /dev/null +++ b/.github/workflows/Pkg EdFi.ProjectTemplates.Installer.yml @@ -0,0 +1,128 @@ +# SPDX-License-Identifier: Apache-2.0 +# Licensed to the Ed-Fi Alliance under one or more agreements. +# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. +# See the LICENSE and NOTICES files in the project root for more information. + +name: Pkg EdFi.ProjectTemplates.Installer + +on: + pull_request: + branches: [main, 'b-v*-patch*','feature-*'] + push: + branches: [main, 'b-v*-patch*','feature-*'] + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + INFORMATIONAL_VERSION: "7.2" + BUILD_INCREMENTER: "-41" + AZURE_ARTIFACT_URL: "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json" + AZURE_ARTIFACT_NUGET_KEY: ${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }} + VSS_NUGET_EXTERNAL_FEED_ENDPOINTS : '{"endpointCredentials": [{"endpoint": "https://pkgs.dev.azure.com/ed-fi-alliance/Ed-Fi-Alliance-OSS/_packaging/EdFi/nuget/v3/index.json","password": "${{ secrets.AZURE_ARTIFACTS_PERSONAL_ACCESS_TOKEN }}"}]}' + CONFIGURATION: "Release" + REPOSITORY_DISPATCH_BRANCH: ${{ github.event.client_payload.branch }} + HEAD_REF: ${{ GITHUB.HEAD_REF }} + REF_NAME: ${{ GITHUB.REF_NAME }} + REPOSITORY_OWNER: ${{ GITHUB.REPOSITORY_OWNER }} + +jobs: + build: + + runs-on: windows-latest + steps: + - name: Check for Azure token + if: ${{ env.REPOSITORY_OWNER == 'Ed-Fi-Alliance-OSS' && env.AZURE_ARTIFACT_NUGET_KEY == '' }} + run: | + echo "::error::Missing Azure Token" + exit 1 + - name: Support longpaths + run: git config --system core.longpaths true + - name: Checkout Ed-Fi-ODS + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS + path: Ed-Fi-ODS/ + - name: Checkout Ed-Fi-ODS-Implementation + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 + with: + repository: Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation + path: Ed-Fi-ODS-Implementation/ + - name: Setup MSBuild for .NET Framework 4.8 + uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce #v2.0.0 + - name: Cache Nuget packages + uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 #v3.2.3 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj*', '**/configuration.packages.json') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: update BUILD_INCREMENTER + run: | + $newRevision = ([int]${{ github.run_number }}) + ([int]${{env.BUILD_INCREMENTER}}) + if ($newRevision -lt 0) { + $newRevision = 1 + echo "BUILD_INCREMENTER=$newRevision">> $env:GITHUB_ENV + } + shell: powershell + - name: Update version number in source.extension.vsixmanifest file + working-directory: ./Ed-Fi-ODS/ + run: | + $BuildCounter = ${{ github.run_number }} + $BuildIncrementer = ${{env.BUILD_INCREMENTER}} + $InformationalVersion = ${{ env.INFORMATIONAL_VERSION}} + $newRevision = ([int]$BuildCounter) + ([int]$BuildIncrementer) + $version = "$InformationalVersion.$newRevision" + Write-Host "ODS/API Version : $version" + $vsixManifestPath = "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/source.extension.vsixmanifest" + $vsixManifestContent = Get-Content $vsixManifestPath -Raw + + # Use regex to find the first tag and extract the Version attribute value + $versionRegex = ']*\sVersion="([^"]+)"' + $match = [regex]::Match($vsixManifestContent, $versionRegex) + if ($match.Success) { + $currentVersion = $match.Groups[1].Value + Write-Host "Current Version: $currentVersion" + + # Update the Version attribute with a new value + $newVersion = $version + $updatedContent = $vsixManifestContent -replace "$versionRegex", (' tag." + } + shell: powershell + - name: Restore NuGet packages + working-directory: ./Ed-Fi-ODS/ + run: msbuild "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.sln" /t:Restore + shell: powershell + - name: build + run: msbuild "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.sln" /p:Configuration=${{ env.CONFIGURATION }} + shell: powershell + - name: pack using nuget nuspec file + working-directory: ./Ed-Fi-ODS/ + shell: powershell + run: | + .\build.githubactions.ps1 pack -Configuration ${{ env.CONFIGURATION }} -InformationalVersion ${{ env.INFORMATIONAL_VERSION}} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" -NuspecFilePath "$env:GITHUB_WORKSPACE/Ed-Fi-ODS/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec" + - name: Install-credential-handler + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 InstallCredentialHandler + shell: powershell + - name: publish + if: ${{ env.AZURE_ARTIFACT_NUGET_KEY != '' && github.event_name == 'workflow_dispatch' }} + working-directory: ./Ed-Fi-ODS/ + run: | + .\build.githubactions.ps1 publish -InformationalVersion ${{ env.INFORMATIONAL_VERSION }} -BuildCounter ${{ github.run_number }} -BuildIncrementer ${{env.BUILD_INCREMENTER}} -NuGetApiKey ${{ env.AZURE_ARTIFACT_NUGET_KEY }} -EdFiNuGetFeed ${{env.AZURE_ARTIFACT_URL}} -PackageName "EdFi.Suite3.ProjectTemplates.Installer" + shell: powershell + - name: Upload EdFi.Suite3.ProjectTemplates.Installer Artifacts + if: success() + uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 + with: + name: NugetPackages.Artifacts + path: ${{ github.workspace }}/Ed-Fi-ODS/NugetPackages/*.nupkg \ No newline at end of file diff --git a/Application/EdFi.Ods.Api/Startup/OdsStartupBase.cs b/Application/EdFi.Ods.Api/Startup/OdsStartupBase.cs index a4473edc2a..87b7f76a1b 100644 --- a/Application/EdFi.Ods.Api/Startup/OdsStartupBase.cs +++ b/Application/EdFi.Ods.Api/Startup/OdsStartupBase.cs @@ -444,7 +444,7 @@ private string GetPluginFolder(Plugin pluginSettings) } // in a developer environment the plugin folder is relative to the WebApi project - // "Ed-Fi-ODS-Implementation/Application/EdFi.Ods.WebApi/bin/Debug/net6.0/../../../" => "Ed-Fi-ODS-Implementation/Application/EdFi.Ods.WebApi" + // "Ed-Fi-ODS-Implementation/Application/EdFi.Ods.WebApi/bin/Debug/net8.0/../../../" => "Ed-Fi-ODS-Implementation/Application/EdFi.Ods.WebApi" var projectDirectory = Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory!, "../../../")); var relativeToProject = Path.GetFullPath(Path.Combine(projectDirectory, pluginSettings.Folder)); diff --git a/Utilities/CodeGeneration/README.md b/Utilities/CodeGeneration/README.md index c4aa9c8cf0..717ba89aa4 100644 --- a/Utilities/CodeGeneration/README.md +++ b/Utilities/CodeGeneration/README.md @@ -14,12 +14,9 @@ Ed-Fi ODS software developers and implementers. ## Prerequisites To build the application the following tools are needed: -* .NET 6 SDK (https://dotnet.microsoft.com/download) +* .NET 8 SDK (https://dotnet.microsoft.com/download) * Visual Studio 2022 (https://visualstudio.microsoft.com/downloads/) ## Testing the generated artifacts against the main solution * Run `initdev` on the main solution first * run `Rebuild-Solution` or `initdev -NoCodegen` - -## Known issues -* must use Visual Studio 2022+ net6 is not compatible with Visual Studio 2019 diff --git a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Composites/EdFi.ProjectTemplates.Composites.csproj b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Composites/EdFi.ProjectTemplates.Composites.csproj index 6d12506fb0..d767b2e86b 100644 --- a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Composites/EdFi.ProjectTemplates.Composites.csproj +++ b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Composites/EdFi.ProjectTemplates.Composites.csproj @@ -66,9 +66,6 @@ 4 - - False - diff --git a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Extensions/EdFi.ProjectTemplates.Extensions.csproj b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Extensions/EdFi.ProjectTemplates.Extensions.csproj index 33b1aa18bd..051ce1f3ec 100644 --- a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Extensions/EdFi.ProjectTemplates.Extensions.csproj +++ b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Extensions/EdFi.ProjectTemplates.Extensions.csproj @@ -66,9 +66,6 @@ 4 - - False - diff --git a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.csproj b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.csproj index 6daf625718..07bf12a09e 100644 --- a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.csproj +++ b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.csproj @@ -63,6 +63,9 @@ Designer + Always + extension.vsixmanifest + true diff --git a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec new file mode 100644 index 0000000000..a1ea3b1ab6 --- /dev/null +++ b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/EdFi.ProjectTemplates.Installer.nuspec @@ -0,0 +1,19 @@ + + + + EdFi.Suite3.ProjectTemplates.Installer + 0.0.0 + Ed-Fi Alliance + Ed-Fi Alliance + $copyright$ + https://github.com/Ed-Fi-Alliance-OSS/Ed-Fi-ODS + false + EdFi.Suite3.ProjectTemplates.Installer + + LICENSE.txt + + + + + + diff --git a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/source.extension.vsixmanifest b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/source.extension.vsixmanifest index 549d3a1517..e9e73d405e 100644 --- a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/source.extension.vsixmanifest +++ b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Installer/source.extension.vsixmanifest @@ -1,10 +1,10 @@ - + - + Ed-Fi Alliance Project Templates - Ed-Fi Alliance API C# project templates for creating composites, profiles, and/or extensions to work with ODS/API v7.1 + Ed-Fi Alliance API C# project templates for creating composites, profiles, and/or extensions to work with ODS/API v7.2 https://www.ed-fi.org LICENSE.txt Release Notes.rtf diff --git a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Profiles/EdFi.ProjectTemplates.Profiles.csproj b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Profiles/EdFi.ProjectTemplates.Profiles.csproj index 2d098fd3a8..ad4231533f 100644 --- a/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Profiles/EdFi.ProjectTemplates.Profiles.csproj +++ b/Utilities/VisualStudioProjectTemplates/EdFi.ProjectTemplates.Profiles/EdFi.ProjectTemplates.Profiles.csproj @@ -66,9 +66,6 @@ 4 - - False - diff --git a/build.githubactions.ps1 b/build.githubactions.ps1 index 57f9cdba3e..c19bb78c14 100644 --- a/build.githubactions.ps1 +++ b/build.githubactions.ps1 @@ -234,22 +234,23 @@ function Get-IsWindows { function InstallCredentialHandler { if (Get-IsWindows -and -not Get-InstalledModule | Where-Object -Property Name -eq "7Zip4Powershell") { Install-Module -Force -Scope CurrentUser -Name 7Zip4Powershell + Write-Host "Installed 7Zip4Powershell." } # using WebClient is faster then Invoke-WebRequest but shows no progress $sourceUrl = ' https://github.com/microsoft/artifacts-credprovider/releases/download/v1.0.0/Microsoft.NuGet.CredentialProvider.zip' $fileName = 'Microsoft.NuGet.CredentialProvider.zip' $zipFilePath = Join-Path ([IO.Path]::GetTempPath()) $fileName - Write-host "Downloading file from $sourceUrl..." + Write-Host "Downloading file from $sourceUrl..." $webClient = New-Object System.Net.WebClient $webClient.DownloadFile($sourceUrl, $zipFilePath) - Write-host "Download complete." + Write-Host "Download complete." if (-not (Test-Path $zipFilePath)) { Write-Warning "Microsoft.NuGet.CredentialProvider file '$fileName' not found." exit 0 } $packageFolder = Join-Path ([IO.Path]::GetTempPath()) 'Microsoft.NuGet.CredentialProvider/' if ($fileName.EndsWith('.zip')) { - Write-host "Extracting $fileName..." + Write-Host "Extracting $fileName..." if (Test-Path $zipFilePath) { Expand-Archive -Force -Path $zipFilePath -DestinationPath $packageFolder } Copy-Item -Path $packageFolder\* -Destination "~/.nuget/" -Recurse -Force