0
tteoh created
Hi, I'm using ASPNET CORE & Angular (single solution) v5.5.2.
I followed the instruction from Getting Started (for MacOSX) to run the project.
But I'm getting this exception when I was trying to run the project in Visual Studio for Mac:
I've found out the root caused, which is when trying to get the configuration from appsettings.json:
Thanks. /Tommy
3 Answer(s)
-
0
Hi, please share the full error stack trace.
-
0
Hi ryancyq.
This is the full error stack trace:
Unhandled Exception: System.ArgumentNullException: Value cannot be null. Parameter name: value at System.Boolean.Parse (System.String value) [0x0002a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/boolean.cs:167 at COREAJDemo.Web.Startup.AuthConfigurer.Configure (Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration configuration) [0x00015] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/AuthConfigurer.cs:20 at COREAJDemo.Web.Startup.Startup.ConfigureServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services) [0x0006e] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/Startup.cs:101 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305 --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services) [0x00028] in <0de102f58bb64e9397f452cd5d2fc76c>:0 at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices () [0x0000e] in <0de102f58bb64e9397f452cd5d2fc76c>:0 at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize () [0x0002f] in <0de102f58bb64e9397f452cd5d2fc76c>:0 at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build () [0x00150] in <0de102f58bb64e9397f452cd5d2fc76c>:0 at COREAJDemo.Web.Startup.Program.Main (System.String[] args) [0x00001] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/Program.cs:10 [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value cannot be null. Parameter name: value at System.Boolean.Parse (System.String value) [0x0002a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/boolean.cs:167 at COREAJDemo.Web.Startup.AuthConfigurer.Configure (Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration configuration) [0x00015] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/AuthConfigurer.cs:20 at COREAJDemo.Web.Startup.Startup.ConfigureServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services) [0x0006e] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/Startup.cs:101 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/MonoMethod.cs:305 --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices (Microsoft.Extensions.DependencyInjection.IServiceCollection services) [0x00028] in <0de102f58bb64e9397f452cd5d2fc76c>:0 at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices () [0x0000e] in <0de102f58bb64e9397f452cd5d2fc76c>:0 at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize () [0x0002f] in <0de102f58bb64e9397f452cd5d2fc76c>:0 at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build () [0x00150] in <0de102f58bb64e9397f452cd5d2fc76c>:0 at COREAJDemo.Web.Startup.Program.Main (System.String[] args) [0x00001] in /Users/tankianwah/Desktop/COREAJDemo/src/COREAJDemo.Web.Host/Startup/Program.cs:10
Thanks. /Tommy
-
0
Hi ryancyq.
It's my bad that running v5.5.2 but following v6.2.0 tutorial. It's working fine after I downloaded the latest version, which is v6.2.0.
Thanks. /Tommy