18.04.2015 Views

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

ArcGIS Engine Developer Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

.NET APPLICATION PROGRAMMING INTERFACE<br />

End Sub<br />

Public Overrides Sub Uninstall(ByVal savedState As<br />

System.Collections.IDictionary)<br />

MyBase.Uninstall(savedState)<br />

Dim regsrv As New RegistrationServices<br />

regsrv.UnregisterAssembly(MyBase.GetType().Assembly)<br />

End Sub<br />

End Class<br />

[C#]<br />

public override void Install(IDictionary stateSaver)<br />

{<br />

base.Install (stateSaver);<br />

RegistrationServices regSrv = new RegistrationServices();<br />

regSrv.RegisterAssembly(base.GetType().Assembly,<br />

AssemblyRegistrationFlags.SetCodeBase);<br />

}<br />

public override void Uninstall(IDictionary savedState)<br />

{<br />

base.Uninstall (savedState);<br />

RegistrationServices regSrv = new RegistrationServices();<br />

regSrv.UnregisterAssembly(base.GetType().Assembly);<br />

}<br />

2. Add a setup program to your solution.<br />

a. In the Solution Explorer, right-click the new project and click Add ><br />

Project Output. Choose the project you want to deploy and choose Primary<br />

output.<br />

b. From the list of detected dependencies that is regenerated, remove all<br />

references to ESRI primary interop assemblies (for example,<br />

ESRI.<strong>ArcGIS</strong>.System) and stdole.dll. The only items typically left in the list<br />

are your TLB and Primary output from ’,<br />

which represent the DLL or EXE you are compiling.<br />

180 • <strong>ArcGIS</strong> <strong>Engine</strong> <strong>Developer</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!