[wix-users] WiX C# Custom Action - build failed

Justin Cox cox.justin.a at gmail.com
Thu Feb 23 06:52:14 PST 2017


The two biggest things people usually miss are:

1. Ensure this is in AssemblyInfo.CS (SampleWixExtension should be replaced
with your project name/class)
[assembly:
AssemblyDefaultWixExtension(typeof(SampleWixExtension.SampleWixExtension))]

2. Ensure this is in <PropertyGroup> in the project's csproj file.
    <WixCATargetsPath Condition=" '$(WixCATargetsPath)' == ''
">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets</WixCATargetsPath>

On Wed, Feb 22, 2017 at 6:11 PM Hitesh Kesharia <hitesh.kesharia at gmail.com>
wrote:

> Thanks Justin for your response. Can yo please elaborate it? What steps I
> should verify?
>
> I have also tried sample code available here
> https://github.com/egandro/wixmvc6. It gives the same error. Looks like
> something is missing in my system. But unable to identify what is that.
>
>
>
> On 23 February 2017 at 01:13, Justin Cox <cox.justin.a at gmail.com> wrote:
>
> > Check to make sure it's in your assemblyinfo.   The Wix skeleton custom
> > action tutorial is great checklist for tracking down one of the few minor
> > things you might have missed
> >
> > On Wed, Feb 22, 2017, 10:58 AM Hitesh Kesharia <
> hitesh.kesharia at gmail.com>
> > wrote:
> >
> > > I am trying to build the sample WiX Custom action using C#. I have
> > created
> > > the TestCustomActions project using 'C# Custom Action Project' template
> > in
> > > VS 2015 Community edition.
> > >
> > > I am not able to build it. It keeps throwing the following error -
> > >
> > > C:\Program Files
> > > (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3832,5):
> > > error MSB3030: Could not copy the file
> > > "C:\TestCustomActions\obj\x86\Release\TestCustomActions.CA.dll" because
> > it
> > > was not found.
> > >
> > > Looks like, unmanaged CA.dll is not getting generated. Any idea, what
> > could
> > > be the problem?
> > >
> > >
> > >
> > >    - Which version of WiX are you building with?
> > >
> > > 3.10.3.007
> > >
> > >
> > >    - Which version of Visual Studio are you building with (if any)?
> > >
> > > VS 2015 Community Edition Update 3
> > >
> > >
> > >    - Which version of .NET are you building with?
> > >
> > > .Net 4.5.2
> > >
> > >
> > > --
> > > Hitesh Keshaira
> > >
> > > ____________________________________________________________________
> > > WiX Toolset Users Mailing List provided by FireGiant
> > > http://www.firegiant.com/
> > >
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
>
>
> --
> Hitesh Keshaira
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list