[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

format all .cs files in the project using visual studio 2005

puzzlecracker

10/14/2008 6:52:00 PM

Is there way to format all my source file in project, perhaps
follow some generic template (then I would also need one) since i have
a lot of files and I don't want to screw it up manually? Thanks
3 Answers

Cowboy

10/14/2008 8:24:00 PM

0

You can edit the template to fit whatever style you want the file to have
when you create a new class file, if that is your question. I do not
remember the folder for VS 2005 off hand, but I used to do it with every new
machine I set up. Primarily setting up regions to hold particular code
constructs (definitions, properties, methods, etc.)

On existing files, get a tool like Resharper, as it can reorganize the file
for you.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/Greg...

or just read it:
http://feeds.feedburner.com/Gre...

********************************************
| Think outside the box! |
********************************************
"puzzlecracker" <ironsel2000@gmail.com> wrote in message
news:f46eddd0-6ee7-489a-92aa-6546ca1db291@l33g2000pri.googlegroups.com...
> Is there way to format all my source file in project, perhaps
> follow some generic template (then I would also need one) since i have
> a lot of files and I don't want to screw it up manually? Thanks

puzzlecracker

10/15/2008 12:38:00 AM

0

On Oct 14, 4:23 pm, "Cowboy \(Gregory A. Beamer\)"
<NoSpamMgbwo...@comcast.netNoSpamM> wrote:
> You can edit the template to fit whatever style you want the file to have
> when you create a new class file, if that is your question. I do not
> remember the folder for VS 2005 off hand, but I used to do it with every new
> machine I set up. Primarily setting up regions to hold particular code
> constructs (definitions, properties, methods, etc.)
>
> On existing files, get a tool like Resharper, as it can reorganize the file
> for you.
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> Subscribe to my bloghttp://feeds.feedburner.com/Greg...
>
> or just read it:http://feeds.feedburner.com/Gre...
>
> ********************************************
> | Think outside the box! |
> ********************************************"puzzlecracker" <ironsel2...@gmail.com> wrote in message
>
> news:f46eddd0-6ee7-489a-92aa-6546ca1db291@l33g2000pri.googlegroups.com...
>
> > Is there way to format all my source file in project, perhaps
> > follow some generic template (then I would also need one) since i have
> > a lot of files and I don't want to screw it up manually? Thanks

Perhaps, I wasn't clear -- all I want is a tool that will go through
all of my files in the project and remove extra space, indent lines/
constucts, etc.

I am fairly sure vs2005 has this functionality.


Thanks

Cowboy

10/16/2008 2:40:00 PM

0

Resharper has the capability, to an extent (it is called cleanup). I do not
know of this built in to VS, at least not on a project wide basis. You can
go to edit >> advanced >> format document for individual files. I do not
know if you can adjust the rules, other than setting up the indent for each
line (toolls >> options, then, in tool, Text Editor >> All Languages >>
Tabs).

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://feeds.feedburner.com/Greg...

or just read it:
http://feeds.feedburner.com/Gre...

********************************************
| Think outside the box! |
********************************************
"puzzlecracker" <ironsel2000@gmail.com> wrote in message
news:ce20199d-31e9-48c7-b5a7-ed3740060bab@b31g2000prb.googlegroups.com...
> On Oct 14, 4:23 pm, "Cowboy \(Gregory A. Beamer\)"
> <NoSpamMgbwo...@comcast.netNoSpamM> wrote:
>> You can edit the template to fit whatever style you want the file to have
>> when you create a new class file, if that is your question. I do not
>> remember the folder for VS 2005 off hand, but I used to do it with every
>> new
>> machine I set up. Primarily setting up regions to hold particular code
>> constructs (definitions, properties, methods, etc.)
>>
>> On existing files, get a tool like Resharper, as it can reorganize the
>> file
>> for you.
>>
>> --
>> Gregory A. Beamer
>> MVP, MCP: +I, SE, SD, DBA
>>
>> Subscribe to my bloghttp://feeds.feedburner.com/Greg...
>>
>> or just read it:http://feeds.feedburner.com/Gre...
>>
>> ********************************************
>> | Think outside the box! |
>> ********************************************"puzzlecracker"
>> <ironsel2...@gmail.com> wrote in message
>>
>> news:f46eddd0-6ee7-489a-92aa-6546ca1db291@l33g2000pri.googlegroups.com...
>>
>> > Is there way to format all my source file in project, perhaps
>> > follow some generic template (then I would also need one) since i have
>> > a lot of files and I don't want to screw it up manually? Thanks
>
> Perhaps, I wasn't clear -- all I want is a tool that will go through
> all of my files in the project and remove extra space, indent lines/
> constucts, etc.
>
> I am fairly sure vs2005 has this functionality.
>
>
> Thanks