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

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

Open
weberms opened this issue Sep 9, 2024 · 1 comment
Open
Labels
triage To be reviewed by FireGiant

Comments

@weberms
Copy link

weberms commented Sep 9, 2024

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.d__191.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>b__3_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.<>c__DisplayClass16_0.<<GetValueAsync>b__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.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.<>c__DisplayClass4_0.<LinkExternalInput>g__Transform|1(IProjectVersionedValue1 update)
at Microsoft.VisualStudio.ProjectSystem.TransformBlockSlim2.TransformBlockSlimSync.ProcessInputAsync(TInput input) at Microsoft.VisualStudio.ProjectSystem.DataReceivingBlockSlim1.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.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.d__19`1.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 weberms added the triage To be reviewed by FireGiant label Sep 9, 2024
@weberms
Copy link
Author

weberms commented Sep 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage To be reviewed by FireGiant
Projects
None yet
Development

No branches or pull requests

1 participant