<br><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>2010/4/22 James Perrins &lt;<a href="mailto:james.perrins@gmail.com">james.perrins@gmail.com</a>&gt;:<br>
<br>&gt; Need to add:<br>&gt;<br>&gt; using System.Security;<br>&gt; [assembly: SecurityRules(SecurityRuleSet.Level1)]<br>&gt;<br>&gt; I haven&#39;t yet found anything that says where you can do this once for<br>&gt; an assembly - or whether you have to mark each class (probably doesn&#39;t<br>
&gt; hurt to mark each class) - all the examples are a bit trivial<br>&gt;<br><br>James,<br><br>You could add this line in <a href="http://trac.osgeo.org/mapserver/browser/trunk/mapserver/mapscript/csharp/config/AssemblyInfo.cs">AssemblyInfo.cs</a> which won&#39;t be re-generated during the build process.  However I&#39;d be curious to know whether this change breaks the existing builds with VS2003/VS2005/VS2008. If yes, then this addition should be conditional to VS2010 only.<br>
<br>&gt; I&#39;ve found some source in a slightly different location from your suggestions:<br>
&gt; ~\mapserver-5-6\mapscript\<div class="im">&gt; csharp</div><br>Ah, it seems I was referring to the GDAL project, but it seems you&#39;ve already found it.<br><br>&gt; As an aside (and why I&#39;ve been caught with this) is that referencing<br>
&gt; the mapscript_csharp.dll in a CLR 4 app works in design mode<br>&gt; apparently fine.  Its only when you try and run the compiled exe (or<br>&gt; as it turns out switch off &quot;suppress jit optimization on module load<br>
&gt; (managed code only)&quot;).  At that point even trying to load a mapObj<br>&gt; results in numerous memory errrors<br>&gt;<br><br>It would be helpful to submit a <a href="http://trac.osgeo.org/mapserver/newticket">new ticket</a> for this issue and describe your experiences here.<br>
<br>Best regards,<br><br>Tamas<br><br><br>