# Build error - ArgumentNullException

**URL:** <https://forum.radzen.com/t/build-error-argumentnullexception/21263>\
**Category:** Radzen Blazor Studio\
**Created:** [January 8, 2026, 5:09pm UTC](https://forum.radzen.com/t/build-error-argumentnullexception/21263 "2026-01-08T17:09:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SolutionJ](https://forum.radzen.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@SolutionJ](https://forum.radzen.com/u/SolutionJ)\
**Post date:** [January 8, 2026, 5:09pm UTC](https://forum.radzen.com/t/build-error-argumentnullexception/21263/1 "2026-01-08T17:09:31Z")

</div>

Hi,

I’m getting this error during the build. The app runs ok, but some pages won’t render in the designer?

Error during application startup: System.ArgumentNullException: Value cannot be null. (Parameter 'implementationInstance')  
at System.ArgumentNullException.Throw(String paramName)  
at Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddSingleton[TService](IServiceCollection services, TService implementationInstance)  
at RadzenProgram.Configure(IServiceCollection services, IConfiguration configuration)  
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void\*\* arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)  
at System.Reflection.MethodBaseInvoker.InterpretedInvoke\_Method(Object obj, IntPtr\* args)  
at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)

I’ve tried using the preprocessor to exclude certain bits of Program.cs, notably anything recently changed, but I can’t find anything?

Cheers

Reg

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [January 9, 2026, 6:26am UTC](https://forum.radzen.com/t/build-error-argumentnullexception/21263/2 "2026-01-09T06:26:39Z")

</div>

Hi @SolutionJ,

Check the dependencies of some of the pages that fail to render (the injected services). There is a service which accesses something in its constructor that is null in design time. You can apply the preprocessor directives there to avoid the access.

---

<div class="post-metadata">

**Author:** ![SolutionJ](https://forum.radzen.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@SolutionJ](https://forum.radzen.com/u/SolutionJ)\
**Post date:** [January 9, 2026, 7:20am UTC](https://forum.radzen.com/t/build-error-argumentnullexception/21263/3 "2026-01-09T07:20:08Z")

</div>

Good morning @korchev. I will work with your suggestion, but would it be possible in future for error messages arising during startup to provide more information about where they arose?

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [January 9, 2026, 8:09am UTC](https://forum.radzen.com/t/build-error-argumentnullexception/21263/4 "2026-01-09T08:09:12Z")

</div>

Hi @SolutionJ,

We would like to but it isn't possible. The exception you see is the exception that arises and we cannot tell more from it.

---

<div class="post-metadata">

**Author:** ![SolutionJ](https://forum.radzen.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@SolutionJ](https://forum.radzen.com/u/SolutionJ)\
**Post date:** [January 9, 2026, 8:15am UTC](https://forum.radzen.com/t/build-error-argumentnullexception/21263/5 "2026-01-09T08:15:42Z")

</div>

Oh. I thought it was your own software that fails. And it’s not possible to have any tracking either, so that we could see what progress the program had made before keeling over?

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [January 9, 2026, 8:18am UTC](https://forum.radzen.com/t/build-error-argumentnullexception/21263/6 "2026-01-09T08:18:38Z")

</div>

Unfortunately no, we can't do much more. The exception only shows that some AddSingleton method fails with ArgumentNullException.

---

<div class="post-metadata">

**Author:** ![SolutionJ](https://forum.radzen.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@SolutionJ](https://forum.radzen.com/u/SolutionJ)\
**Post date:** [January 9, 2026, 8:20am UTC](https://forum.radzen.com/t/build-error-argumentnullexception/21263/7 "2026-01-09T08:20:51Z")

</div>

I see. Does ‘Singleton’ refer to the way I’ve scoped the service in my app?

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [January 9, 2026, 8:35am UTC](https://forum.radzen.com/t/build-error-argumentnullexception/21263/8 "2026-01-09T08:35:35Z")

</div>

Yes, this is the only clue that I see. The service seems to be registered via AddSingleton.

---

<div class="post-metadata">

**Author:** ![SolutionJ](https://forum.radzen.com/letter_avatar_proxy/v4/letter/s/bc8723/32.png) [@SolutionJ](https://forum.radzen.com/u/SolutionJ)\
**Post date:** [January 9, 2026, 8:36am UTC](https://forum.radzen.com/t/build-error-argumentnullexception/21263/9 "2026-01-09T08:36:20Z")

</div>

Ok, that’s very helpful actually.

Thanks for your help with this, much obliged…
