visual studio extensibilty - How can I check if Silverlight debugging is enabled in an ASP.NET Web Site?

StackOverflow https://stackoverflow.com/questions/9855307

Domanda

How can I programatically check whether a Web Site has Silverlight debugging enabled (ie, whether the "Silverlight" checkbox under "Property Pages->Start Options" is checked)?

I know that for a Web Application (WAP), I can check this via EnvDTE ( by checking project.Properties.Item("WebApplication.SilverlightDebugging").Value), but for a Web Site, I can't find an equivalent property.

È stato utile?

Soluzione

For a Web Site project, there are properties named EnableASPXDebugging, EnableUnmanagedDebugging, and EnableSQLServerDebugging, but strangely there is no EnableSilverlightDebugging property. This might be a bug in Visual Studio.

Properties for Web Site projects are saved to the following file:

C:\Users\username\AppData\Local\Microsoft\WebsiteCache\Websites.xml

As a last resort, you can parse the file and read the value of the enablesilverlightdebugging attribute for your particular <Website>. Unfortunately, it seems that this file does not get updated until the project is closed, so the file may be out of sync with the actual setting.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top