[wix-users] Could not harvest data from a file that was expected to be an assembly

Phill Hogland phill.hogland at rimage.com
Tue Jul 12 06:49:04 PDT 2016


I do not see anything in the code posted to indicate the use of heat.exe, verbose VS build log would provide those details.


Most Prism applications require that you deploy several Prism dlls (including the ones mentioned in those errors) with your application, yet your authored File element does not indicate any files, so I think that is where your problem is likely to be.


Since you indicate that your application "works" in the development environment, manually copy your application and the files it needs to a clean VM (or even a clean folder somewhere) and get your application "working" (separate from your project output folder and without any wix or msi).  Then compare that folder tree to what you actually have listed in your MSI File table (when viewed using orca).  That will show you the mismatch and then you need to author the File elements to pull in the required files.


I have used HarvestDirectory (and heat.exe on a command line) but never project harvesting.  I would not recommend doing any harvesting (and it is not clear that you are doing any) until you understand authoring a MSI explicitly.



________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Ingmar <uhp at gmx.net>
Sent: Tuesday, July 12, 2016 7:00:33 AM
To: 'WiX Toolset Users Mailing List'
Subject: Re: [wix-users] Could not harvest data from a file that was expected to be an assembly

Hmm, maybe I do something completely wrong. I have Visual Studio 2015 and created a WiX project inside my existing solution with the posted wxs file. After that, all I do is buidling the setup project inside Visual Studio which generates a file MyProject.wxs. After that Visual Studio shows the error of missing assemblies




-----Ursprüngliche Nachricht-----
Von: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] Im Auftrag von Farrukh Waheed
Gesendet: Dienstag, 12. Juli 2016 13:26
An: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Betreff: Re: [wix-users] Could not harvest data from a file that was expected to be an assembly

Harvest means, when you used Heat.exe to generate the Wix file, correct? Or did you used any third party GUI/IDE tool?

Yes, -scom is the Heat.exe's parameter, we used in console...
I asked this because in your posted Wix, I didn't any Com registration, but the error you are getting is most probably be related to this...



On 11 July 2016 at 23:50, Ingmar <uhp at gmx.net> wrote:

> How can I modify these parameters? I just build the setup project in
> visual studio. Do I have to harvest from console?
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] Im
> Auftrag von Farrukh Waheed
> Gesendet: Montag, 11. Juli 2016 18:22
> An: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Betreff: Re: [wix-users] Could not harvest data from a file that was
> expected to be an assembly
>
> While harvesting files, try using -scom
>
> On 11 July 2016 at 04:07, Ingmar <uhp at gmx.net> wrote:
>
> > Hi there,
> >
> >
> >
> > I have problems building my first setup for a solution which uses
> > prism. My Product.wxs looks like
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
> >
> >   <Product Id="*" Name="TestSetup" Language="1033" Version="1.0.0.0"
> > Manufacturer="none"
> > UpgradeCode="614eb7e3-e52c-4060-8999-5369fb8aa59d">
> >
> >     <Package InstallerVersion="200" Compressed="yes"
> > InstallScope="perMachine" Manufacturer="none" />
> >
> >
> >
> >     <MajorUpgrade DowngradeErrorMessage="A newer version of
> > [ProductName] is already installed." />
> >
> >     <MediaTemplate EmbedCab="yes" />
> >
> >
> >
> >     <Feature Id="ProductFeature" Title="TestSetup" Level="1">
> >
> >       <ComponentGroupRef Id="ProductComponents" />
> >
> >     </Feature>
> >
> >    <UIRef Id="WixUI_Minimal"/>
> >
> >   </Product>
> >
> >
> >
> >   <Fragment>
> >
> >     <Directory Id="TARGETDIR" Name="SourceDir">
> >
> >       <Directory Id="ProgramFilesFolder">
> >
> >         <Directory Id="INSTALLFOLDER" Name="next-office" />
> >
> >       </Directory>
> >
> >     </Directory>
> >
> >   </Fragment>
> >
> >
> >
> >   <Fragment>
> >
> >     <ComponentGroup Id="ProductComponents"
> > Directory="INSTALLFOLDER">
> >
> >       <Component Id="ProductComponent"
> > Guid="{A5B56773-5E26-4C5F-AC51-C2470C3658AF}">
> >
> >         <File Source="$(var.MyProject.TargetPath)" KeyPath="yes" />
> >
> >      </Component>
> >
> >     </ComponentGroup>
> >
> >   </Fragment>
> >
> > </Wix>
> >
> >
> >
> > When building the setup project I get these error
> >
> >
> >
> > Could not harvest data from a file that was expected to be an assembly:
> > Microsoft.Practices.Unity.dll
> >
> > The file or assembly "Microsoft.Practices.ServiceLocation,
> > Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
> > or a dependency was not found
> >
> >
> >
> > Could not harvest data from a file that was expected to be an assembly:
> > Prism.Wpf.dll
> >
> > The file or assembly "Microsoft.Practices.ServiceLocation,
> > Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
> > or a dependency was not found
> >
> >
> >
> >
> >
> > I don't know why Microsoft.Practices.ServiceLocation is missing, the
> > solution itself can be build and tested without any erros.
> >
> >
> >
> > Anyone knows how I can fix this problem?
> >
> >
> >
> > Thanks
> >
> >
> >
> > Ingmar
> >
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list