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

Workspace.OpenDocument does nothing #43015

Open
codehunter13 opened this issue Apr 2, 2020 · 1 comment
Open

Workspace.OpenDocument does nothing #43015

codehunter13 opened this issue Apr 2, 2020 · 1 comment
Labels
Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone

Comments

@codehunter13
Copy link

codehunter13 commented Apr 2, 2020

Version Used:
3.5.0.0

Steps to Reproduce:
_workspace is a visualstudio namespace. when calling following function, the newly added document is not opened.

 public void AddDocument(Project proj, string ns, string className, string txt, bool openFile)
        {
            var newDoc = proj.AddDocument(
                className + ".cs",
                txt,
                Code.GetFolders(proj.Name, ns)
                );
            if (!_workspace.TryApplyChanges(newDoc.Project.Solution))
                throw new Exception("Failed to apply changes to workspace");

            if (openFile && _workspace.CanOpenDocuments)
            {
                _workspace.OpenDocument(newDoc.Id, true);
            }
        }

Expected Behavior:
newly added document should be opened in visual studo

Actual Behavior:i
nothing happens, also no exception

@CyrusNajmabadi
Copy link
Member

Can you debug through to see why it's not working?

@jinujoseph jinujoseph added Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it labels Apr 8, 2020
@jinujoseph jinujoseph added this to the Backlog milestone Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug help wanted The issue is "up for grabs" - add a comment if you are interested in working on it
Projects
None yet
Development

No branches or pull requests

3 participants