2

When I try to query all Event Subscriptions from Visual Studio Online I receive the following error: "Requested value 'PersistedNotification' was not found."

My code:

var server = TfsProvider.GetServer(tfsUri);

var eventService = (IEventService)server.GetService(typeof(IEventService));

var subscriptions = eventService.GetAllEventSubscriptions(); // Exception here
jessehouwing
  • 106,458
  • 22
  • 256
  • 341
Pavel Shkleinik
  • 6,298
  • 2
  • 24
  • 36

2 Answers2

1

Seems to be fixed in the 2015 RC build of Microsoft.TeamFoundation.Client (build 14.0.22821.0)

See this answer for assembly location: Where can I find Microsoft.TeamFoundation.Build.Client in Visual Studio 2015?

Community
  • 1
  • 1
smarcantonio
  • 368
  • 1
  • 5
0

I work arounded this problem by calling overload of GetAllEventSubscriptions() method:

var subscriptions = eventService.GetAllEventSubscriptions("My Notification Classification");

I am lucky enough and I exactly know value of the parameter. Geting list of all event subscriptions from VSO is still a problem.

Here is example how I create the subscription:

var preference = new DeliveryPreference
                 {
                     Schedule = DeliverySchedule.Immediate,
                     Type = DeliveryType.Soap,
                      Address = deliveryAddress,
                 };

var id = eventService.SubscribeEvent(EventType, string.Empty, preference, "My Notification Classification");
Pavel Shkleinik
  • 6,298
  • 2
  • 24
  • 36