Noel,
The problems was that NAnt now runs on the .NET Framework 2.0 by default (if
available), and the msi schema was written to a resources file (using the
xsd task, which used ResourceWriter for this). The resulting resources file
was tied to the framework on which NAnt was running (which is .NET 2.0 on my
system), and the format (atleast the version) of resources files has
apparently changed in .NET 2.0.
I fixed it by embedding the xsd as is, and loading it from the manifest
resource table directly (as a stream).
I'm uploading a new nightly build right now. Let me know if it works for
you.
Thanks for reporting this !
Gert
----- Original Message -----
From: "Noel Gifford" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "'Gert Driesen'"
<[EMAIL PROTECTED]>
Sent: Friday, July 23, 2004 2:03 AM
Subject: [Nant-users] Error with MSI task
>
> Gert,
>
> I'm running the current nightly build and trying to get the <msi> task to
> function.
> All I'm trying to do is to create an MSI that places two DLLs in the GAC,
> but I get a System.ArgumentException as shown below.
>
> Any help would be greatly appreciated.
>
> ----------------------------------- Build
> Script -----------------------------------------------------------
>
> <project name="Test" default="MSI">
>
> <target name="MSI">
> <msi sourcedir="." output="NAnt-TestMSI.msi" verbose="true" >
>
> <features>
> <feature name="F__GACFiles" title="TestMSI" display="2"
> typical="true">
> <description>TestMSI Deployment</description>
> </feature>
> </features>
>
> <properties>
> <property name="ProductName" value="TestMSI" />
> <property name="ProductVersion" value="1.0.40.10" />
> <property name="Manufacturer" value="Me, Inc" />
> <property name="ProductCode"
> value="{AE6B649B-05DE-48D2-A016-2D3815ED56D4}" />
> <property name="UpgradeCode"
> value="{25D0B350-489F-4723-9B81-77E693396752}" />
> </properties>
>
> <directories>
> <directory name="D__GACMSITest" foldername="GACMSITest"
> root="WindowsVolume" />
> </directories>
>
> <components>
> <component name="C__GACFiles"
> id="{BE40ABD7-213C-4722-8378-042E90603CC2}"
> attr="2"
> directory="D__GACMSITest"
> feature="F__GACFiles"
> installassembliestogac="true" >
> <fileset basedir=".">
> <include name=".\TestInstallGAC1.dll" />
> <include name=".\TestInstallGAC2.dll" />
> </fileset>
> </component>
> </components>
>
> </msi>
> </target>
> </project>
> ----------------------------------- NAnt
> Execution ----------------------------------------------------
>
> NAnt 0.85 (Build 0.85.1664.0; net-1.0.win32; nightly; 7/22/2004)
> Copyright (C) 2001-2004 Gerry Shaw
> http://nant.sourceforge.net
>
> Buildfile: file:///E:/Data/MSITest/MSITest.build
> Target(s) specified: MSI
>
>
> MSI:
>
>
> Build failed
>
> INTERNAL ERROR
>
> System.ArgumentException: Version conflict with ResourceManager .resources
> files
> ! Expected version: 1 but got: 2
> at System.Resources.ResourceReader.ReadResources()
> at System.Resources.ResourceReader..ctor(Stream stream, Hashtable
table)
> at System.Resources.RuntimeResourceSet..ctor(Stream stream)
> at System.Resources.ResourceManager.CreateResourceSet(Stream store)
> at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo
> cultur
> e, Boolean createIfNotExists, Boolean tryParents)
> at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo
> cultur
> e, Boolean createIfNotExists, Boolean tryParents)
> at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo
> cultur
> e, Boolean createIfNotExists, Boolean tryParents)
> at System.Resources.ResourceManager.GetString(String name, CultureInfo
> cultur
> e)
> at System.Resources.ResourceManager.GetString(String name)
> at NAnt.Contrib.Tasks.SchemaValidatedTask.InitializeTask(XmlNode
> TaskNode) in
> C:\Documents and Settings\drieseng\Local
> Settings\Temp\tmp3173.tmp\src\Tasks\Sc
> hemaValidatedTask.cs:line 99
> at NAnt.Contrib.Tasks.Msi.MsiTask.InitializeTask(XmlNode TaskNode) in
> C:\Docu
> ments and Settings\drieseng\Local
> Settings\Temp\tmp3173.tmp\src\Tasks\Msi\MsiTas
> k.cs:line 353
> at NAnt.Core.Task.InitializeElement(XmlNode elementNode) in
C:\Documents
> and
> Settings\drieseng\Local
Settings\Temp\tmp29C4.tmp\src\NAnt.Core\Task.cs:line
> 403
>
> at NAnt.Core.Element.Initialize(XmlNode elementNode, PropertyDictionary
> prope
> rties, FrameworkInfo framework) in C:\Documents and
Settings\drieseng\Local
> Sett
> ings\Temp\tmp29C4.tmp\src\NAnt.Core\Element.cs:line 272
> at NAnt.Core.Element.Initialize(XmlNode elementNode) in C:\Documents
and
> Sett
> ings\drieseng\Local
Settings\Temp\tmp29C4.tmp\src\NAnt.Core\Element.cs:line
> 192
> at NAnt.Core.Project.CreateTask(XmlNode taskNode, Target target) in
> C:\Docume
> nts and Settings\drieseng\Local
> Settings\Temp\tmp29C4.tmp\src\NAnt.Core\Project.
> cs:line 1003
> at NAnt.Core.Target.Execute() in C:\Documents and
Settings\drieseng\Local
> Set
> tings\Temp\tmp29C4.tmp\src\NAnt.Core\Target.cs:line 247
> at NAnt.Core.Project.Execute(String targetName, Boolean
> forceDependencies) in
> C:\Documents and Settings\drieseng\Local
> Settings\Temp\tmp29C4.tmp\src\NAnt.Cor
> e\Project.cs:line 876
> at NAnt.Core.Project.Execute() in C:\Documents and
> Settings\drieseng\Local Se
> ttings\Temp\tmp29C4.tmp\src\NAnt.Core\Project.cs:line 833
> at NAnt.Core.Project.Run() in C:\Documents and Settings\drieseng\Local
> Settin
> gs\Temp\tmp29C4.tmp\src\NAnt.Core\Project.cs:line 903
>
> Please send bug report to [EMAIL PROTECTED]
>
> Total time: 0.4 seconds.
>
>
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users