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

Find the root namespace of the project hosting R4MVC #4

Closed
kevinkuszyk opened this issue Feb 6, 2015 · 6 comments
Closed

Find the root namespace of the project hosting R4MVC #4

kevinkuszyk opened this issue Feb 6, 2015 · 6 comments
Milestone

Comments

@kevinkuszyk
Copy link
Member

We need to find the root namespace of the project hosting R4MVC.

At the moment is it hard coded here.

@wwwlicious
Copy link
Contributor

I think this might be available on every SyntaxTree but I can't test this at the moment, something like GetRootNamespace or GetLibraryNamespace

@artiomchi
Copy link
Member

The root namespace of the project is either going to be in the RootNamespace property in the project's .csproj file or will be derived from the project ID. Either way, parsing the .csproj with an xml reader seems to be the way to go.

See also:
https://stackoverflow.com/questions/36806989/how-get-default-namespace-of-project-with-roslyn

@kevinkuszyk
Copy link
Member Author

@artiomchi was this covered in PR #47?

@kevinkuszyk kevinkuszyk added this to the alpha1 milestone Jun 8, 2017
@artiomchi
Copy link
Member

It hasn't been implemented/used yet, so I'd keep it open until we've got it in place

@wwwlicious
Copy link
Contributor

Although written for something else, you may find the following useful when parsing msbuild project files to get things like the rootnamespace.
https://github.com/cake-contrib/Cake.Incubator/blob/develop/src/Cake.Incubator/ProjectParserExtensions.cs#L217

@artiomchi
Copy link
Member

Looking at the state of the project right now, we didn't need the root namespace of the project anymore, so seems like this is no longer needed. As such, I'm closing this

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

3 participants