I am working on this ASP.NET MVC project. I did not do any changes to the _Layout.cshtml or BundleConfig.cs or Web.config. When I ran the project, it is showing the below exception:
System.NullReferenceException: 'Object reference not set to an instance of an object.' [External Code] ASP._Page_Views_Shared__Layout_cshtml.Execute() in _Layout.cshtml
I tried the minification method but still it failed. If it is possible to view, please check the photos below.
Can somebody help me resolve this issue, please?
Picture01
Picture02
Pciture03
Replace the following:
bundles.Add(new ScriptBundle("~/bundles/mybundle").Include(
"~/Scripts/...",
"~/Scripts/..."));
with this:
bundles.Add(new Bundle("~/bundles/mybundle").Include(
"~/Scripts/...",
"~/Scripts/..."));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With