Wix installer error code 2343 received for a simple configuration. (WIX Newbie) - wpf

I am receiving the following error when using the following simple WIX configuration. The application being installed is WPF.
Product: Web Miner Installer -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2343. The arguments are: , ,
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Application Title" Language="1033" Version="1.0.0.0" Manufacturer="Avant Prime" UpgradeCode="855a8b6e-c576-41e2-8118-8f3511613478">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="Application Title" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<UIRef Id="WixUI_InstallDir" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<DirectoryRef Id="ShortcutFolder">
<Component Id="ShortcutsComponent" Feature="ProductFeature" Guid="{B40F2C3F-CACC-4196-8F8F-C0F6B082404E}">
<CreateFolder Directory="ShortcutFolder" />
<RemoveFolder Id="RemoveShorcutFolder" Directory="ShortcutFolder" On="uninstall" />
<Shortcut Id="UninstallProduct"
Name="Uninstall xxxxxxx"
Target="[System64Folder]msiexec.exe"
Arguments="/x [ProductCode]"
Directory="ShortcutFolder"
Description="Uninstalls xxxxxxx"/>
<RegistryValue Id="RegistryShortcut"
Root="HKCU"
Key="SOFTWARE\xxxxxx\settings"
Name="Shortcut"
Value="1"
Type="integer"
KeyPath="yes" />
</Component>
</DirectoryRef>
<PropertyRef Id="NETFRAMEWORK45" />
<Condition Message="This setup requires the .NET Framework 4.5.1 to be installed.">
Installed OR NETFRAMEWORK45
</Condition>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Directory Id="ShortcutFolder" Name="xxxxxx"></Directory>
</Directory>
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="xxxxxxx" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent">
<File Source="$(var.MyApplication.TargetPath)" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
What am I missing or doing wrong?
Here is the requested log information. It is big so I attached a link.
WIX Installer Error Log

You should replace INSTALLLOCATION with the real property (INSTALLFOLDER in your case)

Related

Referenced assembly FSharp.Data.SqlProvider.dll has assembly level attribute but no public type provider classes were found

How to make SQLProvider work in F#? I followed their steps but had few errors.
I run PM> Install-Package SQLProvider
Create a new .fsx script file
Load the dll #r #"C:\src\FSharpDB\DBTest\packages\SQLProvider.1.2.10\lib\net472\FSharp.Data.SqlProvider.dll"
At that stage, I have this warning:
Referenced assembly
'C:\src\FSharpDB\DBTest\packages\SQLProvider.1.2.10\lib\net472\FSharp.Data.SqlProvider.dll'
has assembly level attribute
'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute'
but no public type provider classes were found
If I continue and try to run the example script, it can't recongnised SqlDataProvider:
#r #"C:\src\FSharpDB\DBTest\packages\SQLProvider.1.2.10\lib\net472\FSharp.Data.SqlProvider.dll"
open FSharp.Data.Sql
type Sql = SqlDataProvider<
Common.DatabaseProviderTypes.MSSQLSERVER,
"Server=myServer;Database=myDB;Trusted_Connection=True;">
Error:
The type 'SqlDataProvider' is not defined.
Am I missing anything?
Edit:
As asked in the comments below, more information on the project configuration
App.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FSharp.Core" version="6.0.1" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net48" />
<package id="SQLProvider" version="1.2.10" targetFramework="net48" />
<package id="System.IO" version="4.3.0" targetFramework="net48" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net48" />
<package id="System.Runtime" version="4.3.1" targetFramework="net48" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="net48" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net48" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="net48" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
</packages>

wpf app msi created by wix not working due to dependency issue?

Here is my solution.
I have a basic wpf application which uses cefsharp to show google.com. The app works fine when run from my bin folder in VisualStudio itself.
For this application I have created the following WiX file:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"><?define WpfApplication6_TargetDir=$(var.WpfApplication6.TargetDir)?>
<Product Id="*" Name="SetupProject1" Language="1033" Version="1.0.0.0" Manufacturer="acv" UpgradeCode="PUT-GUID-HERE">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="SetupProject1" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="SetupProject1" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<!-- 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> -->
<Component Id="WpfApplication6.exe" Guid="*">
<File Id="WpfApplication6.exe" Name="WpfApplication6.exe" Source="$(var.WpfApplication6_TargetDir)WpfApplication6.exe" />
</Component>
<Component Id="WpfApplication6.exe.config" Guid="*">
<File Id="WpfApplication6.exe.config" Name="WpfApplication6.exe.config" Source="$(var.WpfApplication6_TargetDir)WpfApplication6.exe.config" />
</Component>
<Component Id="CefSharp.WinForms.dll" Guid="*">
<File Id="CefSharp.WinForms.dll" Name="CefSharp.WinForms.dll" Source="$(var.WpfApplication6_TargetDir)CefSharp.WinForms.dll" />
</Component>
<Component Id="CefSharp.dll" Guid="*">
<File Id="CefSharp.dll" Name="CefSharp.dll" Source="$(var.WpfApplication6_TargetDir)CefSharp.dll" />
</Component>
<Component Id="CefSharp.Core.dll" Guid="*">
<File Id="CefSharp.Core.dll" Name="CefSharp.Core.dll" Source="$(var.WpfApplication6_TargetDir)CefSharp.Core.dll" />
</Component>
</ComponentGroup>
</Fragment>
This code creates the setup, and when the application runs after installing the following exception occurs: Could not find cefsharp.core or one of its dependencies is not loaded.
This error appears when Visual c++ is not present.
How do I fix this, as I have Visual c++ installed.
Should I add any references in my WiX file?

IUP - Windows SDK static link

I want to write a multiplatform, native desktop application in C. After some searching, I found IUP to be the perfect fit. Unfortunately, I'm struggling to link the Windows SDK. For now, I just want to statically compile the x64 version for Windows 8.1. When I compile this example in Code::Blocks, I get the following errors:
g++.exe -LC:\MinGW\iup -o "bin-debug\EVE Editor.exe" obj-debug\main.o -lgdi32 -luser32 -lkernel32 -lcomctl32 -lole32 -lfreetype6 -liup -liup_mglplot -liup_plot -liup_scintilla -liupcd -liupcontrols -liupgl -liupglcontrols -liupim -liupimglib -liupmatrixex -liupole -liuptuio -lz
C:\MinGW\iup/libiup.a(iupwin_font.o):iupwin_font.c:(.text+0x1db): undefined reference to `__imp_CreateFontW'
C:\MinGW\iup/libiup.a(iupwin_font.o):iupwin_font.c:(.text+0x224): undefined reference to `__imp_SelectObject'
C:\MinGW\iup/libiup.a(iupwin_font.o):iupwin_font.c:(.text+0x240): undefined reference to `__imp_GetTextMetricsW'
C:\MinGW\iup/libiup.a(iupwin_font.o):iupwin_font.c:(.text+0x684): undefined reference to `__imp_SelectObject'
C:\MinGW\iup/libiup.a(iupwin_font.o):iupwin_font.c:(.text+0x734): undefined reference to `__imp_GetTextExtentPoint32W'
And so on and so forth. Here the IUP documentation says "For Windows, if you statically link the application with IUP you must link also with the libraries ole32.lib and comctl32.lib (provided with the compilers)." So I obtained the Windows SDK from here and recompiled with ole32 and comctl32. I got the same errors. I also looked at the Code::Blocks guide on the same page, but it's for dynamic linking.
I've never linked the Windows SDK before so I'm at a loss. Here is my Code::Blocks project:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="EVE Editor" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin-debug/EVE Editor" prefix_auto="1" extension_auto="1" />
<Option object_output="obj-debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/EVE Editor" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add directory="C:/MinGW/iup/include" />
</Compiler>
<ResourceCompiler>
<Add directory="C:/MinGW/iup/etc" />
</ResourceCompiler>
<Linker>
<Add library="gdi32" />
<Add library="user32" />
<Add library="kernel32" />
<Add library="comctl32" />
<Add library="ole32" />
<Add library="libfreetype6.a" />
<Add library="libiup.a" />
<Add library="libiup_mglplot.a" />
<Add library="libiup_plot.a" />
<Add library="libiup_scintilla.a" />
<Add library="libiupcd.a" />
<Add library="libiupcontrols.a" />
<Add library="libiupgl.a" />
<Add library="libiupglcontrols.a" />
<Add library="libiupim.a" />
<Add library="libiupimglib.a" />
<Add library="libiupmatrixex.a" />
<Add library="libiupole.a" />
<Add library="libiuptuio.a" />
<Add library="libz.a" />
<Add directory="C:/MinGW/iup" />
</Linker>
<Unit filename="main.c">
<Option compilerVar="CC" />
</Unit>
<Extensions>
<code_completion />
<envvars />
<debugger />
<lib_finder disable_auto="1" />
</Extensions>
</Project>
</CodeBlocks_project_file>
Try changing the order the linking is done. The dependency order must be reversed, I mean least dependent libraries last. For instance:
<Add library="libiupcontrols.a" /> -- optional
<Add library="libiupcd.a" /> -- optional
<Add library="libcd.a" /> -- optional
<Add library="libfreetype6.a" /> -- optional
<Add library="libz.a" /> -- optional
<Add library="libiup.a" />
<Add library="gdi32" />
<Add library="user32" />
<Add library="kernel32" />
<Add library="comctl32" />
<Add library="ole32" />
And you don't need to include all the IUP libraries, just the ones you actually use.

Directory xx is in the user profile but is not listed in the RemoveFile table

When iam trying to create the installer i am getting the following error:
Error Message:
ICE64: The directory ProgramMenuServersFolder is in the user profile but is not listed in the RemoveFile table. C:\Documents and Settings\admin\Desktop\SetupProject1\SetupProject1\Product.wxs 74 1 SetupProject1.
How to Proceed further?
<!--Start C2 by Me, ProgramMenuFolder is used to add shortcut on start menu -->
<Directory Id="ProgramMenuFolder">
<Directory Id="ProgramMenuLightRidgeFolder" Name="LightRidge Resources">
<Directory Id="ProgramMenuAdminFolder" Name="Admin"/>
<Directory Id="ProgramMenuServersFolder" Name="Servers">
<!--<Directory Id="ServersHisSubFolder" Name="Historian Server" />
<Directory Id="ServersMsgSubFolder" Name="Messaging Server" />-->
<Directory Id="ProgramMenuServersHisSubFolder" Name="Historian Server" />
<Directory Id="ProgramMenuServersMsgSubFolder" Name="Messaging Server" />
</Directory>
<Directory Id="ProgramMenuUtilitiesFolder" Name="Utilities"/>
</Directory>
</Directory>
<!--End C2 by Me -->
<Directory Id="DesktopFolder" Name="Desktop">
<Component Id="DesktopShortcut" Guid="{484EA493-A1E0-41d2-8E5D-67D30D8F03AD}">
<RegistryKey Root="HKCU" Key="Software\LightRidge Resources\PE-Advisor">
<RegistryValue Name="DesktopShortcutPe-Advisor" Value="1" Type="integer" KeyPath="yes" Action="write"/>
</RegistryKey>
<Shortcut Id="DesktopShortcut" Directory="DesktopFolder" Name="PE-Advisor" ShortName="PEAdv" Target="[PEADVISOR]Symcon.LightRidge.PEAdvisor.exe" Icon="GRAPH03.ICO"/>
</Component>
</Directory>
</Directory>
<!-- close tag of main directory-->
<UIRef Id="UserInterface"/>
<Feature Id="MainApplication" Title="Main Application" Level="1">
<!-- <ComponentRef Id="WFTest.exe" /> -->
<ComponentRef Id="ProductMain"/>
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="ApplicationHelpShortcut"/>
<ComponentRef Id="UtilitiesApplicationShortcut"/>
<ComponentRef Id="DesktopShortcut" />
<ComponentRef Id="UTILITIES" />
<ComponentRef Id="HISTORIAN" />
<ComponentRef Id="ADMIN" />
<ComponentGroupRef Id="PEAdvisorFiles"/>
<ComponentGroupRef Id="Historian"/>
<ComponentGroupRef Id="ConfigFiles"/>
<ComponentGroupRef Id="Help"/>
<ComponentRef Id="AdminApplicationShortcut"/>
<ComponentRef Id="HistorianApplicationShortcut"/>
<ComponentRef Id="MESSAGING"/>
<ComponentRef Id="MessagingApplicationShortcut"/>
<!--<ComponentRef Id="ServerApplicationShortCut"/>-->
</Feature>
<!-- Start C3 Me, Component Group of 'config' files -->
<ComponentGroup Id="ConfigFiles" Directory="CONFIG">
<Component Id="ColorSchemes" Guid="*">
<File Id="ColorSchemes" Source="D:\PE-Advisor Source code 4-26 11-July-2012 (Dowloaded from FTP site on19-Oct-12)\08 DesktopApplication\ExternalLib\config\ColorSchemes.xml" Name="ColorSchemes.xml" Vital="yes"/>
</Component>
<Component Id="config" Guid="*">
<File Id="config" Source="D:\PE-Advisor Source code 4-26 11-July-2012 (Dowloaded from FTP site on19-Oct-12)\08 DesktopApplication\ExternalLib\config\config.xml" Name="config.xml" Vital="yes"/>
</Component>
<Component Id="HelpConfig" Guid="*">
<File Id="HelpConfig" Source="D:\PE-Advisor Source code 4-26 11-July-2012 (Dowloaded from FTP site on19-Oct-12)\08 DesktopApplication\ExternalLib\config\HelpConfig.xml" Name="HelpConfig.xml" Vital="yes"/>
</Component>
<Component Id="PIConfig" Guid="*">
<File Id="PIConfig" Source="D:\PE-Advisor Source code 4-26 11-July-2012 (Dowloaded from FTP site on19-Oct-12)\08 DesktopApplication\ExternalLib\config\PIConfig.xml" Name="PIConfig.xml" Vital="yes"/>
</Component>
<Component Id="ReportServerConfig" Guid="*">
<File Id="ReportServerConfig" Source="D:\PE-Advisor Source code 4-26 11-July-2012 (Dowloaded from FTP site on19-Oct-12)\08 DesktopApplication\ExternalLib\config\ReportServerConfig.xml" Name="ReportServerConfig.xml" Vital="yes"/>
</Component>
<Component Id="OptionsConfig" Guid="*">
<File Id="OptionsConfig" Source="D:\PE-Advisor Source code 4-26 11-July-2012 (Dowloaded from FTP site on19-Oct-12)\08 DesktopApplication\ExternalLib\config\options.xml" Name="Options.xml" Vital="yes"/>
</Component>
<Component Id="version" Guid="*">
<File Id="version" Source="D:\PE-Advisor Source code 4-26 11-July-2012 (Dowloaded from FTP site on19-Oct-12)\08 DesktopApplication\ExternalLib\config\version.xml" Name="version.xml" Vital="yes"/>
</Component>
</ComponentGroup>
<DirectoryRef Id ="ProgramMenuServersHisSubFolder">
<Component Id="HistorianApplicationShortcut" Guid="{484EA493-A1E0-41d2-8E5D-87D30D8F03AD}">
<Condition>HISTORIAN</Condition>
<Shortcut Id="HistorianStartMenuShortcut" Name="Historian Server"
Description="Historian Server"
Target="[HISTORIANSERVER]HistorianServer.exe"
WorkingDirectory="APPLICATIONROOTDIRECTORY" Icon="GRAPH03.ICO"/>
<RemoveFolder Id="ProgramMenuServersHisSubFolder" On="uninstall"/>
<!--<RemoveFolder Id='RemoveProgramMenuServersFolder' Directory='ProgramMenuFolder' On='uninstall'/>-->
<!--<RemoveFolder Id="ProgramMenuServersFolder" On="uninstall" />-->
<!--<RemoveFolder Id="ProgramMenuServersFolder" On="uninstall"/>-->
<!--<RemoveFolder Id="ProgramMenuServersHisSubFolder" On="uninstall"/>-->
<!--<RemoveFolder Id="Servers" On="uninstall"/>-->
<RegistryValue Root="HKCU" Key="Software\LightRidge Resources\PE-Advisor" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<ComponentGroup Id="Messaging" Directory="MESSAGINGSERVER">
<Component Id="MESSAGING" Guid="{980EA493-A1E6-41d2-8E5D-87D30D8F03AD}">
<Condition>MESSAGING</Condition>
<File Id="Server" Source="D:\PE-Advisor Source code 4-26 11-July-2012 (Dowloaded from FTP site on19-Oct-12)\08 DesktopApplication\MessagingSystem\ExternalLib\Server.exe" Name="Server.exe" Vital="yes"/>
<File Id="ServerConfig.xml" Source="D:\PE-Advisor Source code 4-26 11-July-2012 (Dowloaded from FTP site on19-Oct-12)\08 DesktopApplication\MessagingSystem\ExternalLib\ServerConfig.xml" Name="ServerConfig.xml" Vital="yes"/>
<File Id="ServerComponentMessaging" Source="D:\PE-Advisor Source code 4-26 11-July-2012 (Dowloaded from FTP site on19-Oct-12)\08 DesktopApplication\MessagingSystem\ExternalLib\ServerComponent.dll" Name="ServerComponent.dll" Vital="yes"/>
<!--<RemoveFolder Id="ProgramMenuServersMsgSubFolder" On="uninstall"/>-->
<!--<RegistryValue Root="HKCU" Key="Software\LightRidge Resources\PE-Advisor" Name="installed" Type="integer" Value="1" KeyPath="yes"/>-->
</Component>
</ComponentGroup>
<DirectoryRef Id ="ProgramMenuServersMsgSubFolder">
<Component Id="MessagingApplicationShortcut" Guid="{980EA493-A8E6-41d2-8E5D-67D30D8F03AD}">
<Condition>MESSAGING</Condition>
<Shortcut Id="MessagingStartMenuShortcut" Name="Messaging Server"
Description="Messaging Server"
Target="[MESSAGINGSERVER]Server.exe"
WorkingDirectory="APPLICATIONROOTDIRECTORY" Icon="GRAPH03.ICO"/>
<RemoveFolder Id="ProgramMenuServersMsgSubFolder" On="uninstall"/>
<!--<RemoveFolder Id="ProgramMenuServersFolder" On="uninstall"/>-->
<!--<RemoveFolder Id="Servers" On="uninstall"/>-->
<RegistryValue Root="HKCU" Key="Software\LightRidge Resources\PE-Advisor" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
Please see another question with a solution to this: Directory xx is in the user profile but is not listed in the RemoveFile table.
Regards
Liam

Log4net not printing to console in wpf

I have a WPF application with 2 log4net appenders in log4net, the first printing to file and the second should print to console.
For some reason I am not being able to show the result on log4net, but I do see it in the file. What is wrong?
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net debug="true">
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="C:\\Temp\\1.txt" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="10MB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />
</layout>
</appender>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
<layout type="log4net.Layout.PatternLayout">
<param name="Header" value="[Header]\r\n" />
<param name="Footer" value="[Footer]\r\n" />
<param name="ConversionPattern" value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="RollingLogFileAppender" />
<appender-ref ref="ConsoleAppender" />
</root>
</log4net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
Do you see a console pop up when you start the application.
It could be you have to configure your application as a console project to have a console window...
Otherwise you can check trace info. Normally an appender tries to leave one error message there if he can't log to the desired location.
Output window of visual studio catches trace messages when debugging...
Possible duplicate: Log4net won't log to console (WinForms app)
If you are wanting to see the messages in the output window in visual studio you should use the following instead:
<appender name="TraceAppender" type="log4net.Appender.TraceAppender" >
Do you call once XmlConfigurator.Configure() ?

Resources