From ca899f39902ab28d2fd392e80b3ce812e8f82491 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 6 Jan 2026 14:10:51 -0500 Subject: [PATCH] ci: removes outdated compilation files causing failure --- Build.props | 2 - Microsoft.OpenApi.OData.sln | 15 +-- tool/After.Common.targets | 105 --------------------- tool/Before.Common.targets | 27 ------ tool/Build.props | 30 ------ tool/GetNugetPackageMetadata.proj | 14 --- tool/PoliCheck/RunPoliCheck.ps1 | 34 ------- tool/UpdateDocs/Program.cs | 88 ----------------- tool/UpdateDocs/Properties/AssemblyInfo.cs | 36 ------- tool/UpdateDocs/UpdateDocs.csproj | 17 ---- tool/versioning.props | 52 ---------- 11 files changed, 2 insertions(+), 418 deletions(-) delete mode 100644 tool/After.Common.targets delete mode 100644 tool/Before.Common.targets delete mode 100644 tool/Build.props delete mode 100644 tool/GetNugetPackageMetadata.proj delete mode 100644 tool/PoliCheck/RunPoliCheck.ps1 delete mode 100644 tool/UpdateDocs/Program.cs delete mode 100644 tool/UpdateDocs/Properties/AssemblyInfo.cs delete mode 100644 tool/UpdateDocs/UpdateDocs.csproj delete mode 100644 tool/versioning.props diff --git a/Build.props b/Build.props index 2bf36d011..16042ae9d 100644 --- a/Build.props +++ b/Build.props @@ -15,6 +15,4 @@ $(MSBuildThisFileDirectory.TrimEnd('\')) - - diff --git a/Microsoft.OpenApi.OData.sln b/Microsoft.OpenApi.OData.sln index a385330dc..085f0a157 100644 --- a/Microsoft.OpenApi.OData.sln +++ b/Microsoft.OpenApi.OData.sln @@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30907.101 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.OData.Reader", "src\Microsoft.OpenApi.OData.Reader\Microsoft.OpenAPI.OData.Reader.csproj", "{FF3ACD93-19E0-486C-9C0F-FA1C2E7FC8C2}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenAPI.OData.Reader", "src\Microsoft.OpenApi.OData.Reader\Microsoft.OpenAPI.OData.Reader.csproj", "{FF3ACD93-19E0-486C-9C0F-FA1C2E7FC8C2}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenApi.OData.Reader.Tests", "test\Microsoft.OpenAPI.OData.Reader.Tests\Microsoft.OpenAPI.OData.Reader.Tests.csproj", "{90A98718-75EB-4E2B-A51E-66ACF66F15B4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.OpenAPI.OData.Reader.Tests", "test\Microsoft.OpenAPI.OData.Reader.Tests\Microsoft.OpenAPI.OData.Reader.Tests.csproj", "{90A98718-75EB-4E2B-A51E-66ACF66F15B4}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OoasUtil", "src\OoasUtil\OoasUtil.csproj", "{2D06C660-B550-432C-8062-D4070F7C371F}" EndProject @@ -16,10 +16,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tool", "tool", "{DE8F8E75-A119-4CF3-AFDD-4132B55DAE76}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UpdateDocs", "tool\UpdateDocs\UpdateDocs.csproj", "{AAC31ECB-05F9-444A-9B86-42ECD50AA468}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -42,10 +38,6 @@ Global {79B190E8-EDB0-4C03-8FD8-EB48E4807CFB}.Debug|Any CPU.Build.0 = Debug|Any CPU {79B190E8-EDB0-4C03-8FD8-EB48E4807CFB}.Release|Any CPU.ActiveCfg = Release|Any CPU {79B190E8-EDB0-4C03-8FD8-EB48E4807CFB}.Release|Any CPU.Build.0 = Release|Any CPU - {AAC31ECB-05F9-444A-9B86-42ECD50AA468}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AAC31ECB-05F9-444A-9B86-42ECD50AA468}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AAC31ECB-05F9-444A-9B86-42ECD50AA468}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AAC31ECB-05F9-444A-9B86-42ECD50AA468}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -53,7 +45,4 @@ Global GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9AE22713-F94E-45CA-81F4-0806CA195B69} EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {AAC31ECB-05F9-444A-9B86-42ECD50AA468} = {DE8F8E75-A119-4CF3-AFDD-4132B55DAE76} - EndGlobalSection EndGlobal diff --git a/tool/After.Common.targets b/tool/After.Common.targets deleted file mode 100644 index 6bad46e4a..000000000 --- a/tool/After.Common.targets +++ /dev/null @@ -1,105 +0,0 @@ - - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - - - GenerateAssemblyAttributeFile; - ExcludeAssemblyFilesFromSourceAnalysis; - $(BuildDependsOn); - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - UNDEFINED_GenerateAssemblyAttributeTemplate - -using System.Reflection; -using System.Resources; - -[assembly: AssemblyDescription("%AssemblyNameFull%")] -[assembly: AssemblyTitle("%AssemblyNameFull%")] -[assembly: AssemblyDefaultAlias("%AssemblyNameFull%")] -[assembly: AssemblyFileVersion("%VersionFull%")] -[assembly: AssemblyInformationalVersion("%VersionFull%")] -[assembly: AssemblyVersion("%VersionFullSemantic%")] -[assembly: SatelliteContractVersion("%VersionFull%")] -[assembly: AssemblyMetadata("Serviceable", "True")] - - - - - - $(GenerateAssemblyAttributeTemplateCSharp) - - - - $(IntermediateOutputPath.TrimEnd("\\"))\OpenApiODataAssemblyAttributes$(DefaultLanguageSourceExtension) - $(AssemblyName)$(TargetExt) - $([System.String]::Copy('$(GenerateAssemblyAttributeTemplate)').Replace("%25AssemblyNameFull%25",$(AssemblyNameFull)).Replace("%25VersionFull%25",$(VersionFull)).Replace("%25VersionFullSemantic%25",$(VersionFullSemantic))) - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tool/Before.Common.targets b/tool/Before.Common.targets deleted file mode 100644 index a54c3e71b..000000000 --- a/tool/Before.Common.targets +++ /dev/null @@ -1,27 +0,0 @@ - - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - $(VersionRunBeforeTargets);CoreCompile - - $(EnlistmentRoot)\src\AssemblyInfo - - AssemblyInfoCommon$(DefaultLanguageSourceExtension) - - - - - - true - $(AssemblyInfoCommonFile) - - - - diff --git a/tool/Build.props b/tool/Build.props deleted file mode 100644 index 3403d53e2..000000000 --- a/tool/Build.props +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - - - $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root)) - - $(EnlistmentRoot)\tool - - - - - - - - $(MSBuildThisFileDirectory)Before.Common.targets - - $(MSBuildThisFileDirectory)After.Common.targets - - - diff --git a/tool/GetNugetPackageMetadata.proj b/tool/GetNugetPackageMetadata.proj deleted file mode 100644 index 5f120f9ac..000000000 --- a/tool/GetNugetPackageMetadata.proj +++ /dev/null @@ -1,14 +0,0 @@ - - - - $([System.DateTime]::Now.ToString("yyyyMMddHHmm")) - - - - - - - - - - \ No newline at end of file diff --git a/tool/PoliCheck/RunPoliCheck.ps1 b/tool/PoliCheck/RunPoliCheck.ps1 deleted file mode 100644 index 3eb663fbd..000000000 --- a/tool/PoliCheck/RunPoliCheck.ps1 +++ /dev/null @@ -1,34 +0,0 @@ -param( - [string]$BuildSourceDir, - [string]$folderName, - [string]$branchName, - [string]$resultRoot, - [string]$PoliCheckPath -) - -# -#Example: -# RunPoliCheck.ps1 -BuildSourceDir "C:\BuildAgent\_work\32\s" -# -folderName "src" -# -branchName "odata.net-main" -# -resultRoot "C:\Users\ODatabld\Documents\PoliCheck\LatestRunResult" -# -PoliCheckPath "C:\Program Files (x86)\Microsoft\PoliCheck\" -# - -$targetPath= "${BuildSourceDir}\${folderName}" -Write-Output "targetPath: ${targetPath}" -$result="${resultRoot}\${branchName}\poli_result_${folderName}.xml" - -cd "${PoliCheckPath}" - -.\Policheck.exe /F:$targetPath /T:9 /Sev:"1|2" /PE:2 /O:$result - -$FileContent = Get-Content $result -$PassResult = Select-String -InputObject $FileContent -Pattern "" - -If ($PassResult.Matches.Count -eq 0) { - Write-Error "PoliCheck failed for target ${targetPath}. For details, please check this result file on build machine: ${result}: section ." - exit 1 -} - -Write-Output "PoliCheck pass for target ${targetPath}" \ No newline at end of file diff --git a/tool/UpdateDocs/Program.cs b/tool/UpdateDocs/Program.cs deleted file mode 100644 index 22cad7999..000000000 --- a/tool/UpdateDocs/Program.cs +++ /dev/null @@ -1,88 +0,0 @@ -//--------------------------------------------------------------------- -// -// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information. -// -//--------------------------------------------------------------------- - -using System; -using System.IO; -using System.Xml.Linq; -using Microsoft.OData.Edm; -using Microsoft.OData.Edm.Csdl; -using Microsoft.OpenApi; -using Microsoft.OpenApi.OData; -using System.Threading.Tasks; - -namespace UpdateDocs -{ - class Program - { - static async Task Main(string[] args) - { - // we assume the path are existed for simplicity. - string path = Directory.GetCurrentDirectory(); - string parentPath = Path.Combine(path, "..", "..", "..", "..", ".."); - string csdl = Path.Combine(parentPath, "docs", "csdl"); - string oas20 = Path.Combine(parentPath, "docs", "oas_2_0"); - string oas30 = Path.Combine(parentPath, "docs", "oas3_0_0"); - string oas31 = Path.Combine(parentPath, "docs", "oas3_1_0"); - - foreach (var filePath in Directory.GetFiles(csdl, "*.xml")) - { - Console.WriteLine(filePath); - - IEdmModel model = await LoadEdmModelAsync(filePath); - if (model == null) - { - continue; - } - - FileInfo fileInfo = new FileInfo(filePath); - string fileName = fileInfo.Name.Substring(0, fileInfo.Name.Length - 4); - - OpenApiConvertSettings settings = new OpenApiConvertSettings(); - if (fileName.Contains("graph.beta")) - { - settings.PrefixEntityTypeNameBeforeKey = true; - settings.ServiceRoot = new Uri("https://graph.microsoft.com/beta"); - } - else if (fileName.Contains("graph1.0")) - { - settings.PrefixEntityTypeNameBeforeKey = true; - settings.ServiceRoot = new Uri("https://graph.microsoft.com/v1.0"); - } - - settings.EnableKeyAsSegment = true; - settings.EnableUnqualifiedCall = true; - var output = Path.Combine(oas31, fileName + ".json"); - var document = model.ConvertToOpenApi(settings); - await File.WriteAllTextAsync(output, await document.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_1)); - - output = Path.Combine(oas30, fileName + ".json"); - await File.WriteAllTextAsync(output, await document.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi3_0)); - - output = Path.Combine(oas20, fileName + ".json"); - await File.WriteAllTextAsync(output, await document.SerializeAsJsonAsync(OpenApiSpecVersion.OpenApi2_0)); - - Console.WriteLine("Output [ " + fileName + " ] Successful!"); - } - - Console.WriteLine("\n==> All Done!"); - return 0; - } - - private static async Task LoadEdmModelAsync(string file) - { - try - { - string csdl = await File.ReadAllTextAsync(file); - return CsdlReader.Parse(XElement.Parse(csdl).CreateReader()); - } - catch - { - Console.WriteLine("Cannot load EDM from file: " + file); - return null; - } - } - } -} diff --git a/tool/UpdateDocs/Properties/AssemblyInfo.cs b/tool/UpdateDocs/Properties/AssemblyInfo.cs deleted file mode 100644 index 89d8a5d5c..000000000 --- a/tool/UpdateDocs/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("UpdateDocs")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("UpdateDocs")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6d5453c2-e35f-4cc6-b774-4c676f5f33d1")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/tool/UpdateDocs/UpdateDocs.csproj b/tool/UpdateDocs/UpdateDocs.csproj deleted file mode 100644 index d0d903dd8..000000000 --- a/tool/UpdateDocs/UpdateDocs.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - net8.0 - Exe - false - - - - - - - - - - - - \ No newline at end of file diff --git a/tool/versioning.props b/tool/versioning.props deleted file mode 100644 index b6bd275bc..000000000 --- a/tool/versioning.props +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - 1 - 0 - 9 - - - - - - [1.2.3, 2.0.0) - [7.10.0, 8.0.0) - - - - - 2020 - - - $([System.Convert]::ToInt32('$([MSBuild]::Add(1, $([MSBuild]::Subtract($([System.DateTime]::Now.Year), $(VersionStartYear)))))$([System.DateTime]::Now.ToString("MMdd"))')) - - $([System.Convert]::ToString($(VersionDateCode))) - - - - - $(VersionMajor).$(VersionMinor).$(VersionBuild) - $(VersionFullSemantic).$(VersionRevision) - - - - - $(VersionFullSemantic) - $(VersionFullSemantic)-$(VersionRelease) - - -