-
Notifications
You must be signed in to change notification settings - Fork 4
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
Adding "Create new temporary project..." button to Start Page #5
Conversation
Definitely, yes. 😄 I haven't had a chance you look at this properly yet. Just thought I'd mention that GitHub for Visual Studio includes a start page extension (that was written before I started). I'm not sure how this or your PR works yet. Here's a link: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks fore the PR.
It would be nice if we could find a way to only make the package load when the StartPage is visible. See inline comment for suggestion.
Yes, that's the one.
I'm cool with hacks if we program defensively. 😄 The PR icon at the right hand side of the status bar is very similar to this. |
TemporaryProjects.Vsix builds the .vsix, TemporaryProjects.14.0 the `File > New` extension and TemporaryProjects.15.0 the StartPage extension.
I've now split it into Hopefully we will now be able to use It's still a bit rough around the edges, so feel free to fix anything that looks wrong. 😉 |
It appears we can use the StartPage PersistenceSlot as a UIContext.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can get rid of the dynamic/reflection hack now! :-) I wasn't sure whether to cast to ToolWindowPane
or WindowPane
. I'll leave this up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will now only load when the StartPage
tool window becomes visible, which is exactly what we want!
Move all GUIDs to TemporaryProjects.vsct.
Having two assemblies was unnecessarily complicated.
I was hoping that I'd be able to neatly split the extension into Visual Studio 2015 and Visual Studio 2017 compatible packages. Alas, there doesn't appear to be a way to specify which version of Visual Studio a package is compatible with. Since having two package assemblies was complicating things withing gaining anything, I've combined the packages back into a single Visual Studio 2015+2017 compatible assembly. I like having the VSIX project separate from package project, so I've left it split into two projects. Does that make sense? Do you think we're good to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is just about ready to merge.
What do you think?
Can you please wait until I'm able to look at this before merging (I hope that will be tomorrow). Thanks. |
I don't think I fully understand the reason for this. Is the purpose so that the source code can be contained in a regular project as opposed to a VSIX project? But it appears that TemporaryProjects.14.0 is still an extensibility project (although it doesn't create a VSIX), not a regular class library. Would it be possible to make it a regular class library? Can you please help me understand this? It's also possible I don't understand what a "package project" is. Does that have a meaning or do you simply refer to it as the "package project" because it contains the actual "AsyncPackage"s? Thanks |
But more importantly, I'm not able to build this right now. I'm getting this error when building TemporaryProjects.Vsix:
and 2 warnings:
Restarting doesn't help of course, neither does cleaning and restoring packages. Is there something wrong with my setup? Do you have any ideas? I'm using 15.8 Preview 5 |
I'm able to fix the build error and both warnings locally by adding the Microsoft.VSSDK.BuildTools package to TemporaryProjects.Vsix |
…ayout update if the start page is already loaded
I discovered a bug. If I open the start page in one tab and another unrelated tab, switch to the other tab and then back to the start page, the button is gone. It seems the content of the start page is recreated every time its tab is activated. edit: Fixed in 493bfcd |
…d on each activation
@jcansdale There's more bugs. This needs more investigation. For example:
|
Every time the Thanks for the fixes. It looks like you've made some worthwhile changes. 👍 |
@jcansdale I've made a change that makes it so that the button is displayed correctly when switching tabs and focus but undocking still isn't working properly, so this is a compromise. I tried many approaches (as described in the comment) and couldn't get this to work consistently. Do you think it's acceptable to ship this? |
@jcansdale Feel free to force push and squash this if you want |
db56fcd
to
b0298d0
Compare
@Neme12 I've changed the display name of the extension, you might need to manually uninstall the previous version from your experimental instance! |
Make StartPageExtender.Initialize testable using TestDriven.Net's `Test With > In-Proc (VS SDK)` command. Find Visual Studio version using Process.GetCurrentProcess(). This allows us to abort before doing any async in Visual Studio 2015.
@Neme12 Let me know if you're happy with the latest commit and I'll squash + merge. |
Add comments because it wasn't obvious why calling UnadviseWindowFrameEvents might be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I'd like to get automated deployment to the marketplace working now (#7). It is proving to be a little tricky. Let me know if you have any suggestions...
Thanks! |
Adds "Create new temporary project..." below "Create new project..." to the start page in VS 2017.
Screenshot:
@jcansdale Is this something you'd be interested in?