I'm fairly new at C#, so bear with me if I misunderstand something.
I have an fairly old application at my job that allows you to import dll's to do certain automated tasks. All the old programmers left years ago and I have no support to contact for this application. I created a dll in visual studio 2013 using .NET 2.0 framework and I get this error message when trying to import it:
The format of the file 'MyDll.dll' is invalid. Type:System.BadImageFormatException
Source: mscorlib Stack Trace: at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Applications.frmApplications.loadFields()
at Applications.frmApplications.fillMenuItem()
at Applications.frmApplications.ugApplications_AfterSelectChange(Object sender, AfterSelectChangeEventArgs e)
at Infragistics.Win.UltraWinGrid.UltraGrid.OnAfterSelectChange(AfterSelectChangeEventArgs e)
at Infragistics.Win.UltraWinGrid.UltraGrid.FireEvent(GridEventIds id, EventArgs e)
at Infragistics.Win.UltraWinGrid.UltraGrid.SelectNewSelection(Type type, Selected selected)
at Infragistics.Win.UltraWinGrid.UltraGrid.InternalSelectItem(ISelectableItem item, Boolean clearExistingSelection, Boolean select)
at Infragistics.Win.UltraWinGrid.UltraGridRow.set_Selected(Boolean value)
at Applications.frmApplications.searchForApplication()
I looked up this error online and the basic consensious is that I am using the wrong .NET framework version. I have used .NET Reflector to see what version an older dll that works was using, and it comes up as version 1.1.12.30886 . Now my question is is there another way round this error, or can only dll .NET versions 1.1 be imported? And if so is there any way to change my dll's to the 1.1 framework, as I see its past its life cycle and is no longer supported and I don't see a way to install it in visual studio.