1

I am createing an EXE on the fly from my own code using codedom.

I can set all the attributes like Title, Description, Company... but I can't set the AssemblyName. Any ideas how to do it? Here is the code part I add on top before a Class:

Imports System.Reflection
'This works but the AssemblyName is set to the name of the exe file:
'If I rename the exe the assembly name also changes.
<Assembly: System.Reflection.AssemblyTitle("Title123"> )
<Assembly: System.Reflection.AssemblyDescription("Description123">)
<Assembly: System.Reflection.AssemblyCompany("qxxx enterprises">)


'I tried to add the following but it throws me an error
'"AssemblyName" cannot be used as an attribute because it does not inherit from 'System.Attribute'
<Assembly: System.Reflection.AssemblyName("Testapp123"> )

Any ideas how to set the AssemblyName? (I am not asking to change it after the exe was compiled.)

1
  • 1
    AssemblyName is not an attribute. It is what you automatically get after compiling from CompilerResults.CompiledAssembly.FullName. Sounds like you actually want to change the display name, use the CompilerParameters.OutputAssembly property for that. Nov 10, 2013 at 15:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.