BinaryAnalysis.MultiLanguage.csproj object reference not set to an object

Topics: Core, Localization
Aug 6, 2013 at 4:20 PM
Hello there,

In my orchard site I'm using localization and the BinaryAnalysis.MultiLanguage module, for it's dropdown menu of languages.
My site is working fine online, but on my local machine I can't run it. I did some development on the life site, then downloaded it to my local machine, but I can't run it.
I work with visual studio express.
The error coming up is this: BinaryAnalysis.MultiLanguage.csproj object reference not set to an object and it refers to the xml csproj file.
On running the last build, the thread gets aborted with the following stack trace:
I hope you guys can have a look at it.
Thanks in advance.

[ThreadAbortException: Thread was being aborted.]
System.Threading.Thread.AbortInternal() +0
System.Threading.Thread.Abort(Object stateInfo) +43
System.Web.HttpResponse.AbortCurrentThread() +62
System.Web.HttpResponse.End() +30
System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent) +381
System.Web.HttpResponseWrapper.Redirect(String url, Boolean endResponse) +17
Orchard.Environment.DefaultHostEnvironment.RestartAppDomain() in c:\Build\Orchard\src\Orchard\Environment\DefaultHostEnvironment.cs:52
Orchard.Environment.Extensions.ExtensionLoaderCoordinator.SetupExtensions() in c:\Build\Orchard\src\Orchard\Environment\Extensions\ExtensionLoaderCoordinator.cs:85
Orchard.Environment.DefaultOrchardHost.SetupExtensions() in c:\Build\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:178
Orchard.Environment.DefaultOrchardHost.BuildCurrent() in c:\Build\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:102
Orchard.Environment.DefaultOrchardHost.BeginRequest() in c:\Build\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:214
Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.BeginRequest() in c:\Build\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:78
Orchard.Web.MvcApplication.HostBeginRequest(HttpApplication application, IOrchardHost host) in c:\Build\Orchard\src\Orchard.Web\Global.asax.cs:38
Orchard.WarmupStarter.Starter`1.OnBeginRequest(HttpApplication application) in c:\Build\Orchard\src\Orchard.WarmupStarter\Starter.cs:68
Orchard.Web.MvcApplication.Application_BeginRequest() in c:\Build\Orchard\src\Orchard.Web\Global.asax.cs:29
Coordinator
Aug 6, 2013 at 7:19 PM
You mean the project doesn't build from VS?
Aug 6, 2013 at 8:43 PM
yes exactly, it doesn't build
Coordinator
Aug 6, 2013 at 9:01 PM
And the build error is a null ref? That's weird.
Aug 6, 2013 at 9:49 PM
The error message says:
object reference not set to an instance object and it refers to the xml csproj file. where it puts a squigly line under
<MvcBuildViews>false</MvcBuildViews>
Coordinator
Aug 6, 2013 at 11:02 PM
Can you try to remove that line?
Aug 7, 2013 at 11:59 AM
Hi Bertrand,

Thanks for your time .
I removed these lines which both had a squigly line:
<MvcBuildViews>false</MvcBuildViews>
<Target Name="AfterBuild" DependsOnTargets="AfterBuildCompiler">
<PropertyGroup>
  __<AreasManifestDir>$(ProjectDir)\..\Manifests</AreasManifestDir>__
</PropertyGroup>
(the areasManifestDir)
but the result didn't change; still "object reference wasn't set to the instance of an object"

any other ideas?
Coordinator
Aug 7, 2013 at 9:55 PM
The result cannot be the same as you said earlier that it was pointing you to that line. If the line is gone, it can't point you to it. So I can only assume that the two were unrelated and that the stack trace was actually pointing you to a completely different place. Where?
Aug 7, 2013 at 10:16 PM
Sounds like logic to me, the stacktrace seems to point to the Global.asax,.cs:

[ThreadAbortException: Thread was being aborted.]
System.Threading.Thread.AbortInternal() +0
System.Threading.Thread.Abort(Object stateInfo) +43
System.Web.HttpResponse.AbortCurrentThread() +62
System.Web.HttpResponse.End() +30
System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent) +381
System.Web.HttpResponseWrapper.Redirect(String url, Boolean endResponse) +17
Orchard.Environment.DefaultHostEnvironment.RestartAppDomain() in c:\Build\Orchard\src\Orchard\Environment\DefaultHostEnvironment.cs:52
Orchard.Environment.Extensions.ExtensionLoaderCoordinator.SetupExtensions() in c:\Build\Orchard\src\Orchard\Environment\Extensions\ExtensionLoaderCoordinator.cs:85
Orchard.Environment.DefaultOrchardHost.SetupExtensions() in c:\Build\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:178
Orchard.Environment.DefaultOrchardHost.BuildCurrent() in c:\Build\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:102
Orchard.Environment.DefaultOrchardHost.BeginRequest() in c:\Build\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:214
Orchard.Environment.DefaultOrchardHost.Orchard.Environment.IOrchardHost.BeginRequest() in c:\Build\Orchard\src\Orchard\Environment\DefaultOrchardHost.cs:78
Orchard.Web.MvcApplication.HostBeginRequest(HttpApplication application, IOrchardHost host) in c:\Build\Orchard\src\Orchard.Web\Global.asax.cs:38
Orchard.WarmupStarter.Starter`1.OnBeginRequest(HttpApplication application) in c:\Build\Orchard\src\Orchard.WarmupStarter\Starter.cs:68
Orchard.Web.MvcApplication.Application_BeginRequest() in c:\Build\Orchard\src\Orchard.Web\Global.asax.cs:29

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +192
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +108
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
System.Web.Util.ArglessEventHandlerProxy.Callback(Object sender, EventArgs e) +56
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
Coordinator
Aug 8, 2013 at 2:23 AM
So that's what you see at runtime when you try to access the site. What do you see in Visual Studio when you try to build the solution?
Aug 9, 2013 at 6:20 PM
What I see in the output window is this:
------ Build started: Project: C:...\Life\, Configuration: Debug Any CPU ------
Validating Web Site
Building directory '/Core/Navigation/Scripts/'.
Building directory '/Core/Shapes/Scripts/'.
Building directory '/Modules/BinaryAnalysis.MultiLanguage/Controllers/'.
Building directory '/Modules/BinaryAnalysis.MultiLanguage/Drivers/'.
Building directory '/Modules/BinaryAnalysis.MultiLanguage/Models/'.
Building directory '/Modules/BinaryAnalysis.MultiLanguage/Properties/'.
Building directory '/Modules/BinaryAnalysis.MultiLanguage/Services/'.
Building directory '/Modules/BinaryAnalysis.MultiLanguage/ViewModels/'.
Building directory '/Modules/BinaryAnalysis.MultiLanguage/'.
C:\Users\Robin\Documents\Orchard\Life\Modules\BinaryAnalysis.MultiLanguage\BinaryAnalysis.MultiLanguage.csproj(1): Build (web): Object reference not set to an instance of an object.

Validation Complete
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========

And then if I run the last build, I get the yellow screen with the Thread - Aborted error from above.
Coordinator
Aug 9, 2013 at 6:53 PM
Looks like this module doesn't work. You should try deleting it.