<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/2030/1/7/_/styles/combined.css?spaceKey=TOP&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/TOP/Building+.Net+Components+for+Asterisk+SCF">Building .Net Components for Asterisk SCF</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~khunt">Ken Hunt</a>
</h4>
<br/>
<h4>Changes (3)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" > <br>h2. Installation/Build Notes <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">1. Build Ice <br>Asterisk SCF currently requires a custom version of Ice, so if you haven't done so, you must build Ice from the source found in the Asterisk SCF Ice repo. In particular, you must build the cpp and cs sub-folders in the Ice build tree. <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;"><tbd></span> <span class="diff-added-words"style="background-color: #dfd;"> </span> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">Taking into account that the Ice build system places generated object code next to the source (for both debug and release builds), we recommend that, on Windows at least, you clone the Ice repo into two different locations, one for release and one for debug. You will want a release build of the cpp folder so that you get a release version of the slice2cs utility, and you will probably want a debug build of both the cpp and cs folders. Follow the INSTALL.WINDOWS instructions in those folders to build. <br> <br>If you follow this advice, in your release source Ice source tree, make sure you configure it for Release as follows: <br>{noformat} <br>1. Edit the cpp\config\Make.rules.mak <br>2. Uncomment the line: OPTIMIZE = yes <br>3. Build as usual, using: nmake /f Makefile.mak install <br>{noformat} <br> <br>{info} <br>A common problem encountered with the VS 2008 command prompt is that the C# compiler may not be in your path. If you have installed numerous SDKs (as many developers do), the FrameworkDir variable may be set to a useless value. This will cause you to get the error message: "csc was not a recognized command." To correct this, edit your vcvars32.bat file in a similar manner to this: <br> <br>*OLD:* <br>@SET FrameworkDir=Framework32 <br>@SET FrameworkVersion=v2.0.50727 <br> <br>*NEW:* <br>@SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework <br>@SET FrameworkVersion=v2.0.50727 <br>@SET Framework35Version=v3.5 <br>{info} <br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<h2><a name="Building.NetComponentsforAsteriskSCF-Overview"></a>Overview</h2>
<p>This page describes how to build the Asterisk SCF slice-defined Application Programming Interface (API) for components written in .Net languages. </p>
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>All core Asterisk SCF components are currently written in C++. Building the API for .Net is only required if you wish to build your own Asterisk SCF components using .Net languages.</td></tr></table></div>
<h2><a name="Building.NetComponentsforAsteriskSCF-SoftwareRequirements"></a>Software Requirements</h2>
<ul>
        <li>.Net framework 3.5</li>
        <li>Ice Third Party Libraries - <a href="http://www.zeroc.com/download.html" class="external-link" rel="nofollow">http://www.zeroc.com/download.html</a></li>
        <li>Visual Studio 2008 (or greater) <a href="http://www.microsoft.com/visualstudio/en-us/" class="external-link" rel="nofollow">http://www.microsoft.com/visualstudio/en-us/</a></li>
        <li>Ice plugin for Visual Studio. <a href="http://www.zeroc.com/vsplugin.html" class="external-link" rel="nofollow">http://www.zeroc.com/vsplugin.html</a></li>
</ul>
<h2><a name="Building.NetComponentsforAsteriskSCF-Installation%2FBuildNotes"></a>Installation/Build Notes</h2>
<p>1. Build Ice<br/>
Asterisk SCF currently requires a custom version of Ice, so if you haven't done so, you must build Ice from the source found in the Asterisk SCF Ice repo. In particular, you must build the cpp and cs sub-folders in the Ice build tree.</p>
<p>Taking into account that the Ice build system places generated object code next to the source (for both debug and release builds), we recommend that, on Windows at least, you clone the Ice repo into two different locations, one for release and one for debug. You will want a release build of the cpp folder so that you get a release version of the slice2cs utility, and you will probably want a debug build of both the cpp and cs folders. Follow the INSTALL.WINDOWS instructions in those folders to build. </p>
<p>If you follow this advice, in your release source Ice source tree, make sure you configure it for Release as follows:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>1. Edit the cpp\config\Make.rules.mak
2. Uncomment the line: OPTIMIZE = yes
3. Build as usual, using: nmake /f Makefile.mak install
</pre>
</div></div>
<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td>A common problem encountered with the VS 2008 command prompt is that the C# compiler may not be in your path. If you have installed numerous SDKs (as many developers do), the FrameworkDir variable may be set to a useless value. This will cause you to get the error message: "csc was not a recognized command." To correct this, edit your vcvars32.bat file in a similar manner to this:
<p><b>OLD:</b><br/>
@SET FrameworkDir=Framework32<br/>
@SET FrameworkVersion=v2.0.50727</p>
<p><b>NEW:</b><br/>
@SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework<br/>
@SET FrameworkVersion=v2.0.50727<br/>
@SET Framework35Version=v3.5</p></td></tr></table></div>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;">
<a href="https://wiki.asterisk.org/wiki/users/viewnotifications.action" class="grey">Change Notification Preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/TOP/Building+.Net+Components+for+Asterisk+SCF">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=8127046&revisedVersion=3&originalVersion=2">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/TOP/Building+.Net+Components+for+Asterisk+SCF?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>