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

Add new document to the project #104

Open
vrassouli opened this issue Jun 26, 2019 · 2 comments
Open

Add new document to the project #104

vrassouli opened this issue Jun 26, 2019 · 2 comments

Comments

@vrassouli
Copy link

Is it possible to create a ISetOptionsFromClientExtension like what is mentioned at #83 , and adding some documents of code to the project?

session.Roslyn.Project.AddDocument is immutable, and as I could find, adding documents require the workspace!

@ashmind
Copy link
Owner

ashmind commented Jul 14, 2019

@vrassouli Thanks for asking! This is something I was planning to add/test explicitly, but haven't got to yet. You can definitely do the Roslyn part:

session.Roslyn.Project = session.Roslyn.Project.AddDocument(...).Project;

However the MirrorSharp part might expect exactly one document in some places, and may fail otherwise.

@vrassouli
Copy link
Author

Thanks for your reply
adding document this way, throws NotSupported exception:
System.NotSupportedException: 'Adding documents is not supported.'

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

2 participants