# Missing Using Statements

**URL:** <https://forum.radzen.com/t/missing-using-statements/9216>\
**Category:** Blazor Server\
**Created:** [October 18, 2021, 1:41pm UTC](https://forum.radzen.com/t/missing-using-statements/9216 "2021-10-18T13:41:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcourville](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mcourville](https://forum.radzen.com/u/mcourville)\
**Post date:** [October 18, 2021, 1:41pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/1 "2021-10-18T13:41:50Z")

</div>

Hello, when I generate my api from swagger, there are many files created that I do not recognize, and they are missing using statements (mostly System.Reflection) that is causing much refactoring each time I pull in new API definition updates. Can you help?

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [October 18, 2021, 1:52pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/2 "2021-10-18T13:52:13Z")

</div>

Hi @mcourville,

Can you post more info where these using statements are missing? Radzen generates on run various files from your data source definition to be used runtime: service, models, etc.

---

<div class="post-metadata">

**Author:** ![mcourville](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mcourville](https://forum.radzen.com/u/mcourville)\
**Post date:** [October 18, 2021, 2:11pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/3 "2021-10-18T14:11:05Z")

</div>

These are compile time files. When I import an API from a swagger document, it generates many files that are not related to the API like these classes are not part of the swagger, but they were generated:

 ![image](https://forum.radzen.com/uploads/default/original/2X/5/5fed32a2c723f836512bc765945db6f1a3dd7cc5.png)  
and they are missing using statements.  
mostly  
Snippet

using System.Reflection;

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [October 18, 2021, 2:16pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/4 "2021-10-18T14:16:21Z")

</div>

I’m afraid that we are unable to reproduce such problem locally. Please send us your swagger definition or the entire application at [info@radzen.com](mailto:info@radzen.com). If the archive is too big for attachment you can use sharing service like Google drive.

---

<div class="post-metadata">

**Author:** ![mcourville](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mcourville](https://forum.radzen.com/u/mcourville)\
**Post date:** [October 18, 2021, 2:19pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/5 "2021-10-18T14:19:42Z")

</div>

I have sent the swagger document, thanks!

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [October 18, 2021, 2:30pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/6 "2021-10-18T14:30:19Z")

</div>

I've tried your definition and no such files generated for me:

 ![image](https://forum.radzen.com/uploads/default/original/2X/8/86cc4ed49b3a7d6983b8e6e4baa171a2d16416b9.png)  
 ![image](https://forum.radzen.com/uploads/default/original/2X/1/18fd38b6221dece203db2b019aef16e9ad177898.png)

There is an error however not related to the problems described in your first post - one of the properties type is not properly generated:

 ![image](https://forum.radzen.com/uploads/default/original/2X/f/f96acbe89773ae7872c9c19bbfbde367778d9495.png)

should be `IEnumerable<bool>`.

Fix for this will be included in our next update before the end of the week and in the meantime you can add this file to application ignore list and correct the problem directly in the code.

---

<div class="post-metadata">

**Author:** ![mcourville](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mcourville](https://forum.radzen.com/u/mcourville)\
**Post date:** [October 18, 2021, 3:04pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/7 "2021-10-18T15:04:55Z")

</div>

well, in the API it's actually a nullable bool (IEnumerable\<bool?\>)

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [October 18, 2021, 3:08pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/8 "2021-10-18T15:08:16Z")

</div>

Yes, you are right - it's `IEnumerable<bool?>`.

---

<div class="post-metadata">

**Author:** ![mcourville](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mcourville](https://forum.radzen.com/u/mcourville)\
**Post date:** [October 18, 2021, 3:31pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/9 "2021-10-18T15:31:44Z")

</div>

Our other issue appears to be an artifact from an earlier import. After deleting and re-adding the swagger, the other files didn't come back. We'll look forward to the nullable `bool` fix.

---

<div class="post-metadata">

**Author:** ![mcourville](https://forum.radzen.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mcourville](https://forum.radzen.com/u/mcourville)\
**Post date:** [October 21, 2021, 4:10pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/10 "2021-10-21T16:10:44Z")

</div>

Hi, our API this morning is generating more nullable objects as `dynamic` specifically, anything that is an `IEnumerable<CLASS?>` is being generated as `IEnumerable<dynamic>` . This started after updating to the latest today.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [October 21, 2021, 4:34pm UTC](https://forum.radzen.com/t/missing-using-statements/9216/11 "2021-10-21T16:34:26Z")

</div>

Thanks for the report. You can downgrade to the previous version until we find what’s going on.

---

<div class="post-metadata">

**Author:** ![enchev](https://forum.radzen.com/user_avatar/forum.radzen.com/enchev/32/16_2.png) [@enchev](https://forum.radzen.com/u/enchev)\
**Post date:** [October 22, 2021, 7:10am UTC](https://forum.radzen.com/t/missing-using-statements/9216/12 "2021-10-22T07:10:00Z")

</div>

We were able to fix the problem and we will publish update later today.
