I keep getting the following error on the pipeline when trying to do "dotnet publish". I'm trying to run this on an ubuntu environment.
This is the full error line:
/home/vsts/.nuget/packages/stylecop.msbuild/6.2.0/build/StyleCop.MSBuild.targets(101,5): error MSB4062: The "StyleCopTask" task could not be loaded from the assembly /home/vsts/.nuget/packages/stylecop.msbuild/6.2.0/build/../tools/StyleCop.dll. Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified. [/home/vsts/work/1/s/src/MyServiceManager.NotificationService.API/MyServiceManager.NotificationService.API.csproj]
Any idea what's up with StyleCop?
Build on local machine is fine. Build on Azure pipeline breaks.
Tried changing StyleCop.MSBuild versions. Tried changing to MSBuild instead of "dotnet" command