I have a wpf application that has a folder that holds all the images needed (called Images). In the Images folder I have imgAdd.png and the file path points to the correct place on my computer. The problem is, when I open the project in Visual Studio, I'm faced with multiple errors saying "Cannot locate resource 'images/imgadd.png'."
The Build Action is set to Resource, the file path is correct, I'm not sure why the picture isn't being found.
ImageSource="imgAdd.png"
Error 3 Cannot locate resource 'images/imgadd.png'.
<CommonControls:ccBilingualButton Canvas.Left="12" Canvas.Top="0" Cursor="Hand" Height="50" HorizontalAlignment="Right" Margin="0,0,86,6" Name="btnAddJustPerson" TabIndex="8" VerticalAlignment="Bottom" Width="75" LabelEnglish="Add" LabelFrench="Add" ImageSource="imgAdd.png" FontWeight="Bold" ImageLocation="Top" Foreground="Black" HorizontalContentAlignment="Center" BorderBrush="DarkBlue" BorderThickness="1" />
Related
I am getting an error while installing setup for my application...
Error:
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. This error code is 2612.
What could be an issue? Please help!
Found the solution, I had couple of shortcuts which were pointing to icon files (Help.ico) but they were not really icon files. Few weeks ago, I renamed Help image file (.png or .jpg) to Help.ico for some reason and setup was pointing to those files. Incorrect stream...
<Shortcut Id="StartMenuItemHelp" Name="Application Help" Directory="ProgramMenuDir"
WorkingDirectory="INSTALLDIR" Icon="Help.ico" Advertise="yes">
<Icon Id="Help.ico" SourceFile="$(var.SolutionDir)\SetupFiles\Help.ico" />
</Shortcut>
When I do the following:
<Image source={require('./images/hex-loader2.gif')} style={{width:400,
height: 400}} />
I get the following error:
Unable to resolve module ./images/hex-loader2.gif from
/Applications/react/xxxx/views/LoginView.js: Invalid directory
/Applications/react/xxxx/views/images/hex-loader2.gif
Folder Structure is:
projectRoot > views > images
Any ideas why?
When I put the image at the same level of LoginView.js it works but as soon as I add it to the images folder I get the above error.
As per Xamarin's Document I added the windows phone application to Xamarin.Forms project.
But, Step 5 is giving me error saying "Cannot create an instance of WindowsPhonePage".
<forms:WindowsPhonePage
xmlns:forms="using:Xamarin.Forms.Platform.WinRT"
x:Class="XamarinTest.WinPhone81.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:XamarinTest.WinPhone81"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
</forms:WindowsPhonePage>
OK, after a LOT of trial and error, I solved it. Guide didnt mention it, but I added Xamarin.Forms.Windows from NuGet and it solved the problem.
My first question is about the error below :
Module [Path/Name of dll].dll failed to register. HRESULT -2147024769. Contact your support personnel.
I can continue the installation but i want to get rid of this error if possible.
The second question is about the following error :
Error 1001. Exception occured when initializing the installation.
System.IO.FileNotFoundException: could not load file or assembly 'file:///C:\Windows\SysWOW64\files' or one of it's dependencies. The system cannot find the file specified.
I saw in different site and thread that the cause was the custom Action (in the value : /target=”[TARGETDIR]” -> /target=”[TARGETDIR]\”) but I can't found where is the error in my custom action. Here are the custom action realized using Designer for Wix Toolset :
<CustomAction Id="DIRCA_TARGETDIR" Property="TARGETDIR" Value="[ProgramFilesFolder][Manufacturer]\[ProductName]" Execute="firstSequence" />
<CustomAction Id="_FB3FF635_EF79_4863_91BD_70A0A11955B2.Uninstall" Execute="deferred" BinaryKey="InstallUtil" DllEntry="ManagedInstall" adx:VSName="Primary Output from Project" />
<CustomAction Id="_FB3FF635_EF79_4863_91BD_70A0A11955B2.Uninstall.SetProperty" Property="_FB3FF635_EF79_4863_91BD_70A0A11955B2.Uninstall" Value="/installtype=notransaction /action=uninstall /LogFile= /targ="[TARGETDIR]\" /usr=[ALLUSERS] /usr2=[MSIINSTALLPERUSER] /CommonProjAppData="[PROJCOMMONDATA]\" "[#_F521D169_ECD0_42B5_87F7_C2D8B6F9CA54]" "[VSDFxConfigFile]"" adx:VSName="Primary Output from Project" />
<CustomAction Id="_BE73DAD9_3524_4376_B45C_148B5871465B.Install" Execute="deferred" BinaryKey="InstallUtil" DllEntry="ManagedInstall" adx:VSName="Primary Output from Project" />
<CustomAction Id="_BE73DAD9_3524_4376_B45C_148B5871465B.Install.SetProperty" Property="_BE73DAD9_3524_4376_B45C_148B5871465B.Install" Value="/installtype=notransaction /action=install /LogFile= /targ="[TARGETDIR]\" /usr=[ALLUSERS] /usr2=[MSIINSTALLPERUSER] /CommonProjAppData="[PROJCOMMONDATA]\" "[#_F521D169_ECD0_42B5_87F7_C2D8B6F9CA54]" "[VSDFxConfigFile]"" adx:VSName="Primary Output from Project" />
<CustomAction Id="CA_CreateConfig" BinaryKey="ADXDPCADLL" DllEntry="GetConfig" />
Thanks for helping.
You're basically going in the wrong direction. You've converted a Visual Studio setup to WiX but you're trying to carry that VS custom action framework into WiX. The VS framework that calls managed code custom actions involves calling a C++ binary that then tries to load a NET runtime then use reflection to get into your assembly, instantiate classes and call methods. Apart from the fact that the InstallUtil Dll is transparent, undocumented and architecture dependent (you need either the 64-bit version or the 32-bit version) and therefore impossible to debug in cases like this, nobody actually bothers to propagate all this stuff into the WiX world because there are much better alternatives. For example if you're using installer classes to install services you don't need them at all. See ServiceInstall and ServiceControl. For generic custom action calls into managed code use the DTF managed code custom action framework.
How can I use ms-resource in page XAML file?
<Button Name="btn_SaveNote" Content="ms-resource:Done" ></Button>
If you want to use Strings from resource files in your windows 8 app.
Then use this
<Button x:Uid="StringName" Content="">
and in resource file it should be defined as
StringName.Content