microsoft / VSProjectSystem

Documentation for extending Visual Studio with new types of projects.
Other
311 stars 87 forks source link

[Question] Attach Debugger #75

Closed dazinator closed 8 years ago

dazinator commented 8 years ago

I am fairly new to VS extension development, I have written a DDEX provider for VS, but that is about it.

I am looking for guidance for the following idea.

I would like a project based upon an ASP.NET WebForms project but with the following tweaks:

  1. I want to control the item types avaiable when you click add new item
  2. I want to control what happens when you click "Run" to run the project.

Number 2 is where I am struggling. I need to try and find the appropriate extensivity point so that when the project is "Run" the following happens:

  1. Do the normal build --> my msbuild targets will produce a deployment package for the project (this is essentially a NuGet package)
  2. The output of the project is "deployed" to a locally running "host" application.
  3. The standard VS debugger is then "Attached" to that locally running host process.

So really, the project is essentially an ASP.NET WebForms project that produces a custom output package when it is built, and when it is run, I want to start my own host process, deploy to that process, and then "Attach"

If anyone can point me in the right direction - in terms of approaches / extensivity points I would need to implement - I would be very greatful! Starting whether this should be a Project "Flavour" or a full blown new Project type..

aienabled commented 8 years ago

Hello! Have you checked this extensibility point https://github.com/Microsoft/VSProjectSystem/blob/master/doc/extensibility/IDebugLaunchProvider.md ?

BTW, how did you achieved extending the ASP.NET WebForms project type? Are there any documentation for this?

Regards!

dazinator commented 8 years ago

Hi @aienabled - thanks for pointing me towards that - I will look into it now!

I haven't achieved "flavouring" the ASP.NET WebForms project type just yet - but I assume it is possible due to this documentation: https://msdn.microsoft.com/en-us/library/bb166488.aspx

Although the docs on this repo for doing this aren't yet written: https://github.com/Microsoft/VSProjectSystem/blob/master/doc/overview/extend_an_existing_project_type.md

aienabled commented 8 years ago

@dazinator, thanks! The page on MSDN is related to flavoring previous VS project system based on COM-aggregation, not this project system (CPS based on MEF). Anyway, it's still very useful. There is a sample code - https://code.msdn.microsoft.com/CSVSXProjectSubType-2221cf55

adrianvmsft commented 8 years ago

@dazinator - I was wondering if I could close this issue based on the replies above.

There is a separate item #73 to improve the documentation for extend_an_existing_project_type.

dazinator commented 8 years ago

Yep, can be closed! Thanks

adrianvmsft commented 8 years ago

Great! Thanks!