SonarSource / sonar-dotnet

Code analyzer for C# and VB.NET projects
https://redirect.sonarsource.com/plugins/csharp.html
GNU Lesser General Public License v3.0
787 stars 227 forks source link

Fix error MSB4062 and add bUnit to peach #8170

Closed antonioaversa closed 3 months ago

antonioaversa commented 1 year ago

peachee-dotnet PRs:

Requirements

Projects selected

Green run on peach:

https://cirrus-ci.com/build/6148892283109376

antonioaversa commented 1 year ago

Current status: Last run on peach: https://cirrus-ci.com/build/5980137078915072 Both projects (bunit and PrivateProperty) fail with the following error:

C:\nuget\microsoft.build.tasks.git\1.1.1\build\Microsoft.Build.Tasks.Git.targets(25,5): 
error MSB4062: The "Microsoft.Build.Tasks.Git.LocateRepository" task could not be loaded from the assembly
C:\nuget\microsoft.build.tasks.git\1.1.1\build\..\tools\core\Microsoft.Build.Tasks.Git.dll. 
Assembly with same name is already loaded 
Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, 
and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
[C:\Project\src\bunit.web\bunit.web.csproj::TargetFramework=net8.0]

This is already happening on the peachee-dotnet analyses of master: e.g. in orchard-core and piranha-core.

C:\Program Files\dotnet\sdk\8.0.100-rc.2.23502.2\Sdks\Microsoft.Build.Tasks.Git\build\Microsoft.Build.Tasks.Git.targets(25,5):
error MSB4062: The "Microsoft.Build.Tasks.Git.LocateRepository" task could not be loaded from the assembly 
C:\Program Files\dotnet\sdk\8.0.100-rc.2.23502.2\Sdks\Microsoft.Build.Tasks.Git\build\..\tools\core\Microsoft.Build.Tasks.Git.dll.
Assembly with same name is already loaded
Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, 
and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Project\src\docs\OrchardCore.Docs.csproj::TargetFramework=net7.0]
antonioaversa commented 12 months ago

An internal background task was created, to follow up on this issue, that is non-blocking for MMF-3410

I have then removed the "MMF-3410" label from this issue, and added the "MMF-3457", since having bunit on peach will help peach validating the new rules for Blazor.

antonioaversa commented 3 months ago

This issue has been completed and moved to Done on Nov 6, 2023. image The integration should have moved closed the issue as well. Closing as completed.