Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzers not getting restored with build of .net8 project on Dev-ops #376

Open
sona-jain opened this issue Jun 19, 2024 · 1 comment
Open

Comments

@sona-jain
Copy link

sona-jain commented Jun 19, 2024

I have a .net 8 project and I am trying to setup build pipeline for it. It builds fine on my local setup in VS. However the build pipeline on Azure fails with following erros:

CoreCompile:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /unsafe- /checked- /nowarn:1591,1701,1702 /fullpaths /nostdlib+ /platform:x64 /errorreport:prompt /doc:bin\Utils.XML /define:TRACE;RELEASE;NETSTANDARD;NETSTANDARD2_0;NETSTANDARD1_0_OR_GREATER;NETSTANDARD1_1_OR_GREATER;NETSTANDARD1_2_OR_GREATER;NETSTANDARD1_3_OR_GREATER;NETSTANDARD1_4_OR_GREATER;NETSTANDARD1_5_OR_GREATER;NETSTANDARD1_6_OR_GREATER;NETSTANDARD2_0_OR_GREATER /highentropyva+ /nullable:disable /reference:D:\a\1\s\Runtime\packages\azure.core.amqp\1.2.0\lib\netstandard2.0\Azure.Core.Amqp.dll
.
.
.
/reference:D:\a\1\s\Runtime\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\System.Xml.dll /reference:D:\a\1\s\Runtime\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\System.Xml.Linq.dll /reference:D:\a\1\s\Runtime\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\System.Xml.ReaderWriter.dll /reference:D:\a\1\s\Runtime\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\System.Xml.Serialization.dll /reference:D:\a\1\s\Runtime\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\System.Xml.XDocument.dll /reference:D:\a\1\s\Runtime\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\System.Xml.XmlDocument.dll /reference:D:\a\1\s\Runtime\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\System.Xml.XmlSerializer.dll /reference:D:\a\1\s\Runtime\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\System.Xml.XPath.dll /reference:D:\a\1\s\Runtime\packages\netstandard.library\2.0.3\build\netstandard2.0\ref\System.Xml.XPath.XDocument.dll /debug+ /debug:pdbonly /filealign:512 /optimize- /out:obj\x64\Release\netstandard2.0\SeekOut.Utils.dll /ruleset:"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Team Tools\Static Analysis Tools\Rule Sets\MinimumRecommendedRules.ruleset" /target:library /warnaserror- /utf8output /deterministic+ /sourcelink:obj\x64\Release\netstandard2.0\Utils.sourcelink.json /langversion:9.0 /embed:"obj\x64\Release\netstandard2.0.NETStandard,Version=v2.0.AssemblyAttributes.cs" /analyzerconfig:D:\a\1\s.editorconfig /analyzerconfig:obj\x64\Release\netstandard2.0\Utils.GeneratedMSBuildEditorConfig.editorconfig /analyzer:....\packages\AsyncFixer\1.5.1\analyzers\dotnet\cs\AsyncFixer.dll /analyzer:....\packages\Meziantou.Analyzer\1.0.678\analyzers\dotnet\cs\Meziantou.Analyzer.dll /analyzer:....\packages\Microsoft.CodeAnalysis.NetAnalyzers\8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll /analyzer:....\packages\Microsoft.CodeAnalysis.NetAnalyzers\8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.NetAnalyzers.dll /analyzer:D:\a\1\s\Runtime\packages\asyncfixer\1.5.1\analyzers\dotnet\cs\AsyncFixer.dll /analyzer:D:\a\1\s\Runtime\packages\meziantou.analyzer\1.0.678\analyzers\dotnet\cs\Meziantou.Analyzer.dll /analyzer:D:\a\1\s\Runtime\packages\microsoft.codeanalysis.netanalyzers\8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll /analyzer:D:\a\1\s\Runtime\packages\microsoft.codeanalysis.netanalyzers\8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.NetAnalyzers.dll /analyzer:D:\a\1\s\Runtime\packages\microsoft.dotnet.upgradeassistant.extensions.default.analyzers\0.3.310801\analyzers\dotnet\cs\Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers.Common.dll /analyzer:D:\a\1\s\Runtime\packages\microsoft.dotnet.upgradeassistant.extensions.default.analyzers\0.3.310801\analyzers\dotnet\cs\Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers.dll /analyzer:D:\a\1\s\Runtime\packages\microsoft.dotnet.upgradeassistant.extensions.default.analyzers\0.3.310801\analyzers\dotnet\cs\Microsoft.DotNet.UpgradeAssistant.Extensions.Default.CodeFixes.dll /additionalfile:D:\a\1\s\Runtime\packages\microsoft.dotnet.upgradeassistant.extensions.default.analyzers\0.3.310801\build\WebTypeReplacements.typemap AhoCorasickTree.cs AnalyticsHelpers.cs ASCIIStringExtensions.cs AzureConfigurationHelper.cs BlobStorageHelpers\BlockBlobClientWrapper.cs BlobStorageHelpers\IBlobClient.cs Converters\CamelCaseExceptDictionaryKeysResolver.cs Converters\CustomFloatToIntConverter.cs Converters\CustomStringEnumConverter.cs Converters\EndDateConverter.cs Converters\StringToListConverter.cs CosmosDBManager.cs DefaultDict.cs EnumHelpers.cs EquivalentFirstNames.cs FileNames.cs Functions.cs GZipUtils.cs HandleNormalizer.cs HashFunctions.cs HtmlHelper.cs HttpClientExtensions.cs IsDisabledProvider.cs ITelemetryClient.cs ITimer.cs LevenshteinDistance.cs LiveData\ILiveDataLoader.cs LiveData\ILiveDataStorageStateManager.cs LiveData\LiveDataBlobStorageStateManager.cs LiveData\LiveDataJob.cs LiveData\LiveDataLoader.cs LiveData\LiveDataStorageStateManager.cs LogHelper.cs MappingCommonLists.cs Models\Integrations\Application.cs Models\Integrations\ApplicationDisposition.cs Models\Integrations\Attachment.cs Models\Integrations\Candidate.cs Models\Integrations\IntegrationEntityBase.cs Models\Integrations\IntegrationMessage.cs Models\Integrations\Job.cs Models\Integrations\User.cs NameParser.cs NameParserV3.cs NewtonsoftSerializers.cs NGramGenerator.cs Partition.cs PorterStemmer.cs Properties\AssemblyInfo.cs ProxyManager.cs RetryPolicyProvider.cs Scheduler\JobFactory.cs ServiceBusManager.cs Stats.cs StorageAccountManager.cs SynonymHelper.cs TableServiceManager.cs TelemetryApp.cs URLEncoder.cs UserAgents.cs Wikipedia.cs "obj\x64\Release\netstandard2.0.NETStandard,Version=v2.0.AssemblyAttributes.cs" /warnaserror+:NU1605
##[error]CSC(0,0): Error CS0006: Metadata file '....\packages\AsyncFixer\1.5.1\analyzers\dotnet\cs\AsyncFixer.dll' could not be found
CSC : error CS0006: Metadata file '....\packages\AsyncFixer\1.5.1\analyzers\dotnet\cs\AsyncFixer.dll' could not be found [D:\a\1\s\Common\Utils\Utils.csproj]
##[error]CSC(0,0): Error CS0006: Metadata file '....\packages\Meziantou.Analyzer\1.0.678\analyzers\dotnet\cs\Meziantou.Analyzer.dll' could not be found
CSC : error CS0006: Metadata file '....\packages\Meziantou.Analyzer\1.0.678\analyzers\dotnet\cs\Meziantou.Analyzer.dll' could not be found [D:\a\1\s\Common\Utils\Utils.csproj]
##[error]CSC(0,0): Error CS0006: Metadata file '....\packages\Microsoft.CodeAnalysis.NetAnalyzers\8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll' could not be found
CSC : error CS0006: Metadata file '....\packages\Microsoft.CodeAnalysis.NetAnalyzers\8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll' could not be found [D:\a\1\s\Common\Utils\Utils.csproj]
##[error]CSC(0,0): Error CS0006: Metadata file '....\packages\Microsoft.CodeAnalysis.NetAnalyzers\8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.NetAnalyzers.dll' could not be found
CSC : error CS0006: Metadata file '....\packages\Microsoft.CodeAnalysis.NetAnalyzers\8.0.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.NetAnalyzers.dll' could not be found [D:\a\1\s\Common\Utils\Utils.csproj]
CompilerServer: server - server processed compilation - Utils (netstandard2.0)

I have tried:

  1. Confirmed these analyzers are restored in the Restore Nuget step via the build logs
  2. Added Analyzer tag explicitly in all projects of the solution
@oleg-shilo
Copy link
Owner

Sorry @sona-jain, I am not sure how I can help you.
I do not even understand what you are trying to build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants