Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6001521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:50:47+00:00 2026-05-23T00:50:47+00:00

I’m developing my first custom action but I can’t get the resulting .CA.dll file

  • 0

I’m developing my first custom action but I can’t get the resulting .CA.dll file to load. Heres the process at its simplest, and the result:

I create a custom action project and keep all the defaults. The class looks like this:

using Microsoft.Deployment.WindowsInstaller;
namespace CustomAction
{
public class CustomActions
{
[CustomAction]
    public static ActionResult CustomAction1(Session session)
    {
        session.Log("Begin CustomAction1");

        return ActionResult.Success;
    }
}
}

I then build the assembly (either in debug or release) which creates me a CustomAction.CA.dll file. I then try to run this test:

[TestMethod]
    public void LoadAssembly()
    {
        Assembly.LoadFrom(@"D:\CustomAction\bin\Debug\CustomAction.CA.dll");
    }

And get the error:
System.BadImageFormatException: Could not load file or assembly ‘file:///D:\CustomAction\bin\Debug\CustomAction.CA.dll’ or one of its dependencies. The module was expected to contain an assembly manifest.

Neither can I reference the custom action from my WiX project. Getting really frustrated!

Edit:
Had a look and when I run through VS test manager I’m getting the following in the application event log:
TmiDataManager.TryConvertPropertyValueToDisplayText: Failed to convert property value using the property descriptor’s type converter. System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.DefaultToType(IConvertible value, Type targetType, IFormatProvider Provider)
at System.String.System.IConvertible.ToType(Type type, IFormatProvider provider)
at System.ComponentModel.EnumConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)
at System.ComponentModel.TypeConverter.ConvertToString(Object value)”

Further edit: I can load the normal CustomAction.dll via Assembly.LoadFrom, so maybe this is a different issue to the BadImageFormat thing? Could there be any reason a blank action with no further dependencies wouldn’t load into my WiX project?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:50:47+00:00Added an answer on May 23, 2026 at 12:50 am

    CustomAction.CA.dll is a native-code DLL that contains the managed-code assembly and knows how to run as a custom action inside MSI. The managed-code assembly is “CustomAction.dll.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.