From 266df9478f481e3014ce8ef3a772a6c00144e5dd Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 10:37:41 -0500 Subject: [PATCH 01/18] add Akka.Analyzers install canary --- .github/workflows/pr_validation.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index d372e17..56792b4 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -53,4 +53,16 @@ jobs: fi - name: "dotnet pack" - run: dotnet pack -c Release \ No newline at end of file + run: dotnet pack -c Release -o /bin/nuget + + - name: "Create .NET Framework Console App and Install Akka.Analyzers" + if: matrix.os == 'windows-latest' + shell: pwsh + run: | + # Create a new .NET Framework 4.8 console application + dotnet new console -o DotNetFrameworkApp -f net48 + cd DotNetFrameworkApp + + # Install Akka.Analyzers from the local NuGet source + dotnet nuget add source ../bin/nuget -n local + dotnet add package Akka.Analyzers --source local \ No newline at end of file From dc1cedf14ee2b58900af2a2d74b36c9b5bff00f6 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 10:42:50 -0500 Subject: [PATCH 02/18] fix pack instructions --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 56792b4..788c86a 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -53,7 +53,7 @@ jobs: fi - name: "dotnet pack" - run: dotnet pack -c Release -o /bin/nuget + run: dotnet pack -c Release -o ./bin/nuget - name: "Create .NET Framework Console App and Install Akka.Analyzers" if: matrix.os == 'windows-latest' From 3126bd984c3825b1784d4c56e038b998cf6c9188 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 10:50:54 -0500 Subject: [PATCH 03/18] fix issues with .NET 4.8 TFM --- .github/workflows/pr_validation.yaml | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 788c86a..74b65da 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -59,10 +59,25 @@ jobs: if: matrix.os == 'windows-latest' shell: pwsh run: | - # Create a new .NET Framework 4.8 console application - dotnet new console -o DotNetFrameworkApp -f net48 + # Create a directory for the .NET Framework app + mkdir DotNetFrameworkApp cd DotNetFrameworkApp - - # Install Akka.Analyzers from the local NuGet source + + # Create a new .NET Framework 4.8 console application manually + echo " + + + Exe + net48 + +" > DotNetFrameworkApp.csproj + + # Restore and build the project + dotnet restore + dotnet build + + # Add the local NuGet source dotnet nuget add source ../bin/nuget -n local + + # Install Akka.Analyzers package dotnet add package Akka.Analyzers --source local \ No newline at end of file From 181a58c21e6ba1bdce0c06613fde25eea27fcbb1 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 10:55:03 -0500 Subject: [PATCH 04/18] fix YAML --- .github/workflows/pr_validation.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 74b65da..607294f 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -65,12 +65,12 @@ jobs: # Create a new .NET Framework 4.8 console application manually echo " - - - Exe - net48 - -" > DotNetFrameworkApp.csproj + + + Exe + net48 + + " > DotNetFrameworkApp.csproj # Restore and build the project dotnet restore From 17e4ea77da029fe564b8eeb03de452660e8210ff Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 10:56:26 -0500 Subject: [PATCH 05/18] fix nuget source path --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 607294f..b0d25ee 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -77,7 +77,7 @@ jobs: dotnet build # Add the local NuGet source - dotnet nuget add source ../bin/nuget -n local + dotnet nuget add source ./bin/nuget -n local # Install Akka.Analyzers package dotnet add package Akka.Analyzers --source local \ No newline at end of file From b78460b3447c6a04425a37376be5d6de33c3ae7e Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 10:57:17 -0500 Subject: [PATCH 06/18] go back to `dotnet new` template --- .github/workflows/pr_validation.yaml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index b0d25ee..7f1ebe5 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -59,25 +59,20 @@ jobs: if: matrix.os == 'windows-latest' shell: pwsh run: | - # Create a directory for the .NET Framework app - mkdir DotNetFrameworkApp + # Create a new .NET Core console application + dotnet new console -o DotNetFrameworkApp cd DotNetFrameworkApp - # Create a new .NET Framework 4.8 console application manually - echo " - - - Exe - net48 - - " > DotNetFrameworkApp.csproj + # Modify the TargetFramework to net48 + $projectFile = 'DotNetFrameworkApp.csproj' + (Get-Content $projectFile) -replace '[^<]*', 'net48' | Set-Content $projectFile # Restore and build the project dotnet restore dotnet build # Add the local NuGet source - dotnet nuget add source ./bin/nuget -n local + dotnet nuget add source ../bin/nuget -n local # Install Akka.Analyzers package dotnet add package Akka.Analyzers --source local \ No newline at end of file From b6b29d7efa03a243a319fdb399c651e242e0840b Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 11:06:55 -0500 Subject: [PATCH 07/18] don't use top-level statements --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 7f1ebe5..1c643ed 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -60,7 +60,7 @@ jobs: shell: pwsh run: | # Create a new .NET Core console application - dotnet new console -o DotNetFrameworkApp + dotnet new console -o DotNetFrameworkApp --use-program-main cd DotNetFrameworkApp # Modify the TargetFramework to net48 From fe8562160effb940165dee37c94f6ef3cf185a97 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 11:17:06 -0500 Subject: [PATCH 08/18] fix --- .github/workflows/pr_validation.yaml | 34 +++++++++++++++++++++------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 1c643ed..8d9c7fe 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -55,24 +55,42 @@ jobs: - name: "dotnet pack" run: dotnet pack -c Release -o ./bin/nuget - - name: "Create .NET Framework Console App and Install Akka.Analyzers" + - name: "Create .NET Framework Console App and Install Akka.Analyzers" if: matrix.os == 'windows-latest' shell: pwsh run: | - # Create a new .NET Core console application - dotnet new console -o DotNetFrameworkApp --use-program-main + # Add the local NuGet source + dotnet nuget add source ./bin/nuget -n local + + # Create a directory for the .NET Framework app + mkdir DotNetFrameworkApp cd DotNetFrameworkApp - # Modify the TargetFramework to net48 - $projectFile = 'DotNetFrameworkApp.csproj' - (Get-Content $projectFile) -replace '[^<]*', 'net48' | Set-Content $projectFile + # Create a new .NET Framework 4.8 console application manually + echo " + + + Exe + net48 + 7.3 + + " > DotNetFrameworkApp.csproj + + # Create a basic Program.cs file + echo "using System; + class Program + { + static void Main() + { + Console.WriteLine(\"Hello, .NET Framework!\"); + } + }" > Program.cs # Restore and build the project dotnet restore dotnet build - # Add the local NuGet source - dotnet nuget add source ../bin/nuget -n local + # Install Akka.Analyzers package dotnet add package Akka.Analyzers --source local \ No newline at end of file From d7794edee6fcf46951c7e2ac39dd21e4a462cd21 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 11:19:44 -0500 Subject: [PATCH 09/18] sdfsdf --- .github/workflows/pr_validation.yaml | 34 +++++++++++++--------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 8d9c7fe..346cf65 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -59,38 +59,36 @@ jobs: if: matrix.os == 'windows-latest' shell: pwsh run: | - # Add the local NuGet source - dotnet nuget add source ./bin/nuget -n local - # Create a directory for the .NET Framework app mkdir DotNetFrameworkApp cd DotNetFrameworkApp # Create a new .NET Framework 4.8 console application manually echo " - - - Exe - net48 - 7.3 - - " > DotNetFrameworkApp.csproj + + + Exe + net48 + 7.3 + +" > DotNetFrameworkApp.csproj # Create a basic Program.cs file echo "using System; - class Program - { - static void Main() - { - Console.WriteLine(\"Hello, .NET Framework!\"); - } - }" > Program.cs +class Program +{ + static void Main() + { + Console.WriteLine(\"Hello, .NET Framework!\"); + } +}" > Program.cs # Restore and build the project dotnet restore dotnet build - + # Add the local NuGet source + dotnet nuget add source ../bin/nuget -n local # Install Akka.Analyzers package dotnet add package Akka.Analyzers --source local \ No newline at end of file From 4ed5084d313a3d54e594680a37b318a37142ccb9 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 11:20:23 -0500 Subject: [PATCH 10/18] sdfsdf --- .github/workflows/pr_validation.yaml | 36 +++++++++++++++------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 346cf65..b02c5f8 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -55,40 +55,42 @@ jobs: - name: "dotnet pack" run: dotnet pack -c Release -o ./bin/nuget - - name: "Create .NET Framework Console App and Install Akka.Analyzers" + - name: "Create .NET Framework Console App and Install Akka.Analyzers" if: matrix.os == 'windows-latest' shell: pwsh run: | + # Add the local NuGet source + dotnet nuget add source ./bin/nuget -n local + # Create a directory for the .NET Framework app mkdir DotNetFrameworkApp cd DotNetFrameworkApp # Create a new .NET Framework 4.8 console application manually echo " - - - Exe - net48 - 7.3 - -" > DotNetFrameworkApp.csproj + + + Exe + net48 + 7.3 + + " > DotNetFrameworkApp.csproj # Create a basic Program.cs file echo "using System; -class Program -{ - static void Main() - { - Console.WriteLine(\"Hello, .NET Framework!\"); - } -}" > Program.cs + class Program + { + static void Main() + { + Console.WriteLine(\"Hello, .NET Framework!\"); + } + }" > Program.cs # Restore and build the project dotnet restore dotnet build - # Add the local NuGet source - dotnet nuget add source ../bin/nuget -n local + # Install Akka.Analyzers package dotnet add package Akka.Analyzers --source local \ No newline at end of file From 56dd43fe63a6d4083603b18efb641b728dfc6307 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 11:28:01 -0500 Subject: [PATCH 11/18] escape content correctly --- .github/workflows/pr_validation.yaml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index b02c5f8..247d706 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -59,38 +59,41 @@ jobs: if: matrix.os == 'windows-latest' shell: pwsh run: | - # Add the local NuGet source - dotnet nuget add source ./bin/nuget -n local - # Create a directory for the .NET Framework app mkdir DotNetFrameworkApp cd DotNetFrameworkApp # Create a new .NET Framework 4.8 console application manually - echo " - + $csprojContent = @" + Exe net48 7.3 - " > DotNetFrameworkApp.csproj + + "@ + $csprojContent | Out-File -Encoding utf8 -FilePath DotNetFrameworkApp.csproj # Create a basic Program.cs file - echo "using System; + $programContent = @" + using System; class Program { static void Main() { - Console.WriteLine(\"Hello, .NET Framework!\"); + Console.WriteLine(""Hello, .NET Framework!""); } - }" > Program.cs + } + "@ + $programContent | Out-File -Encoding utf8 -FilePath Program.cs # Restore and build the project dotnet restore dotnet build - + # Add the local NuGet source + dotnet nuget add source ../bin/nuget -n local # Install Akka.Analyzers package - dotnet add package Akka.Analyzers --source local \ No newline at end of file + dotnet add package Akka.Analyzers --source local From 8a4c871d1350730f0e85e1eb4321d7bf5ab31382 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 11:37:26 -0500 Subject: [PATCH 12/18] use a pre-built project --- .github/workflows/pr_validation.yaml | 32 +---------- akka.analyzers.sln | 9 +++ .../Akka.Analyzers.NetFxInstallCanary.csproj | 55 +++++++++++++++++++ .../Program.cs | 9 +++ .../Properties/AssemblyInfo.cs | 35 ++++++++++++ .../README.md | 5 ++ 6 files changed, 115 insertions(+), 30 deletions(-) create mode 100644 test/Akka.Analyzers.NetFxInstallCanary/Akka.Analyzers.NetFxInstallCanary.csproj create mode 100644 test/Akka.Analyzers.NetFxInstallCanary/Program.cs create mode 100644 test/Akka.Analyzers.NetFxInstallCanary/Properties/AssemblyInfo.cs create mode 100644 test/Akka.Analyzers.NetFxInstallCanary/README.md diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 247d706..91a3a66 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -55,39 +55,11 @@ jobs: - name: "dotnet pack" run: dotnet pack -c Release -o ./bin/nuget - - name: "Create .NET Framework Console App and Install Akka.Analyzers" + - name: "Install Akka.Analyzers into .NET Framework Canary" if: matrix.os == 'windows-latest' shell: pwsh + working-directory: ./test/Akka.Analyzers.NetFxInstallCanary run: | - # Create a directory for the .NET Framework app - mkdir DotNetFrameworkApp - cd DotNetFrameworkApp - - # Create a new .NET Framework 4.8 console application manually - $csprojContent = @" - - - Exe - net48 - 7.3 - - - "@ - $csprojContent | Out-File -Encoding utf8 -FilePath DotNetFrameworkApp.csproj - - # Create a basic Program.cs file - $programContent = @" - using System; - class Program - { - static void Main() - { - Console.WriteLine(""Hello, .NET Framework!""); - } - } - "@ - $programContent | Out-File -Encoding utf8 -FilePath Program.cs - # Restore and build the project dotnet restore dotnet build diff --git a/akka.analyzers.sln b/akka.analyzers.sln index 5b94451..8a91978 100644 --- a/akka.analyzers.sln +++ b/akka.analyzers.sln @@ -43,6 +43,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Analyzers.Fixes.Roslyn EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Analyzers.Tests.Roslyn46", "src\Akka.Analyzers.Tests.Roslyn46\Akka.Analyzers.Tests.Roslyn46.csproj", "{E164864D-0EC9-4E39-BECC-5141124CBF23}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Analyzers.NetFxInstallCanary", "test\Akka.Analyzers.NetFxInstallCanary\Akka.Analyzers.NetFxInstallCanary.csproj", "{13B048E3-D496-4F5E-BFF8-2305462171D1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{5A756BCD-6589-4369-9177-E3D3109E3AC9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -104,6 +108,10 @@ Global {E164864D-0EC9-4E39-BECC-5141124CBF23}.Debug|Any CPU.Build.0 = Debug|Any CPU {E164864D-0EC9-4E39-BECC-5141124CBF23}.Release|Any CPU.ActiveCfg = Release|Any CPU {E164864D-0EC9-4E39-BECC-5141124CBF23}.Release|Any CPU.Build.0 = Release|Any CPU + {13B048E3-D496-4F5E-BFF8-2305462171D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {13B048E3-D496-4F5E-BFF8-2305462171D1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {13B048E3-D496-4F5E-BFF8-2305462171D1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {13B048E3-D496-4F5E-BFF8-2305462171D1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {1C7E113D-4700-4DAB-9EC1-D3BE21E6CBCD} = {FF127ED4-CA50-445C-A533-0D36899966E6} @@ -115,5 +123,6 @@ Global {A856FB2B-8B4F-4738-8B96-B724CB9BAC2A} = {DE128A6B-CAF9-466F-B9D5-AC3CF12849F3} {1B09921A-448B-4308-912C-F9E48F333588} = {DE128A6B-CAF9-466F-B9D5-AC3CF12849F3} {E164864D-0EC9-4E39-BECC-5141124CBF23} = {DE128A6B-CAF9-466F-B9D5-AC3CF12849F3} + {13B048E3-D496-4F5E-BFF8-2305462171D1} = {5A756BCD-6589-4369-9177-E3D3109E3AC9} EndGlobalSection EndGlobal diff --git a/test/Akka.Analyzers.NetFxInstallCanary/Akka.Analyzers.NetFxInstallCanary.csproj b/test/Akka.Analyzers.NetFxInstallCanary/Akka.Analyzers.NetFxInstallCanary.csproj new file mode 100644 index 0000000..085e706 --- /dev/null +++ b/test/Akka.Analyzers.NetFxInstallCanary/Akka.Analyzers.NetFxInstallCanary.csproj @@ -0,0 +1,55 @@ + + + + + Debug + AnyCPU + {13B048E3-D496-4F5E-BFF8-2305462171D1} + Exe + Properties + Akka.Analyzers.NetFxInstallCanary + Akka.Analyzers.NetFxInstallCanary + v4.8 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + diff --git a/test/Akka.Analyzers.NetFxInstallCanary/Program.cs b/test/Akka.Analyzers.NetFxInstallCanary/Program.cs new file mode 100644 index 0000000..4e72725 --- /dev/null +++ b/test/Akka.Analyzers.NetFxInstallCanary/Program.cs @@ -0,0 +1,9 @@ +namespace Akka.Analyzers.NetFxInstallCanary +{ + internal class Program + { + public static void Main(string[] args) + { + } + } +} \ No newline at end of file diff --git a/test/Akka.Analyzers.NetFxInstallCanary/Properties/AssemblyInfo.cs b/test/Akka.Analyzers.NetFxInstallCanary/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c760402 --- /dev/null +++ b/test/Akka.Analyzers.NetFxInstallCanary/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +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("Akka.Analyzers.NetFxInstallCanary")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Akka.Analyzers.NetFxInstallCanary")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[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("13B048E3-D496-4F5E-BFF8-2305462171D1")] + +// 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")] \ No newline at end of file diff --git a/test/Akka.Analyzers.NetFxInstallCanary/README.md b/test/Akka.Analyzers.NetFxInstallCanary/README.md new file mode 100644 index 0000000..48a19d5 --- /dev/null +++ b/test/Akka.Analyzers.NetFxInstallCanary/README.md @@ -0,0 +1,5 @@ +# NET Framework Install Canary + +This is a basic C# project running on .NET Framework 4.8. In our Windows build pipeline we are going to attempt to install Akka.Analyzers from its NuGet output. This install will fail until https://github.com/akkadotnet/akka.net/issues/7307 is resolved. + +Do not modify this project or do anything else with it. \ No newline at end of file From 99486a448e5c7178f28195a326ee7c1686dcac3c Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 11:41:32 -0500 Subject: [PATCH 13/18] remove canary from the solution --- akka.analyzers.sln | 9 --------- 1 file changed, 9 deletions(-) diff --git a/akka.analyzers.sln b/akka.analyzers.sln index 8a91978..5b94451 100644 --- a/akka.analyzers.sln +++ b/akka.analyzers.sln @@ -43,10 +43,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Analyzers.Fixes.Roslyn EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Analyzers.Tests.Roslyn46", "src\Akka.Analyzers.Tests.Roslyn46\Akka.Analyzers.Tests.Roslyn46.csproj", "{E164864D-0EC9-4E39-BECC-5141124CBF23}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Analyzers.NetFxInstallCanary", "test\Akka.Analyzers.NetFxInstallCanary\Akka.Analyzers.NetFxInstallCanary.csproj", "{13B048E3-D496-4F5E-BFF8-2305462171D1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{5A756BCD-6589-4369-9177-E3D3109E3AC9}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -108,10 +104,6 @@ Global {E164864D-0EC9-4E39-BECC-5141124CBF23}.Debug|Any CPU.Build.0 = Debug|Any CPU {E164864D-0EC9-4E39-BECC-5141124CBF23}.Release|Any CPU.ActiveCfg = Release|Any CPU {E164864D-0EC9-4E39-BECC-5141124CBF23}.Release|Any CPU.Build.0 = Release|Any CPU - {13B048E3-D496-4F5E-BFF8-2305462171D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {13B048E3-D496-4F5E-BFF8-2305462171D1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {13B048E3-D496-4F5E-BFF8-2305462171D1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {13B048E3-D496-4F5E-BFF8-2305462171D1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {1C7E113D-4700-4DAB-9EC1-D3BE21E6CBCD} = {FF127ED4-CA50-445C-A533-0D36899966E6} @@ -123,6 +115,5 @@ Global {A856FB2B-8B4F-4738-8B96-B724CB9BAC2A} = {DE128A6B-CAF9-466F-B9D5-AC3CF12849F3} {1B09921A-448B-4308-912C-F9E48F333588} = {DE128A6B-CAF9-466F-B9D5-AC3CF12849F3} {E164864D-0EC9-4E39-BECC-5141124CBF23} = {DE128A6B-CAF9-466F-B9D5-AC3CF12849F3} - {13B048E3-D496-4F5E-BFF8-2305462171D1} = {5A756BCD-6589-4369-9177-E3D3109E3AC9} EndGlobalSection EndGlobal From 0c1b4642e9cde2c5a2dcbe03d03ff8bca2cb0d60 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 11:47:19 -0500 Subject: [PATCH 14/18] sdfsdf --- .github/workflows/pr_validation.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 91a3a66..8b4b1fe 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -67,5 +67,7 @@ jobs: # Add the local NuGet source dotnet nuget add source ../bin/nuget -n local + ls ../bin/nuget + # Install Akka.Analyzers package dotnet add package Akka.Analyzers --source local From 159d8273057deeb62a15fbc9242af837f86f64a9 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 11:52:36 -0500 Subject: [PATCH 15/18] fix path --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 8b4b1fe..6431bd0 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -65,7 +65,7 @@ jobs: dotnet build # Add the local NuGet source - dotnet nuget add source ../bin/nuget -n local + dotnet nuget add source ../../bin/nuget -n local ls ../bin/nuget From e0555c41d3a8cf618ebe9ee4fd799cb2783f17ed Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 12:01:14 -0500 Subject: [PATCH 16/18] sdfsdf --- .github/workflows/pr_validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index 6431bd0..f1799f2 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -67,7 +67,7 @@ jobs: # Add the local NuGet source dotnet nuget add source ../../bin/nuget -n local - ls ../bin/nuget + ls ../../bin/nuget # Install Akka.Analyzers package dotnet add package Akka.Analyzers --source local From b1a1637dfc126cad538d8dbca9a7288dedca1054 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 12:28:18 -0500 Subject: [PATCH 17/18] cleaning project --- localTest.ps1 | 22 +++++++++++++++++++ .../Akka.Analyzers.NetFxInstallCanary.csproj | 17 +++++++------- .../Directory.Build.props | 5 +++++ .../Directory.Packages.props | 5 +++++ .../nuget.config | 17 ++++++++++++++ 5 files changed, 57 insertions(+), 9 deletions(-) create mode 100644 localTest.ps1 create mode 100644 test/Akka.Analyzers.NetFxInstallCanary/Directory.Build.props create mode 100644 test/Akka.Analyzers.NetFxInstallCanary/Directory.Packages.props create mode 100644 test/Akka.Analyzers.NetFxInstallCanary/nuget.config diff --git a/localTest.ps1 b/localTest.ps1 new file mode 100644 index 0000000..590f0a7 --- /dev/null +++ b/localTest.ps1 @@ -0,0 +1,22 @@ +# Store the original working directory +$originalDir = Get-Location + +try { + dotnet pack -c Release -o ./bin/nuget + + cd ./test/Akka.Analyzers.NetFxInstallCanary + + # Install Akka.Analyzers package + dotnet add package Akka.Analyzers --source local + + # Restore and build the project + dotnet restore + dotnet build +} +catch { + Write-Error "An error occurred: $_" +} +finally { + # Return to the original directory + Set-Location $originalDir +} diff --git a/test/Akka.Analyzers.NetFxInstallCanary/Akka.Analyzers.NetFxInstallCanary.csproj b/test/Akka.Analyzers.NetFxInstallCanary/Akka.Analyzers.NetFxInstallCanary.csproj index 085e706..3afe7b4 100644 --- a/test/Akka.Analyzers.NetFxInstallCanary/Akka.Analyzers.NetFxInstallCanary.csproj +++ b/test/Akka.Analyzers.NetFxInstallCanary/Akka.Analyzers.NetFxInstallCanary.csproj @@ -1,7 +1,6 @@  - + Debug AnyCPU @@ -34,16 +33,16 @@ 4 - - - - + + + + - - + + - + + + + + + + + + + + + + + From c08bd240d4b6f001df550c5bd172ee9809f3763b Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 26 Jul 2024 12:29:14 -0500 Subject: [PATCH 18/18] fixes --- .github/workflows/pr_validation.yaml | 11 +++-------- localTest.ps1 | 3 ++- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr_validation.yaml b/.github/workflows/pr_validation.yaml index f1799f2..b1ac68b 100644 --- a/.github/workflows/pr_validation.yaml +++ b/.github/workflows/pr_validation.yaml @@ -60,14 +60,9 @@ jobs: shell: pwsh working-directory: ./test/Akka.Analyzers.NetFxInstallCanary run: | + # Install Akka.Analyzers package + dotnet add package Akka.Analyzers + # Restore and build the project dotnet restore dotnet build - - # Add the local NuGet source - dotnet nuget add source ../../bin/nuget -n local - - ls ../../bin/nuget - - # Install Akka.Analyzers package - dotnet add package Akka.Analyzers --source local diff --git a/localTest.ps1 b/localTest.ps1 index 590f0a7..6e260e9 100644 --- a/localTest.ps1 +++ b/localTest.ps1 @@ -7,7 +7,8 @@ try { cd ./test/Akka.Analyzers.NetFxInstallCanary # Install Akka.Analyzers package - dotnet add package Akka.Analyzers --source local + # package source mapping should force it to happen using local dir + dotnet add package Akka.Analyzers # Restore and build the project dotnet restore