question

GuptaPriyanka-3961 avatar image
0 Votes"
GuptaPriyanka-3961 asked asergaz edited

How to create azure device update import manifest file using c#

I am trying to migrate adu to PPR version 1.0.0-beta.3. Since this involves certain changes in the defined classes, need to know how to create Iot Hub adu ImportManifest file programmatically using c#

azure-iot-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

asergaz avatar image
1 Vote"
asergaz answered asergaz edited

Hello @GuptaPriyanka-3961 ,

Have you tried using Azure Device Update for IoT Hub client library for .NET ?

To learn how to import a new update using C#, you can check ImportUpdate sample.

The class ContentFactory.cs guides us on how to create an import manifest file programatically

 /// <summary>
         /// Creates import manifest file.
         /// </summary>
         /// <param name="manufacturer">The manufacturer.</param>
         /// <param name="name">The name.</param>
         /// <param name="version">The version.</param>
         /// <param name="fileName">Filename of the file.</param>
         /// <param name="fileSize">Size of the file.</param>
         /// <param name="fileHash">The file hash.</param>
         /// <returns>
         /// The new import manifest file.
         /// </returns>
         public string CreateImportManifestContent(string manufacturer, string name, string version, string fileName, long fileSize, string fileHash)
         {
 ...

Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
- Want a reminder to come back and check responses? Here is how to subscribe to a notification.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.