close

In my ending article, "Visual C# Express - File Types (5th In A Series)", I discussed the types of files Visual C# generates when you compose a guileless Windows undertaking. However, I restricted the talk to those files generated antecedent to the first-year existent body of the work.

This piece extends my past article, by examining the files created C# Express after you do a C# Express Build.

MSBuild

Post ads:
Sterling Silver Black Diamond Music Note Fashion Pendant / 25 Silver Cotton Filled Jewelry Display Gift Boxes 3x3 / 2.75ct Black Princess Cut Diamond Engagement Ring 14k

Microsoft created an whole new physique utility for Visual Studio 2005 titled MSBuild. In nonspecific when you tallness an complete solution, C# Express invokes MSBuild beside the treatment record as signaling. MSBuild after uses the mixture database to find the peculiar labor files which include XML build instruction manual.

It is massively absorbing to note, however, that the SimpleWindow3 jut out over directory generated by the C# Express IDE is not standalone; rather, it includes a insinuation to other XML overhang file, Microsoft.CSharp.targets, as usual located at a lower place the C:/WINDOWS/Microsoft.NETFramework/ reference work.

But that's not all. Microsoft.CSharp.targets includes yet another mention to yet another XML labor file,Microsoft.Common.targets, besides typically situated beneath the C:/WINDOWS/Microsoft.NETFramework file.

Post ads:
10k White Gold Diamond Inside-Out Hoop Earrings (2.00 / Necklace Bracelet Extender Set 1", 2" and 4" in Gold and / Double CZ Swarovski Gem Belly Navel Ring 14g 7/16"

In lighter-than-air of the above hearsay we can think that supreme of how C# Express builds task/solutions depends on MSBuild; and all but goose egg that MSBuild does is knotty coded. Rather, MSBuild follows a figure series that is mostly strong-minded by your (relatively) infinitesimal undertaking file, the bigger Microsoft.CSharp.targets, and the immense Microsoft.Common.targets file. The concluding case I checked, Microsoft.Common.targets was more than several cardinal lines of XML. Now, let us look into the files created by MSBuild in a typical Windows request.

Files Created in the SimpleWindow/SimpleWindow/obj/Release Directory

MSBuild creates the succeeding files in the SimpleWindow/SimpleWindow/obj/Release directory:

SimpleWindow.csproj.GenerateResource.Cache is an oddball unimportant wallet created by the GenerateResource Task of MSBuild. The Microsoft corroboration says for MSBuild calls it a "StateFile" and says it "Specifies the side of the road to an unrestricted cache database used to zip up state checking of links in .resx input files".

SimpleWindow.Properties.Resources.resources as well is the positional representation system compiled edition of the Resources.resx which we unnatural in my final nonfiction. Ultimately MSBuild golf links this in with the compiled versions of the C# files in this article of trade to green goods a free lower house file; so for purposes of this project it is an junior folder.

SimpleWindow.exe is the house created by MSBuild mistreatment the C# compliler (usingt the CSC job). It contains the listing of SimpleWindow.Properties.Resources.resources and the compiled contents of Form1.cs, Form1.Designer.cs, Program.cs, AssemblyInfo.cs, Resources.Designer.cs, and Settings.Designer.cs. This is the workable file create by this project.

SimpleWindow.pdb supports debugging. According to Microsoft, PDB files "hold debugging and hang over put across hearsay that allows incremental linking of a right pattern of your program". PDB files are created when you alter debugging in the C# hoard proecess.

Files Copied to the bin/Debug and bin/Release Directories

Finally, when MSBuild is smooth creating the SimpleWindow.exe legislative body and similar files, it copies to
SimpleWindow.exe and SimpleWindow.pdb to the SimpleWindow/SimpleWindow/bin/Release reference book.

Further Exploration

If you want to see more than engrossing behavior, hit the F5 key to run the rectify edition of your system later lay off the programme and inspect the the SimpleWindow/SimpleWindow/bin/Debug handbook. Magic - SimpleWindow.exe and SimpleWindow.pdb have been derived into the SimpleWindow/SimpleWindow/bin/Debug directory. What controls this? How does Visual C# Express cognize to use this catalogue and where to brainwave the files to dislocate into this directory? These are fascinating questions for imminent articles.

Summary

C# Express builds a reference book and a set of basis files when you most basic fabricate a Windows application project, but when you actually shape the hang over the MSBuild utility-grade takes ended and creates compiled assets files, computer program information sponsorship files, and ultimately an viable parliament file (SimpleWindow.exe).

----------

NOTE: I utilised frontal slaves for sub-directory separators in this article because the piece of work intermediate does not siding with blackslashes.

arrow
arrow
    全站熱搜

    bucklfyux 發表在 痞客邦 留言(0) 人氣()