0

Node Js publish from Visual Studio 2019 stopped working. there was no update on VS or code configurations.

enter image description here

Error dump from temp file:

27-Nov-20 09:58:33
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.CanShowRestoreAction()
   at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.RebuildCrudProfileCommands(IProfileVisual profile)
   at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.set_SelectedProfile(IProfileVisual value)
   at Microsoft.Publish.Framework.ViewModel.ProfileSelectorViewModel.Initialize(ProfileSelectorUserControl view)
   at Microsoft.Publish.Framework.Provider.DefaultPublishTabProvider.<CreateViewAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Publish.Framework.Provider.PublishProjectDesignerTabProvider.<CreateViewAsync>d__7.MoveNext()
===================

What I tried:

  1. Clearing .vs, data, bin
  2. Clearing temp But nothing worked.

Anyway to resolve this?

Workaround: Using Deployment center local git

Bhargavi Annadevara
  • 4,923
  • 2
  • 13
  • 30
Anoop
  • 456
  • 3
  • 5
  • 15

1 Answers1

0

Usually, emptying the C:\Users\%USERPROFILE%\AppData\Local\Microsoft\VisualStudio and C:\Users\%USERPROFILE%\AppData\Local\Microsoft\VSCommon folders should fix your publish error. If not, try repairing your VS installation or re-installing the latest version available.

This SO post highlights a few other workarounds to try. If the problem still persists, please report it on Developer Community so the VS Team can investigate further.

Bhargavi Annadevara
  • 4,923
  • 2
  • 13
  • 30