16

I got this error very frequent for my asp.net MVC4 applications. The project does build OK but it shows a message in the output.

18/04/2013 3:17:57 p.m.: Object reference not set to an instance of an object.
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()

I am using VS2012 Update 1. Web Essentials 2012 version 2.6.

It is not major but annoy. Please help.

Adamy
  • 2,581
  • 3
  • 24
  • 24
  • Seems to be a Web Essentials bug. If you select a project in the solution explorer then build, it doesn't display the error. See https://github.com/madskristensen/WebEssentials2013/issues/61. – ctc Oct 15 '13 at 18:48
  • I was getting this and closing all my open tabs/files seemed to fix it for me. – chrisb Apr 06 '16 at 11:55

2 Answers2

2

This is an older question, but a top hit on Google. So here is my answer. I have found this occurs due to some version conflict or early bug in Visual Studio and the Web Essential 2012 Extension. With an RTM install of Visual Studio 2012 and the latest Web Essentials (version 3.2 at the time of this post) I can reproduce this error.

Installing the latest update to Visual Studio has fixed the problem for me. Update

To confirm what version of Visual Studio you are running, goto Help -> About

Update 3 or greater should fix the issue

Microsoft Visual Studio Ultimate 2012
Version 11.0.60610.01 Update 3

Here is a link to the Visual Studio update on the Microsoft site

Josh
  • 61
  • 4
  • 1
    VS 11 Update 4, Web Essentials 3.8. Problem still occurs :( – Motti Mar 01 '15 at 10:08
  • Kinda the same issue for me except I only get the error when I have the Project's properties tab open. As soon as I close the Project's properties tab and re-build, all is good. Here are my versions: `Win7 x64 SP1` `VS Pro 2013 - v12.0.31101.00 Update 4` `.NET Framework - v4.5.51209` `Web Essentials 2013 for Update 4 - v2.5.4` – Al Dass Jul 14 '15 at 19:29
2

This is old but I'll add my issue.

It's happening on VS2012 with Web Essentials Only occurs when a folder is selected and I request a build (CTRL+SHIFT+B). If I select a project the error disappear.

    13/04/2015 01:42:47: Parâmetro incorreto. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at EnvDTE.Properties.Item(Object index)
   at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
   at EnvDTE.Properties.Item(Object index)
   at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
13/04/2015 01:42:47: Parâmetro incorreto. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at EnvDTE.Properties.Item(Object index)
   at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
   at EnvDTE.Properties.Item(Object index)
   at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
13/04/2015 01:42:47: Parâmetro incorreto. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))
   at EnvDTE.Properties.Item(Object index)
   at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
   at EnvDTE.Properties.Item(Object index)
   at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
Diego Mendes
  • 8,767
  • 1
  • 28
  • 35