Disable comment formatting in Visual Studio 2010

I am doing inline API documentation using XML in comments and I would like to keep the indentation. Each time a document is formatted (CTRL + K CTRL + D), all indents inside / * * / are deleted. Is there any way to prevent this? It looks like I can keep the indentation if I use a one-line comment, but I would not resort to this. Thank you for your time.

/*
<ObjectProperty Name="id" Type="string" DefaultValue="''">
<Description>
Unique identifier of the data store. Primarily used for getting a handle  <docref class="ObjectManager">ObjectManager</docref>.
</Description>
<Examples>
<Example>
// Create an anonymous DataStore
// Update and Sort the data by using ObjectManager
new DataStore({ id: 'PersonsDS' });
ObjectManager.GetDataStore('PersonsDS').UpdateData([
{
ID: 1,
FirstName: 'Joe',
LastName: 'Bloggs'
},
{
ID: 2,
FirstName: 'Jane',
LastName: 'Doe'
}
]).Sort('LastName', 'desc');
</Example>
</Examples>
</ObjectProperty>
*/

Should look like

/*
<ObjectProperty Name="id" Type="string" DefaultValue="''">
    <Description>
        Unique identifier of the data store. Primarily used for getting a handle  <docref class="ObjectManager">ObjectManager</docref>.
    </Description>
    <Examples>
        <Example>
            // Create an anonymous DataStore
            // Update and Sort the data by using ObjectManager
            new DataStore({ id: 'PersonsDS' });
            ObjectManager.GetDataStore('PersonsDS').UpdateData([
            {
                ID: 1,
                FirstName: 'Joe',
                LastName: 'Bloggs'
            },
            {
                ID: 2,
                FirstName: 'Jane',
                LastName: 'Doe'
            }
            ]).Sort('LastName', 'desc');
        </Example>
    </Examples>
</ObjectProperty>
*/
+5
source share
1 answer

Visual Studio 2010 Power Tools ​​( Microsoft, ), - , Ctrl + K, D.

+1

All Articles