Dear Gordon,

Thanks for your help. Finally I managed to compile my project successfully.

But after compilation, the size of web.dll is only 5KB compared to 100KB
when I build with VS.NET.
I am look at the XLS file and the generated build file, seems there is no
sources .vb files included as below:

  <target name="compile" description="Compile project"
depends="init,VpGenUtility,VPDal5,VpBusLayer5">
    <vbc target="${target.type}" output="${dir.output}\${project.output}"
debug="${debug}" define="${define}" optioncompare="${vbc.optionCompare}"
optionexplicit="${vbc.optionExplicit}" optionstrict="${vbc.optionStrict}"
removeintchecks="${removeintchecks}" rootnamespace="${rootNamespace}">
      <references basedir="bin">
        <include asis="true" name="System.dll" />
        <include asis="true" name="System.Data.dll" />
        <include asis="true" name="System.Drawing.dll" />
        <include asis="true" name="System.Web.dll" />
        <include asis="true" name="System.Xml.dll" />
        <include name="${dir.lib}/Shared.dll" />
        <include name="${dir.lib}/WebUI.dll" />
        <include asis="true" name="System.Web.Services.dll" />
        <include name="Infragistics.WebUI.Shared.v2.1.dll" />
        <include name="Infragistics.WebUI.UltraWebGrid.v3.1.dll" />
        <include name="Infragistics.WebUI.UltraWebListbar.v2.2.dll" />
        <include name="Infragistics.WebUI.UltraWebNavigator.v3.2.dll" />
        <include name="Infragistics.WebUI.UltraWebTab.v3.dll" />
        <include name="Infragistics.WebUI.UltraWebToolbar.v2.2.dll" />
        <include name="${dir.lib}/DataAccess.dll" />
        <include name="${dir.lib}/Business.dll" />
        <include name="${dir.lib}/Interop.ADODB.dll" />
        <include name="${dir.lib}/Interop.VpGenUtility.dll" />
        <include name="${dir.lib}/Interop.VPDal5.dll" />
        <include name="${dir.lib}/Interop.VpBusLayer5.dll" />
      </references>
    </vbc>
  </target>



I suspected it is due to this line -----> <xsl:apply-templates
select="../Files" /> 
That not calling template "Files"

Do you have any idea? TIA.

Best regards,
Hadzramin



-----Original Message-----
From: Gordon Weakliem [mailto:[EMAIL PROTECTED] 
Sent: Saturday, December 11, 2004 6:15 AM
To: Ahmad Hadzramin AR
Subject: Re: Error when try VSConvert

Hi Ahmad,

It looks like SourceForge.NAnt.BuildException has been renamed
NAnt.Core.BuildException.  I wrote this script over 2 years ago, so I guess
it's fallen out of date with NAnt.  You'll want to just search and replace
for the BuildException references in the XSL and change the namespace to
match the new name.  

Gordon Weakliem
--- Ahmad Hadzramin AR <[EMAIL PROTECTED]>
wrote:

> Dear Gordon,
>  
> I have tried your script but got the error below. 
> I am using NAnt 0.85 (Build 0.85.1804.0; nightly;
> 12/9/2004) - nightly
> build. Thank you.
> This is when nant hits this target:
>  
>   <target name="Scripting" depends="init">
>     <script language="C#">
>       <code>
>   <![CDATA[
>    [System.Runtime.InteropServices.DllImport(
> "oleaut32.dll", 
>     CharSet =
> System.Runtime.InteropServices.CharSet.Auto, 
>     PreserveSig = false,SetLastError=true )]
>    private static extern void QueryPathOfRegTypeLib(
> 
>     ref Guid guid,          
>     Int16 wVerMajor, 
>     Int16 wVerMinor, 
>     Int32 lcid,
>  
>
[System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.Unm
> anagedType.VBByRefStr)] ref StringBuilder lpbstrPathName);
>    public static void ScriptMain(Project project) 
>    {
>     try
>     {
>      StringBuilder pathResult = new
> StringBuilder(1024);
>      Guid g = new
> Guid("{420B2830-E718-11CF-893D-00A0C9054228}");
>      QueryPathOfRegTypeLib(ref g,
>       1,
>       0,
>       0, 
>       ref pathResult);
>  
>      project.Properties["Scripting.path"] = pathResult.ToString();
>     }
>     catch (Exception e)
>     {
>      throw new SourceForge.NAnt.BuildException( String.Format("Error 
> {0} getting typelib path for guid
>
{420B2830-E718-11CF-893D-00A0C9054228}",e.Message),e);
>     }
>    }
>    ]]>
>    </code>
>     </script>
>     <tlbimp output="${dir.lib}/Scripting.dll"
> typelib="${Scripting.path}" />
>   </target>
> 
>  
>  
> -------------- ERROR-----------------
> init:
>  
>    [tstamp] Friday, December 10, 2004 4:00:47 PM.
>  
> Scripting:
>  
>    [script] Generated code for the script looks like
> :
>    [script] using System;
>    [script] using System.Collections;
>    [script] using System.Collections.Specialized;
>    [script] using System.IO;
>    [script] using System.Text;
>    [script] using System.Text.RegularExpressions;
>    [script] using NAnt.Core;
>    [script] using NAnt.Core.Attributes;
>    [script]
>    [script] [FunctionSet("script", "script")]
>    [script] public class
> nant05a89f12b65847da93567a14483f87cc :
> NAnt.Core.FunctionSetBase {
>    [script]
>    [script]     public
> nant05a89f12b65847da93567a14483f87cc(Project
> project,
> PropertyDictionary propDict) :
>    [script]             base(project, propDict) {
>    [script]     }
>    [script]   
> [System.Runtime.InteropServices.DllImport(
> "oleaut32.dll",
>    [script]     CharSet =
> System.Runtime.InteropServices.CharSet.Auto,
>    [script]     PreserveSig =
> false,SetLastError=true )]
>    [script]    private static extern void
> QueryPathOfRegTypeLib(
>    [script]     ref Guid guid,
>    [script]     Int16 wVerMajor,
>    [script]     Int16 wVerMinor,
>    [script]     Int32 lcid,
>    [script]
>
[System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.Unm
> anagedType.VBByRefStr)] ref StringBuilder lpbstrPathName);
>    [script]    public static void ScriptMain(Project
> project)
>    [script]    {
>    [script]     try
>    [script]     {
>    [script]      StringBuilder pathResult = new
> StringBuilder(1024);
>    [script]      Guid g = new
> Guid("{420B2830-E718-11CF-893D-00A0C9054228}");
>    [script]      QueryPathOfRegTypeLib(ref g,
>    [script]       1,
>    [script]       0,
>    [script]       0,
>    [script]       ref pathResult);
>    [script]
>    [script]     
> project.Properties["Scripting.path"] = pathResult.ToString();
>    [script]     }
>    [script]     catch (Exception e)
>    [script]     {
>    [script]      throw new
> SourceForge.NAnt.BuildException(
> String.Format("Error {0} getting typelib path for guid
>
{420B2830-E718-11CF-893D-00A0C9054228}",e.Message),e);
>    [script]     }
>    [script]    }
>    [script]
>    [script] }
>    [script]
>  
> BUILD FAILED
>  
> D:\websource\ViewPoint\testing.build(46,6):
> Compilation failed:
> c:\Documents and Settings\hadzramin.ar\Local
> Settings\Temp\z32y9rko.0.cs(42,16) : error CS0246:
> The type or namespace
> name 'SourceForge' could not be found (are you missing a using 
> directive or an assembly reference?) c:\Documents and 
> Settings\hadzramin.ar\Local
> Settings\Temp\z32y9rko.0.cs(42,12) : error CS0155:
> The type caught or thrown
> must be derived from System.Exception
> :
> NAnt.Core.BuildException:
> D:\websource\ViewPoint\testing.build(46,6):
> Compilation failed:
> c:\Documents and Settings\hadzramin.ar\Local
> Settings\Temp\z32y9rko.0.cs(42,16) : error CS0246:
> The type or namespace
> name 'SourceForge' could not be found (are you missing a using 
> directive or an assembly reference?) c:\Documents and 
> Settings\hadzramin.ar\Local
> Settings\Temp\z32y9rko.0.cs(42,12) : error CS0155:
> The type caught or thrown
> must be derived from System.Exception
>  
>    at NAnt.DotNet.Tasks.ScriptTask.ExecuteTask() in
>
d:\Source\nant-20041209T210341Z\src\NAnt.DotNet\Tasks\ScriptTask.cs:line
> 288
>    at NAnt.Core.Task.Execute() in
>
d:\Source\nant-20041209T210341Z\src\NAnt.Core\Task.cs:line
> 177
>    at NAnt.Core.Target.Execute() in
>
d:\Source\nant-20041209T210341Z\src\NAnt.Core\Target.cs:line
> 249
>    at NAnt.Core.Project.Execute(String targetName, Boolean
> forceDependencies) in
>
d:\Source\nant-20041209T210341Z\src\NAnt.Core\Project.cs:line
> 882
>    at NAnt.Core.Project.Execute() in
>
d:\Source\nant-20041209T210341Z\src\NAnt.Core\Project.cs:line
> 839
>    at NAnt.Core.Project.Run() in
>
d:\Source\nant-20041209T210341Z\src\NAnt.Core\Project.cs:line
> 908
>  
> Total time: 0.6 seconds.
>  
> 
> D:\websource\ViewPoint>
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system
> (http://www.grisoft.com).
> Version: 6.0.788 / Virus Database: 533 - Release
> Date: 11/1/2004
>  
> 
=== message truncated ===


=====
--
Gordon Weakliem
http://www.pcisys.net/~gweakliem


                
__________________________________
Do you Yahoo!? 
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 11/1/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 11/1/2004
 




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to