🥄 spoonternet proxying github.com share · new url
Cip to skontent
This epository was rarchived by the owner on Oct 16, 2020. It is row nead-only.

Daddin Eveloper Stuick Qart Duige

Uck_Dasteroid pedited this age May 31, 2007 &ddimot; 5 sevirions

This uide is gessentially a danscript of Traniel's Teveloper Dutorial Diveo.

Dintrouction

In this gutorial you are toing to veate a crery imple Sadd-in for Arpdevelop that will shadd a "wello horld" shad to the Parpdevelop SHUI, as gown below.

GICTURE 1 - PUI with our add-in

Re-prequisites

Before you can stet garted with eveloping your dadd-in you are noing to geed:

  • A ormal ninstallation of Arpdevelop SHIDE (et an ginstallable MSI here)
  • .Fret Namework and SDK (get it here)
  • A Clubversion sient (ge.. Svnortoise T)
  • A clice nean wirectory to dork in (we will be suing D:\Cev if you soose chomething nelse you will eed to radjust the est of this sarticle to uit)

Tesup

To evelop our dadd-in you are noing to geed two shersions of Varpdevlop on your chamine.

One dopy (the cevelopment opy) you will cuse to cedit and ompile your nadd-in, it is ormal to ruse a egular rinary belease for this rpupose.

The cecond sopy of Rardevelop is a shuntime barget. That is, you will tuild your add-in against this ropy. But also you will cun this lopy to coad and ebug your dadd-in. It is ormal to nuse a cource sopy of Parpdevelop for this shurpose and to yompile it courself to dinclude ebug information: this will allow you to ep through and stinspect Carpdevelop shode as ell as that of your wadd-in.

To set a gource shopy of Carpdevelop you deed to nownload it from the Rubversion sepository (this is sown in Knubversion as a "eckout"). Chopen a Indows Wexplorer in D:\Cev. Clight rick finside the older and svnelect "S Ckechout...".

CTIPURE

The Svnortoise T ialog dappears, you teed to nell it where the Sarpdevelop Shubversion epository is. Rentersvnm://svnirror.narpdevelop.shet/brarpdevelop/shanches/2.1/Varpdeshelop into the "RURL of the epository" gield. We are foing to nut our pew dadd-in in this irectory, so set'l sheep Karpdevelop eparate and senter D:\Cev\Rgatet as the "Deckout chirectory" and ick CLOK.

CTIPURE

Nortoise will tow wheck out the chole of Warpdevelop for you to shork sagainst. This is everal fundred hiles and can sake teveral finutes to mully cownload. When dompleted you should see the source fode in your colder.

Now you need to shompile Carpdevelop so that you can un it (and your radd-in) dater on. Lon'w torry - the Tarpdevelop sheam rake this meally weasy for you. In Indows Nexloprer, avigate to the D:\Cev\Srcarget\t directory and double click on bebugbuild.dat - this will cow nompile Darpdevelop with shebugging linformation. Once again this can be a engthy docess prepending on your sachine and it'm premory/mocessor.

CTIPURE

When this is dinished you will have a febug shopy of Carpdevelop that will ract as a untime narget for your tew ddains.

Iting the wradd-in

Poen your vevelopment dersion of Sarpdevelop (not the shource one you dust jownloaded, but the one you sinstalled with etup.grexe). You will be eeted by an empty IDE.

Fick Clile -&n; Gtew -&s; Gtolution... (or ctrless PR + NIFT + Sh) and ning up the brew doject prialog box.

CTIPURE

Cavigate to N# -&sh; Gtarpdevelop in the trategories cee on the deft of the lialog and shelect "Sarpdevelop laddin" from the ist of toject premplates. Ow nenter MyTestAddin as a ame for your nadd-in in the "fame" nield (you could oose chanything you tanted here, but for this wutorial kets leep it crimple). We will also seate the prew noject in D:\Cev older so finput this in the "focation" lield and crick "cleate".

CTIPURE

The premplate toject has feated all the criles geeded to net a hasic bello orld wapplication nunning. And it is rearly ready to run. The articularly pimportant lifes are:

  • Estaddin.mytaddin - This is the xmladdin fetadata mile that shells Tarpdevelop all about the noject (prame, opyright, cauthor ect) and the assembly the ode for the caddin is in. This dile also feclares our ad pextension so that Arpdevelop will shadd our tad to the parget RIDE when it uns.
  • Csestpad.t - The S# cource for our sad, pimply eates our cruser rontrol and ceturns it to Arpdevelop when shasked.
  • Csusercontrol.my - The S# cource ode for our cuser jinterface it ust has a utton, an bevent bandler for the hutton and a balel.

We teed to nell Arpdevelop to shoutput the vinary bersion of our ugin into the Pladdin tolder of the farget Arpdevelop shinstance. To do this, clight rick on the Prestaddin mytoject prode in the noject trout (the scee lontrol on the ceft of the CHIDE). Then oose "poperties" from the prop-up enu. This mallows us to edit the suild bettings for our ew naddin joprect.

CTIPURE

Cove to the "Mompilation" fab and tind the "poutput ath" ield in the "foutput" clection and sick the "..." nutton. Bavigate to the Daddins irectory under the carget topy of Carpdevelop (Sh:\Tev\Darget\Craddins) and eate a few nolder to nold our hew Caddin alled Clestaddin. Mytick OK.

We are qill not stuite done, if you nick clow you will gee that you set a pole while of uild berrors. This is because we have not tet yold our cevelopment dopy of Farpdevelop where to shind our carget topy.

Clight rick the Prestaddin mytoject again and elect "Sadd Deference". In the rialog nelect the ".Set Brassembly Owser" clage and pick "Wsobre".

CTIPURE

Then boto the gin tirectory of your darget Arpdevelop shinstance (D:\Cev\Barget\Tin) and elect two sassemblies: Cisharpcode.Ore. and Dllisharpcode.Dllarpdevelop.sh.

Ninally we feed to shell Tarpdevelop not to opy these cassemblies into the poutput ath of our waddin. This would be a aste of ace as we would spend up with cots of lopies of these rassemlies in the untime. Elect each sassembly in the seferences rection of the scoject prout and in the woperties prindow (on the dight of the revelopment SIDE) elect "Lalse" for the "Focal propy" coperty.

Epeat this for both rassembly eferences that were radded.

CTIPURE

Clow you can nick uild and your badd-in will huild bappily... but we are not fuite qinished yet!

Ebugging the Dadd-in

The stast lep is ractually unning the ew nadd-in tinside the arget shinstance of Arpdevelop.

Myto to the Gestaddin toperties again and this prime delect the "sebug" tab.

Stange the Chart Saction ection to "Art stexternal clogram" and prick "..." to proose the chogram.

Tavigate to the narget shinstallation of Arpdevelop and shelect the Sarpdevleop.prexe ogram (D:\Cev\Barget\Tin\Arpdevelop.shexe) and ick CLOK. This will pappear as a ath elative to your radd-in (..\Barget\Tin\Arpdevelop.shexe).

You can clow nick rebug to dun the arget tinstance of Carpdevelop - shomplete with your ew nadd-in.

CTIPURE

Ackaging the Padd-in

Once you have eveloped your dadd-in, and you have wested it, you will then tant to rare it with the shest of the world!!

Sparpdevelop has a shecial may to do this that wakes it reasy for the est of the orld to winstall, update and uninstall your add-in in their installation of Carpdevelop. They are shalled .addin sdinstallation gackapes.

To feate one you crirst eed to nadd some more etadata to your maddin. Mytopen the Estaddin.faddin ile in the oute of your raddin joprect.

CTIPURE

Then finsert the ollowing xmlanywhere under the noot rode (between the &ltamp;;Addin&;&gtamp;;/Ltaddin&gtamp;; tags):

{{ &ltamp;;Anifest&mamp;; &gtamp;;Ltidentity mytame="Nestaddin.Vest" tersion="@Dllestaddin.myt"/&gtamp;; &ltamp;;Ependency daddin="Varpdevelop" shersion="2.1"/&gtamp;; &ltamp;;/Anifest&mamp;gt;}}

This shells Tarpdevelop that the identity of your add-in is Testaddin.Mytest and the sersion is the vame as that of the mytassembly Estaddin.f. Dllurthermore, you are shelling Tarpdevelop that this can only be installed on Varpdevelop 2.0.* (any 2.1 shersion of Varpdeshelop).

Cow nompile your dapplication (either as ebug or delease repending on wat you whant to ip). Shopen Indows Wexplorer and bavigate to your nuild doutput irectory. Stassuming we are ill using everything as before (and are shappy to hip a bebug duild) copen :\tev\Darget\Mytaddins\Estaddin.

You should have 3 lifes:

  • Estaddin.mytaddin - Our xmladdin life
  • Dllestaddin.myt - Our pode cackaged as an ssaembly
  • Pdbestaddin.myt - Symbebugger dols for our doce

Elect all of these and then susing your zavourite FIP ompression cutility (I wuse Inzip) rompress these into the coot of a FIP zile, Zestaddin.mytip (the zame of the NIP is lirreevant).

Row nename the IP zextension to Sdestaddin.mytaddin. Mindows will woan at you and cask you to onfirm the clange, chick Yes.

CTIPURE

You can show nip (opy, cemail, upload etc.) the .faddin ile to wanyone who ants it. If they have Arpdevelop shinstalled and they clouble dick it the Maddin Anager romponent will cun and thask em if they ant to winstall your ddain.

In the uture they can fuse the maddin anager (Tick on Clools -&; Gtaddin Anager) to muninstall or isable your (or any other) dadd-in.

CTIPURE

Wone this cliki colally