VSIX Detect that a solution has been created
up vote
1
down vote
favorite
While Microsoft makes it "reasonably easy" to determine when a solution has been opened or closed in a VSIX extension
IVsSolution.GetSolutionInfo(
out pbstrSolutionDirectory,
out pbstrSolutionFile,
out pbstrUserOptsFile);
I am puzzling how exactly in a VSIX extension can I get information / event on when a new solution is created. Is such a thing possible?
I'm assuming there must be some way to do this, but as the Microsoft extension documentation is sparse, I cannot find it.
c# visual-studio vsix
add a comment |
up vote
1
down vote
favorite
While Microsoft makes it "reasonably easy" to determine when a solution has been opened or closed in a VSIX extension
IVsSolution.GetSolutionInfo(
out pbstrSolutionDirectory,
out pbstrSolutionFile,
out pbstrUserOptsFile);
I am puzzling how exactly in a VSIX extension can I get information / event on when a new solution is created. Is such a thing possible?
I'm assuming there must be some way to do this, but as the Microsoft extension documentation is sparse, I cannot find it.
c# visual-studio vsix
The doco is terrible. The best thing you can do is browse the Managed Package Framework sourcecode. A great real-world example is the IronPython Language Extension
– MickyD
Nov 7 at 6:55
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
While Microsoft makes it "reasonably easy" to determine when a solution has been opened or closed in a VSIX extension
IVsSolution.GetSolutionInfo(
out pbstrSolutionDirectory,
out pbstrSolutionFile,
out pbstrUserOptsFile);
I am puzzling how exactly in a VSIX extension can I get information / event on when a new solution is created. Is such a thing possible?
I'm assuming there must be some way to do this, but as the Microsoft extension documentation is sparse, I cannot find it.
c# visual-studio vsix
While Microsoft makes it "reasonably easy" to determine when a solution has been opened or closed in a VSIX extension
IVsSolution.GetSolutionInfo(
out pbstrSolutionDirectory,
out pbstrSolutionFile,
out pbstrUserOptsFile);
I am puzzling how exactly in a VSIX extension can I get information / event on when a new solution is created. Is such a thing possible?
I'm assuming there must be some way to do this, but as the Microsoft extension documentation is sparse, I cannot find it.
c# visual-studio vsix
c# visual-studio vsix
edited Nov 7 at 6:39
MickyD
10.5k63152
10.5k63152
asked Nov 7 at 6:03
coactivechris
133
133
The doco is terrible. The best thing you can do is browse the Managed Package Framework sourcecode. A great real-world example is the IronPython Language Extension
– MickyD
Nov 7 at 6:55
add a comment |
The doco is terrible. The best thing you can do is browse the Managed Package Framework sourcecode. A great real-world example is the IronPython Language Extension
– MickyD
Nov 7 at 6:55
The doco is terrible. The best thing you can do is browse the Managed Package Framework sourcecode. A great real-world example is the IronPython Language Extension
– MickyD
Nov 7 at 6:55
The doco is terrible. The best thing you can do is browse the Managed Package Framework sourcecode. A great real-world example is the IronPython Language Extension
– MickyD
Nov 7 at 6:55
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Use the IVsSolutionEvents.OnAfterOpenSolution(Object, Int32) method, whose second parameter, fNewSolution is what you want: true if the solution is being created. false if the solution was created previously or is being loaded.
You get IVsSolutionEvents with the IVsSolution.AdviseSolutionEvents(IVsSolutionEvents, UInt32) / IVsSolution.UnadviseSolutionEvents(UInt32) methods
I created a working VSIX sample some time ago HOWTO: Get solution events from a Visual Studio package
Carlos, much appreciated, brother. Your code looks perfect. Cheers!
– coactivechris
Nov 7 at 21:34
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Use the IVsSolutionEvents.OnAfterOpenSolution(Object, Int32) method, whose second parameter, fNewSolution is what you want: true if the solution is being created. false if the solution was created previously or is being loaded.
You get IVsSolutionEvents with the IVsSolution.AdviseSolutionEvents(IVsSolutionEvents, UInt32) / IVsSolution.UnadviseSolutionEvents(UInt32) methods
I created a working VSIX sample some time ago HOWTO: Get solution events from a Visual Studio package
Carlos, much appreciated, brother. Your code looks perfect. Cheers!
– coactivechris
Nov 7 at 21:34
add a comment |
up vote
1
down vote
accepted
Use the IVsSolutionEvents.OnAfterOpenSolution(Object, Int32) method, whose second parameter, fNewSolution is what you want: true if the solution is being created. false if the solution was created previously or is being loaded.
You get IVsSolutionEvents with the IVsSolution.AdviseSolutionEvents(IVsSolutionEvents, UInt32) / IVsSolution.UnadviseSolutionEvents(UInt32) methods
I created a working VSIX sample some time ago HOWTO: Get solution events from a Visual Studio package
Carlos, much appreciated, brother. Your code looks perfect. Cheers!
– coactivechris
Nov 7 at 21:34
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Use the IVsSolutionEvents.OnAfterOpenSolution(Object, Int32) method, whose second parameter, fNewSolution is what you want: true if the solution is being created. false if the solution was created previously or is being loaded.
You get IVsSolutionEvents with the IVsSolution.AdviseSolutionEvents(IVsSolutionEvents, UInt32) / IVsSolution.UnadviseSolutionEvents(UInt32) methods
I created a working VSIX sample some time ago HOWTO: Get solution events from a Visual Studio package
Use the IVsSolutionEvents.OnAfterOpenSolution(Object, Int32) method, whose second parameter, fNewSolution is what you want: true if the solution is being created. false if the solution was created previously or is being loaded.
You get IVsSolutionEvents with the IVsSolution.AdviseSolutionEvents(IVsSolutionEvents, UInt32) / IVsSolution.UnadviseSolutionEvents(UInt32) methods
I created a working VSIX sample some time ago HOWTO: Get solution events from a Visual Studio package
answered Nov 7 at 12:19
Carlos Quintero
3,3891515
3,3891515
Carlos, much appreciated, brother. Your code looks perfect. Cheers!
– coactivechris
Nov 7 at 21:34
add a comment |
Carlos, much appreciated, brother. Your code looks perfect. Cheers!
– coactivechris
Nov 7 at 21:34
Carlos, much appreciated, brother. Your code looks perfect. Cheers!
– coactivechris
Nov 7 at 21:34
Carlos, much appreciated, brother. Your code looks perfect. Cheers!
– coactivechris
Nov 7 at 21:34
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53184300%2fvsix-detect-that-a-solution-has-been-created%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
The doco is terrible. The best thing you can do is browse the Managed Package Framework sourcecode. A great real-world example is the IronPython Language Extension
– MickyD
Nov 7 at 6:55