Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution build output appends 'Object reference not set to an instance of an object. MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()' #61

Closed
RyanONeill1970 opened this issue Aug 30, 2013 · 7 comments

Comments

@RyanONeill1970
Copy link

After building a solution with WebEssentials enabled I get the following (benign) output;
========== Rebuild All: 10 succeeded, 0 failed, 0 skipped ==========
30/08/2013 14:19:08: Object reference not set to an instance of an object.
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
30/08/2013 14:19:08: Object reference not set to an instance of an object.
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()
at MadsKristensen.EditorExtensions.ProjectHelpers.GetRootFolder()

I'm not that good with GitHub so I thought I'd describe where I think the problem is, at least there is one there, not sure if it is the same one.

File: https://github.com/madskristensen/WebEssentials2013/blob/92f23d4bb731811d00daa1f2b399a29de7204c64/EditorExtensions/Helpers/ProjectHelpers.cs

Replace line 22;
Project activeProject = null;
with
Project project = GetActiveProject();

and follow that up with;
if (project == null)
return string.Empty;

I suspect it is failing on line 35 where the active project has not been checked for null.
return activeProject.Properties.Item("FullPath").Value.ToString();

@codingfreak
Copy link

Same problem here. The last release was not so stable IMHO.

@burrows-martinsmith
Copy link

As a workaround, select a project or source file in the Solution Explorer. Having the solution, or a project or a solution folder as the highlighted item seems to cause this exception.

@zaus
Copy link

zaus commented Oct 16, 2013

I was able to reproduce just now (after updating to most recent version) the issue by highlighting an unloaded Project file. It seems to work fine with other loaded projects.

@RyanONeill1970
Copy link
Author

Still happening with me on normal loaded projects but it isn't a real problem.

@allancm
Copy link

allancm commented Nov 27, 2013

Ok, I have Visual Studio 2013 Ultimate and the Web Essentials 2013, and I have this error every time I do a compilation in any language, even C++ compilation.

@SLaks
Copy link
Collaborator

SLaks commented Nov 27, 2013

@allancm That was fixed by #226, which has not yet been released.

@LordDelacroix
Copy link

+Slaks, no it's still not fixed. I am able to reproduce this issue at will with the latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants