slntools icon indicating copy to clipboard operation
slntools copied to clipboard

CWDev.SLNTools.Core.Project.FullPath throws ArgumentNullException

Open mtherien opened this issue 8 years ago • 2 comments

public string FullPath { get { return Path.Combine(Path.GetDirectoryName(m_container.SolutionFullPath), m_relativePath); }

}   in some cases, member variable m_container is null. that's the reason why ArgumentNullException is thrown, when it refers to the m_containers.SolutionFullPath.   Even FullPath is not working, RelativePath returns a valid value. Maybe you can reconstruct a right value of FullPath using the value of RelativePath.

This work item was migrated from CodePlex

CodePlex work item ID: '5219' Vote count: '1'

mtherien avatar Nov 18 '17 17:11 mtherien

[kaistizen@9/30/2010] Found what caused this issue. My codes are like:

using (var reader = new SolutionFileReader(fullPath)) { SolutionFile slnFile = reader.ReadSolutionFile();

ReadSolutionFile() doesn't set its internal member property SolutionFullPath. The value of solution path was already given when an instance of SolutionFileReader was created. So ReadSolutionFile method can set the right value to the property SolutionFullPath, but it dosen't.

mtherien avatar Nov 18 '17 17:11 mtherien

[UnknownUser@2/14/2013]

mtherien avatar Nov 18 '17 17:11 mtherien