-
Notifications
You must be signed in to change notification settings - Fork 123
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
Compiling issue with 'Microsoft.Azure.NotificationHubs.CDataMember' #111
Comments
Hi, Best regards, Martin |
Hi, I have the same problem. Do you have any solution? I can't go to the store because of this error. 3>C:\Users\Marian.GRZESIK.nuget\packages\microsoft.net.native.compiler\2.2.8-rel-28605-00\tools\Microsoft.NetNative.targets(801,5): error : System.Runtime.Serialization.InvalidDataContractException: Type 'Microsoft.Azure.NotificationHubs.CDataMember' does not have a static method 'GenerateSchema' that takes a parameter of type 'System.Xml.Schema.XmlSchemaSet' as specified by the XmlSchemaProviderAttribute attribute. |
Same issue. Can't build for release. Anyone found a workaround for store submission? |
Why do you need |
@stankovski The documentation says to use it. https://docs.microsoft.com/en-us/azure/notification-hubs/notification-hubs-windows-store-dotnet-get-started-wns-push-notification#create-a-sample-windows-app Step 8 |
This looks like a doc issue. You should not need the |
@stankovski I have raised a query MicrosoftDocs/azure-docs#51148 But this Line here: On peeking into the code uses: #region Assembly Microsoft.WindowsAzure.Messaging.Managed, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 using Microsoft.WindowsAzure.Messaging; namespace Microsoft.WindowsAzure.Messaging |
I use it also, because I have an Xamarin.Forms App. The same Nuget Package is used for iOS, Android and UWP. |
@Grzesik One thing i did find was that i can get it to build/compile in release mode. Notification Hub still doesn't work so kinda pointless: WITH THE NATIVE TOOLCHAIN ENABLED FOR x86, x64 and ARM: So i added: The the assembliesToInclude And now it builds/compiles. However i see alot of WindowsAzure.Messaging.Managed Exceptions of being thrown and obviously notifications don't work or register with the PushNotificationChannelManager. |
@ncunning I've tried it, but I get still an error in Release mode:: Processing application code |
I have updated the UWP sample and have verified that the latest version of the https://www.nuget.org/packages/Microsoft.Azure.NotificationHubs package works and compiles under Release configuration. As far as usage you would need to update the code to something like:
|
Hi @stankovski, I've tested your sample and it works. Unfortunatelly it doesn't change my problem. But I've underestood, what the reason for the problem is. The problem ist the WindowsAzure.Messaging.Managed Nuget Package, which cause the problem, when linking in realse mode. It is possible to update that package? |
We are working on updating our SDK to include functionality available in WindowsAzure.Messaging.Managed however you should be able to get your app working with just NotificationHubClient. What functionality are you currently missing? |
Hi @stankovski, private PushNotificationChannel channel;
|
Not sure what you mean by
Also your line |
As mentioned above (#111 (comment)), you should just use installation API (https://docs.microsoft.com/en-us/archive/msdn-magazine/2015/april/microsoft-azure-azure-notification-hubs-best-practices-for-managing-devices#registering-devices). It will allow you to create or update a registration with the channel. There is no need to delete registrations all the time. |
Hi @stankovski , if I change the parameters in the NotificationHubClient, I get an Exception too: Message = "The remote server returned an error: (401) Unauthorized. Reason: ..TrackingId:8a7dd317-575c-4429-8b73-675a9d73c156,TimeStamp:2020-04-06T05:56:47.5365128Z"
|
Hi there,
I have an UWP Project, that is using Notificationhub.
When I compile my code in debug mode (x86) everything works fine.
When I try to create a store package the compilation fails for configuration release x86 with error:
"System.Runtime.Serialization.InvalidDataContractException: Type 'Microsoft.Azure.NotificationHubs.CDataMember' does not have a static method 'GenerateSchema' that takes a parameter of type 'System.Xml.Schema.XmlSchemaSet' as specified by the XmlSchemaProviderAttribute attribute."
I am using VS2019 Version 16.4.2
Nuget Package is: Microsoft.Azure.NotificatioHubs Version 3.3.0
What causes this isssue??
Kind regards,
Martin
The text was updated successfully, but these errors were encountered: