0

I am working on .net standard library.

I have two requirements

Note : client project means - c# project which consumes my library.

  1. Call a REST api on pre or post build event of client project.

  2. Based on the response , I should create a enum class dynamically on the client project.

Gone through build event docs from Microsoft , but couldn't find any specific to call rest api or dynamic code creation on build time.

Can someone help me achieve this.

Thanks. Noorul

Noorul
  • 873
  • 2
  • 9
  • 26
  • Why not just call and cache values on startup? – vernou Aug 26 '20 at 12:54
  • yes, thats what we do right now. For certain reasons like automating the build process , we have to do the above . – Noorul Aug 26 '20 at 12:57
  • 1
    It's sounds like a job for a cd/ci, however if you need more control over prebuild, use powershell – TheGeneral Aug 26 '20 at 12:59
  • Hi Michael thanks for your reply , can we do rest api call and dynamic code generation using powershell !? can you give some guidance ! – Noorul Aug 26 '20 at 13:03
  • 1
    For the first part, you can use CURL. See https://curl.haxx.se/docs/manual.html – Uri Y Aug 26 '20 at 13:34

0 Answers0