The Component/@Direcotr attribute was not found

246 views
Skip to first unread message

shane km

unread,
Jan 21, 2013, 10:16:10 AM1/21/13
to msi...@googlegroups.com
whenever I add this section:

                    <DataSource:ODBCExecute Id="MSSQLDemoDatabase_CreateSchema" ExecuteOnInstall="yes"
                     BasePath="[INSTALLDIR]" Type="SqlServer" File="MyDb.sql">FirstInstall</DataSource:ODBCExecute>

I get : The Component/@Direcotr attribute was not found

??

Daniel Doubrovkine

unread,
Jan 21, 2013, 4:50:12 PM1/21/13
to msi...@googlegroups.com
Can you please share the version of Wix, the version of MsiExt and maybe a bit more code around this. Is this nested in a MSSQLDatabase for example?


On Mon, Jan 21, 2013 at 10:16 AM, shane km <europ...@gmail.com> wrote:
DataSource:ODBCExecute




--

dB. | Moscow - Geneva - Seattle - New York
dblock.org - @dblockdotorg

shane km

unread,
Jan 22, 2013, 2:01:57 AM1/22/13
to msi...@googlegroups.com
This is my product.wxs contents:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
     xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension"
     xmlns:DataSource="http://schemas.appsecinc.com/wix/DataSourceExtension">
    
<Product Id="*" Name="MySetup2" Language="1033" Version="1.0.0.0" Manufacturer="Hewlett-Packard Company" UpgradeCode="bf1da750-c2fe-4026-9d2b-9d291a61a8b5">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="MySetup2" Level="1" ConfigurableDirectory="INSTALLDIR">
<ComponentGroupRef Id="ProductComponents" />
            <!--<ComponentRef Id="Web.config" />-->
            <!--<ComponentRef Id="MvcApplication4.dll" />-->
            <ComponentRef Id="StartMenuFolder" />
            <!--<ComponentRef Id="IISApplication" />-->
            <ComponentGroupRef Id='MvcApp'/>
            <!--<ComponentRef Id='SqlComponent' />-->
            <ComponentRef Id='MSSQLDatabaseMsiComponent' />
</Feature>
        <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
        <Binary Id="CreateTableScript"  SourceFile="c:\Temp\MyDb.sql" />
        
        <!-- Specify UI -->
        <UIRef Id="MyWebUI" />
 
    <!-- .NET Framework 3.0 SP 1 must be installed -->
<Property Id="FRAMEWORKBASEPATH">
<RegistrySearch Id="FindFrameworkDir" Root="HKLM" Key="SOFTWARE\Microsoft\.NETFramework" Name="InstallRoot" Type="raw"/>
</Property>
        <DataSource:ODBCConnection Id="DemoSQLServerConnection" ConnectionString="[ODBC_CONNECTION_STRING]" />
        
</Product>
    
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLDIR" Name="MySetup2" >
                    <!--<Component Id="Web.config" Guid="2ED81B77-F153-4003-9006-4770D789D4B6">
                        <File Id="Web.config" Name="Web.config" Source="$(var.SolutionDir)MvcApplication4\Web.config" DiskId="1" KeyPath="yes" />
                        <util:XmlFile Id="AppSettingsAddNode" File="[INSTALLDIR]Web.config" Action="createElement" ElementPath="/configuration/appSettings" Name="add" Sequence="1" />
                        <util:XmlFile Id="AppSettingsKeyAttribute" Action="setValue" File="[INSTALLDIR]Web.config" ElementPath="/configuration/appSettings/add" Name="key" Value="AddedDuringInstall" Sequence="2" />
                        <util:XmlFile Id="AppSettingsValueAttribute" Action="setValue" File="[INSTALLDIR]Web.config" ElementPath="/configuration/appSettings/add" Name="value" Value="This text was added during installation." Sequence="3" />
                    </Component>
                    <Directory Id="binFolder" Name="bin">
                        <Component Id="MvcApplication4.dll" Guid="7FC6DA37-12E5-463d-8E7E-08F73E40CCF2">
                            <File Id="MvcApplication4.dll" Name="MvcApplication4.dll" Source="$(var.SolutionDir)MvcApplication4\Bin\MvcApplication4.dll" DiskId="1" KeyPath="yes" />
                        </Component>
                    </Directory>-->
                </Directory>
                
                <Directory Id="MyWebAppStartMenuFolder" Name="SimpleWebApp">
                    <Component Id="StartMenuFolder" Guid="B3AEC4C4-3F8E-4865-B87A-B750533776B5" >
                        <util:InternetShortcut Id="SimpleWebAppShortcut" Name="SimpleWebApp" Target="http://localhost/SimpleWebApp/Default.aspx" Directory="MyWebAppStartMenuFolder" />
                        <RemoveFolder Id="RemoveStartMenuFolder1" On="uninstall"/>
                        <RegistryKey Root="HKCU" Key="SOFTWARE\torresdal.net\SimpleWebApp\SimpleWebAppShortcut">
                            <RegistryValue Type="string" Value="Default Value"/>
                        </RegistryKey>
                    </Component>
                </Directory>
                
</Directory>
            <!--<Component Id="SqlComponent" Guid="C50999A0-02FD-42d5-9F65-7375318DD328">
                <sql:SqlDatabase Id="SqlDatabase" 
                                Database="[DB_NAME]" 
                                Server="[DB_SERVERNAME]" 
                                CreateOnInstall="yes" 
                                DropOnUninstall="yes" 
                                User="SQLUser">
                    <sql:SqlScript Id="CreateTableScript" ExecuteOnInstall="yes" BinaryKey="CreateTableScript" />
                </sql:SqlDatabase> 
                <util:User Id="SQLUser" Name="[DB_USER]" Password="[DB_PASSWORD]" />  
            </Component>-->
            
            
            <Component Id="MSSQLDatabaseMsiComponent" Guid="0FEAF4B6-7065-47e2-A403-E94A4B176772">
                <CreateFolder/>
                <DataSource:MSSQLDatabase Id="MSSQLDemoDatabase" Name="DemoDatabase" ConnectionId="DemoSQLServerConnection"
                  CreateOnInstall="yes" DropOnUnInstall="yes" CheckIfExists="yes">

                    <DataSource:ODBCExecute Id="MSSQLDemoDatabase_CreateSchema" ExecuteOnInstall="yes"
                     BasePath="[INSTALLDIR]" Type="SqlServer" File="MyDb.sql">FirstInstall</DataSource:ODBCExecute>
                </DataSource:MSSQLDatabase>
            </Component>
            
            
        </Directory>
        
</Fragment>
<Fragment>
        <ComponentGroup Id="ProductComponents" Directory="INSTALLDIR">
            <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
            <!-- <Component Id="ProductComponent"> -->
            <!-- TODO: Insert files, registry keys, and other resources here. -->
            <!-- </Component> -->
        </ComponentGroup>
</Fragment>
</Wix>


I'm using WIX ver. 3.6

shane km

unread,
Jan 22, 2013, 2:07:22 AM1/22/13
to msi...@googlegroups.com
and MsiExt 1.3


On Monday, January 21, 2013 4:16:10 PM UTC+1, shane km wrote:

Daniel Doubrovkine

unread,
Jan 22, 2013, 9:18:17 AM1/22/13
to msi...@googlegroups.com
Can can you please give the full error from wix?

--
You received this message because you are subscribed to the Google Groups "msiext" group.
To view this discussion on the web visit https://groups.google.com/d/msg/msiext/-/lYb2bSWO9mUJ.

To post to this group, send email to msi...@googlegroups.com.
To unsubscribe from this group, send email to msiext+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/msiext?hl=en.
Reply all
Reply to author
Forward
0 new messages