firegiant / HeatWaveSupport

Issues-only repository to report HeatWave bugs and feature requests to FireGiant
3 stars 0 forks source link

Faulted Project in VS when Nuget isn't available as Package Source #71

Open weberms opened 1 week ago

weberms commented 1 week ago

HeatWave Version

1.0.4.5

Visual Studio Version

17.8.2

Repro Steps

  1. Setup custom package source for nuget packages.
  2. Block access to nuget.org in your proxy server.
  3. Open WIX project in Visual Studio that has Nuget package references.
  4. Click on Dependencies => Packages
  5. Visual Studio displays error at top of screen: "Visual Studio ran into an unexpected problem with one or more projects. You may need to reload affected projects or the solution to prevent further problems. Open Log file Reload faulted project(s)"

Actual Result

Error in Visual Studio:

"Visual Studio ran into an unexpected problem with one or more projects. You may need to reload affected projects or the solution to prevent further problems. Open Log file Reload faulted project(s)"

Error details from VS log:

9/8/2024 11:42:57 PM LimitedFunctionality System.AggregateException: Project system data flow 'AssetsFileDependenciesDataSource: 25613948' closed because of an exception. Activating the "Microsoft.VisualStudio.NuGet.NuGetProjectService (1.0)" service failed. ---> (Inner Exception #0) Microsoft.ServiceHub.Framework.ServiceActivationFailedException: Activating the "Microsoft.VisualStudio.NuGet.NuGetProjectService (1.0)" service failed. at Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.View.d19`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at FireGiant.HeatWave.ProjectSystem.SolutionExplorer.Dependencies.AssetsFileDependenciesDataSource.<>c.<<-ctor>b3_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Threading.AwaitExtensions.ExecuteContinuationSynchronouslyAwaiter1.GetResult() at Microsoft.VisualStudio.Threading.AsyncLazy1.<>cDisplayClass16_0.<b0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread() at Microsoft.VisualStudio.Threading.JoinableTask1.CompleteOnCurrentThread() at FireGiant.Utility.AsyncLazyExtensions.GetValue[T](AsyncLazy1 lazy, JoinableTaskFactory joinableTaskFactory, CancellationToken cancellationToken) in D:\a\1\s\src\FireGiant.Common\src\FireGiant.Utility\AsyncLazyExtensions.cs:line 22 at FireGiant.HeatWave.ProjectSystem.SolutionExplorer.Dependencies.AssetsFileDependenciesDataSource.<>cDisplayClass4_0.gTransform|1(IProjectVersionedValue1 update) at Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim2.TransformBlockSlimSync.ProcessInputAsync(TInput input) at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim1.<ProcessInputQueueAsync>d__5.MoveNext() ---> System.InvalidCastException: Unable to cast object of type 'NuGet.VisualStudio.Implementation.Extensibility.NuGetProjectService' to type 'NuGet.VisualStudio.Contracts.INuGetProjectService'. at Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.ProfferedServiceFactory.<GetProxyAsync>d__301.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Threading.Tasks.ValueTask1.get_Result() at Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.View.<GetProxyAsync>d__191.MoveNext() --- End of inner exception stack trace --- <--- (Inner Exception #0)

Expected Result

No errors when clicking on Packages in solution explorer. Package information is retrieved from local package source instead of nuget.org.

weberms commented 4 days ago

I see FireGiant mentioned in the stack trace. Does HeatWave support alternate package sources other than nuget?

FireGiant.HeatWave.ProjectSystem.SolutionExplorer.Dependencies.AssetsFileDependenciesDataSource.<>c.<<-ctor>b__3_0>d.MoveNext()

FireGiant.Utility.AsyncLazyExtensions.GetValue[T](AsyncLazy1 lazy, JoinableTaskFactory joinableTaskFactory, CancellationToken cancellationToken) in D:\a\1\s\src\FireGiant.Common\src\FireGiant.Utility\AsyncLazyExtensions.cs:line 22