dotnet / upgrade-assistant

A tool to assist developers in upgrading .NET Framework applications to .NET 6 and beyond
MIT License
1.1k stars 162 forks source link

Packages.config file not found #1325

Open smtcast opened 1 year ago

smtcast commented 1 year ago

[21:27:40 INF] Reference to .NET Upgrade Assistant analyzer package (Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers, version 0.4.346202) needs to be added [21:27:40 ERR] Unexpected error System.IO.FileNotFoundException: Could not find file 'C:\CAST\AIP-Console-StandaloneData\deploy\VHB\VHB_code_for_analysis\geocoder-server\TestClient\packages.config'. File name: 'C:\CAST\AIP-Console-StandaloneData\deploy\VHB\VHB_code_foranalysis\geocoder-server\TestClient\packages.config' at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReaderImpl.FinishInitUriString() at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver) at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext) at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings) at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options) at Microsoft.DotNet.UpgradeAssistant.Extensions.NuGet.PackageConfig.GetPackages(String path)+MoveNext() at System.Linq.Enumerable.Any[TSource](IEnumerable1 source, Func2 predicate) at Microsoft.DotNet.UpgradeAssistant.Extensions.Maui.MauiComponentIdentifier.GetComponentsAsync(IProject project, CancellationToken token) at Microsoft.DotNet.UpgradeAssistant.MSBuild.MSBuildProject.GetComponentsAsync(CancellationToken token) in //src/components/Microsoft.DotNet.UpgradeAssistant.MSBuild/MSBuildProject.cs:line 128 at Microsoft.DotNet.UpgradeAssistant.TargetFramework.TargetFrameworkSelector.SelectTargetFrameworkAsync(IProject project, CancellationToken token) in /_/src/components/Microsoft.DotNet.UpgradeAssistant/TargetFramework/TargetFrameworkSelector.cs:line 54 at Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageAnalyzerResultProvider.AnalyzeAsync(AnalyzeContext analysis, CancellationToken token)+MoveNext() at Microsoft.DotNet.UpgradeAssistant.Steps.Packages.PackageAnalyzerResultProvider.AnalyzeAsync(AnalyzeContext analysis, CancellationToken token)+System.Threading.Tasks.Sources.IValueTaskSource.GetResult() at System.Linq.AsyncEnumerable.gCore|6200[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in //Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36 at System.Linq.AsyncEnumerable.gCore|6200[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in //Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36 at Microsoft.DotNet.UpgradeAssistant.Analysis.SarifAnalyzeResultWriter.ExtractRunsAsync(IAsyncEnumerable1 analyzeResultDefinitions)+MoveNext() in /_/src/components/Microsoft.DotNet.UpgradeAssistant.Analysis/SarifAnalyzeResultWriter.cs:line 56 at Microsoft.DotNet.UpgradeAssistant.Analysis.SarifAnalyzeResultWriter.ExtractRunsAsync(IAsyncEnumerable1 analyzeResultDefinitions)+MoveNext() in /_/src/components/Microsoft.DotNet.UpgradeAssistant.Analysis/SarifAnalyzeResultWriter.cs:line 54 at Microsoft.DotNet.UpgradeAssistant.Analysis.SarifAnalyzeResultWriter.ExtractRunsAsync(IAsyncEnumerable1 analyzeResultDefinitions)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult() at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|620_0[TSource](IAsyncEnumerable1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36 at System.Linq.AsyncEnumerable.g__Core|6200[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in //Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36 at Microsoft.DotNet.UpgradeAssistant.Analysis.SarifAnalyzeResultWriter.WriteAsync(IAsyncEnumerable`1 results, Stream stream, CancellationToken token) in //src/components/Microsoft.DotNet.UpgradeAssistant.Analysis/SarifAnalyzeResultWriter.cs:line 41 at Microsoft.DotNet.UpgradeAssistant.Cli.ConsoleAnalyze.RunAsync(CancellationToken token) in //src/cli/Microsoft.DotNet.UpgradeAssistant.Cli/Commands/Analyze/ConsoleAnalyze.cs:line 72 at Microsoft.DotNet.UpgradeAssistant.Cli.ConsoleRunner.StartAsync(CancellationToken token) in /_/src/cli/Microsoft.DotNet.UpgradeAssistant.Cli/ConsoleRunner.cs:line 60 . . Attached is the clef file. https://github.com/CAST-Extend/com.castsoftware.labs.ctl.link/blob/master/upgrade-assistant.clef

smtcast commented 1 year ago

Project file is in https://github.com/CAST-Extend/com.castsoftware.labs.ctl.link/blob/master/VHB.zip

SteveMickelson commented 1 year ago

I have the same issue. My understanding is that's a legacy file and there is no packages.config to find.

[14:26:13 ERR] Unexpected error System.IO.FileNotFoundException: Could not find file 'C:\Smick\Visual Studio\TestRig-Twincat.DotNet6\TestRig\packages.config'. F