diff --git a/src/PortingAssistant.Client.Analysis/AnalysisHandler.cs b/src/PortingAssistant.Client.Analysis/AnalysisHandler.cs index 588f7f0f..20face5c 100644 --- a/src/PortingAssistant.Client.Analysis/AnalysisHandler.cs +++ b/src/PortingAssistant.Client.Analysis/AnalysisHandler.cs @@ -565,6 +565,7 @@ private ProjectAnalysisResult AnalyzeProject( ExternalReferences = analyzer.ProjectResult.ExternalReferences, ProjectCompatibilityResult = compatibilityResults, LinesOfCode = analyzer.ProjectResult.LinesOfCode, + HasCompatibilityCheckingError = compatibilityCheckerResponse.HasCompatibilityCheckingError // compatibilityCheckerResponse Error }; } catch (Exception ex) @@ -653,8 +654,8 @@ private CompatibilityCheckerResponse MergeRecommendationResultToPackageAnalysisR { foreach (var packageRecommend in compatibilityCheckerResponse.PackageRecommendationResults) { - if (packageRecommend.Value?.Recommendations != null && - compatibilityCheckerResponse.PackageAnalysisResults.ContainsKey(packageRecommend.Key) && + if (packageRecommend.Value?.Recommendations != null && compatibilityCheckerResponse.PackageAnalysisResults!= null + && compatibilityCheckerResponse.PackageAnalysisResults.ContainsKey(packageRecommend.Key) && compatibilityCheckerResponse.PackageAnalysisResults[packageRecommend.Key].Recommendations == null ) { diff --git a/src/PortingAssistant.Client.Client/PortingAssistantClient.cs b/src/PortingAssistant.Client.Client/PortingAssistantClient.cs index bbcfd566..1168d132 100644 --- a/src/PortingAssistant.Client.Client/PortingAssistantClient.cs +++ b/src/PortingAssistant.Client.Client/PortingAssistantClient.cs @@ -201,10 +201,9 @@ public SolutionAnalysisResult GenerateSolutionAnalysisResult(string solutionFile { FailedProjects = failedProjects, SolutionDetails = solutionDetails, - ProjectAnalysisResults = projectAnalysisResults + ProjectAnalysisResults = projectAnalysisResults, + HasCompatibilityCheckingError = projectAnalysisResults.Any(c=>c.HasCompatibilityCheckingError) //if any project has compatibilityCheckerResponse Error }; } } - - } diff --git a/src/PortingAssistant.Client.Common/Model/ProjectAnalysisResult.cs b/src/PortingAssistant.Client.Common/Model/ProjectAnalysisResult.cs index 508542d3..61f3e544 100644 --- a/src/PortingAssistant.Client.Common/Model/ProjectAnalysisResult.cs +++ b/src/PortingAssistant.Client.Common/Model/ProjectAnalysisResult.cs @@ -19,7 +19,7 @@ public class ProjectAnalysisResult : ProjectDetails, IDisposable public VisualBasicRootNodes VisualBasicProjectRules { get; set; } public ExternalReferences ExternalReferences { get; set; } public ProjectCompatibilityResult ProjectCompatibilityResult { get; set; } - + public bool HasCompatibilityCheckingError { get; set; } //GetCompatibilityResponse HasError public void Dispose() { Errors = null; diff --git a/src/PortingAssistant.Client.Common/Model/SolutionAnalysisResult.cs b/src/PortingAssistant.Client.Common/Model/SolutionAnalysisResult.cs index 8c165084..b48d7e01 100644 --- a/src/PortingAssistant.Client.Common/Model/SolutionAnalysisResult.cs +++ b/src/PortingAssistant.Client.Common/Model/SolutionAnalysisResult.cs @@ -12,5 +12,6 @@ public class SolutionAnalysisResult public List ProjectAnalysisResults { get; set; } public List FailedProjects { get; set; } public List Errors { get; set; } //Solution errors; solution file errors etc. + public bool HasCompatibilityCheckingError { get; set; } //GetCompatibilityResponse HasError for any project } } diff --git a/src/PortingAssistant.Compatibility.Common/Model/CompatibilityCheckerResponse.cs b/src/PortingAssistant.Compatibility.Common/Model/CompatibilityCheckerResponse.cs index 0f16553f..e19fadee 100644 --- a/src/PortingAssistant.Compatibility.Common/Model/CompatibilityCheckerResponse.cs +++ b/src/PortingAssistant.Compatibility.Common/Model/CompatibilityCheckerResponse.cs @@ -19,7 +19,7 @@ public class RecommendationOnlyResponse public Language Language { get; set; } public Dictionary PackageRecommendationResults { get; set; } public Dictionary> ApiRecommendationResults { get; set; } - + public bool HasCompatibilityCheckingError { get; set; } = false; public Recommendations? GetRecommendationsForPackage(PackageVersionPair pkgVersionPair) { if (PackageRecommendationResults == null