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

CWDev.SLNTools.Core.Project.FullPath throws ArgumentNullException #4

Open
mtherien opened this issue Nov 18, 2017 · 2 comments
Open

Comments

@mtherien
Copy link
Owner

mtherien commented Nov 18, 2017

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
Copy link
Owner Author

[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
Copy link
Owner Author

[UnknownUser@2/14/2013]

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

No branches or pull requests

1 participant