How to document a file that is not in a solution? - ghostdoc

I have a need to document methods/functions in *.cpp code files that are not part of a .NET solution. Up until now my workaround has been to create a solution, but this is a time consuming step for all the different files I come across.
Does anyone know how this can be accomplished?

Scott,
Unfortunately, this is the workaround that you have to use as long as GhostDoc relies on some of the information from Visual Studio CodeDOM... The CodeDOM does not provide any info when you open just a single file.
Do you mind me asking if there is particular reason you are opening single file in VS? Other that these might be random files that are not part of a solution?
Thanks!

Related

Using MSBUILD like a classic MAKEfile -- how do I do this?

I'm frustrated by the lack of flexibility in the Visual Studio project/solution, but I realized that now that it uses MSBUILD it might be quite powerful but just doesn't expose that to the IDE. So I took a look at MSBUILD docs and don't know where to start! I wish there was a Nutshell book for that. Is there any good tutorial someone could point me to?
More specifically, here is the kinds of things I want to do:
Run a utility pre-processor to generate .CPP and .H files, which are then used by a regular C++ project. There are multiple inputs (to figure dependencies of; specifically should know if a normal .h file it uses has changed) and multiple outputs (at least one .cpp and one .h file) that are used as files in another project.
FWIW, the most complex case involves using Qt in a "normal" C++ project that can be built using VS Express 2010 or MSBUILD directly from a script on a server. Since that is a common library, there might be some guides or whatever to help? Note that a VS plug-in is not useful for the building stage, but could be used to initially generate project files that then rely only on MSBUILD and stuff included with the source code.
Would somebody please point me in the right direction?
--John
It gets worse from there, but that's my first goal.
I found the kind of information I was looking for in a book MSBuild Trickery: 99 Ways to Bend the Build Engine to Your Will by Brian Kretzler.
In the first 18 pages I found a few key pieces of information that, along with the on-line documentations I've already gone through, helps clear things up enough to try tackling my project. Details of interest include the processing order of how MSBuild reads and operates on the things in the file, quick points on when wildcard in items are expanded and how to handle generated files, and how to see what's happening in some practical cases or even step in the debugger.
FWIW, I managed to attack my problem without using the murky ".targets"/rules files that I have yet to understand, but only using better documented/exampled features (in particular, a Target that has wildcard items doesn't care that the file name extension is not in any ".target"; is simple enough to copy from example and allows the files to be seen in the IDE Project and added to the list using the IDE; again, the FileExtension there just works OK.)

Strange behavior of CHM project

Anybody can help me with a strange problem I am having with my CHM based project?
I took an existing CHM file and deconstructed the file using WinCHM. After that I added some new pages and compiled the project. The CHM file was created and everything looked great so far.
After that I put the entire folder (where the original CHM file was deconstructed) into SVN. When I opened the folder the next time I see that all the original formatting from the html pages is lost.
I cant seem to find a reason why. The css files are okay and i have not changed that at all. I know that finding a solution to this (or determining the problem) may not be easy for you guys with so little information.
But can you guys at least tell me what the problem might be?? We are talking possibilities that is all.
Somehow you are in different directories when running, so CHM compiler doesn't get a proper understanding of the CHM root ? E.g. you now run a batchfile via a shortcut instead of changing to the proper dir ? (either by cmd.exe or direct link?)y
If that is not it, try looking at it with some other CHM viewer (easier on non Windows, but e.g. kchmviewer builds for windows exist too). Sometimes they give more error information (but sometimes only in the console window)
Then update your question with what exactly went wrong.
The answer is so simple that I am surprised that it did not occur to me. The directories stylesheets, scripts and images are not in the same folder as the html files. These should be in the same folder.

decompiling an asp.net site

hallo all
i have an asp.net site which i have no source code for it.
anyway i would like to decompile the whole site and that way i can work on it agian.
how can i decompile an entire website easily to c# and not do it file by file with feflactor?
please help me with this, thank you!
You can use the File Disassembler plugin for Reflector. It'll let you dump out a whole assembly into code files all at once.
There's another plugin: FileGenerator, that looks like it'll do the same thing, and generate a project file for you to boot.
I have used Decompiler.NET in the past. It does a very nice job.
Decompiler.NET
Hopefully you have permission to Decompile this code.
In the time passed a number of new and much better options became available. JustDecompile and DotPeek are up to date free decompilers that are definitely up to the task of decompiling and asp.net site.
ILSpy should also be capable of doing this although it seems work on keeping it up to date is slowly coming to an end. dnSpy is a more obscure alternative for assemblies that have been somehow processed/modified after compilation, e.g. by obfuscator or IL optimizer, etc.

How to package an ASP.NET application to prevent customers from modifying it?

Is there a tool or some general approach to packaging all the files of an ASP.NET application into binary form to prevent modification once its deployed? I am thinking there would be a set of signed binaries and a config file for settings that we allow the customer to modify. Has anyone attempted this, is it even possible?
I would pay a reasonable amount for a slick commercial product that did this with minimal hassle.
UPDATE
Sorry, from the answers I can see that I wasn't clear. I meant literally packaging ALL files, not just the code files. This means aspx, scripts, images etc. I'm not trying to prevent reverse engineering... this is a supportability issue, i.e. to avoid dealing with problems brought about by customer messing with the files.
If you made a web application project than you can compile your code into a single dll file. You can find it in the bin folder.
Just use aspnet_compiler.exe to precomple everything and then use aspnet_merge.exe to roll up all of the compiled assemblies into a single assembly. You can use an obfuscation tool like DotFuscator if you want to make it more difficult to reverse-engineer. Visual Studio pro and up include a "lite" edition of Dotfuscator that you can use for this.
Your codebehind files will be compiled in a single dll as ZippyV already mentioned. The aspx files will get deployed normally on the webserver.
But still, your dll files can be disassembled quite easily. So to be sure you have to use an obfuscator.
If you mean ALL files including the aspx you could also consider ngen. It precompiles everything into a dll so you can't even get at the aspx pages.
Although, ngen was designed to get rid of the JIT compiling feature of the framework and is definitely not a generally recommended approach but it may work in your case well.
From VS2008 select the menu option "Tools" and then "Dotfuscator Community Edition". You will have a "Learn More" link after it starts up.
I also sign mine using SN.exe to make it have a strong name. Given all this, I think it is complicated enough to figure out a system if you are given the source code and help.... so I don't worry about it anymore.
maybe Dotfuscator your customer won't be able to modify it nor reverse-engineer it :)

Generate a Sandcastle help file for a website without the "Xml Documentation File" option

I am trying to generate a Sandcastle help file for a website. In the properties window for project, there aren't any options for creating the XML Documentation File required for Sandcastle.
The Build tab in the property pages only contains options for: Start Action, Build Solution Action, and Accessibility validation. I don't have any options for Output, or XML documentation file, like my other projects have.
The website I'm working with does not have an actual .proj file, which could be the problem. If this is the problem, what is the best way of creating one for a project that is under source control and being worked on by many people with minimal disruption?
This is using Visual Studio 2005 professional.
The problem with websites in VS2k5 is that, when they get compiled, the resulting dlls are a mess. No namespaces, weird names, etc.
If you truly want to generate a Sandcastle Help File, look at converting your website into a web application. You can definitely generate source code docs for that.
I haven't tried it yet, but you might want to try the following
Documenting Web Sites / Projects from Eric Woodruff's site. It gives the specifics on how it can be done.
Update: I did try it and it works for regular websites. The only issue I can see is
that the websites don't have namespaces. So when I run it I get a topic by
FolderName_WebPage Class format without any logical grouping. So it is alhpabetical by
folder and page name. Once you got the content created, you can edit the help file using
a helpcompiler / builder and group the topics as needed.

Resources