After some code changes introducing an STL/CLR vector member in a class (where it isn't even a member, it's just being passed internally between some member functions) I started getting this bunch of linker errors that I can't for the life of me get rid of:

Code:
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (80131188) : Duplizierte Typen wurden gefunden, aber die Felddeklarationen sind nicht konsistent (Typen: cliext.impl.vector_impl<Kalender::HolidayDescriptor ^,0>; Felder: _Myarray): (0x04000036).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (80131188) : Duplizierte Typen wurden gefunden, aber die Felddeklarationen sind nicht konsistent (Typen: cliext.impl.vector_impl<Kalender::HolidayDescriptor ^,0>; Felder: _Mysize): (0x04000037).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (80131188) : Duplizierte Typen wurden gefunden, aber die Felddeklarationen sind nicht konsistent (Typen: cliext.impl.vector_impl<Kalender::HolidayDescriptor ^,0>; Felder: _Mygen): (0x04000038).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (801311D7) : Unterschiedliche Anzahl von Feldern in duplizierten Typen (cliext.impl.vector_impl<Kalender::HolidayDescriptor ^,0>): (0x02000035).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (8013118B) : Duplizierte Typen wurden gefunden, aber die implementierten Schnittstellen sind nicht konsistent (Typen: cliext.impl.vector_impl<Kalender::HolidayDescriptor ^,0>; Schnittstellen: System.Runtime.CompilerServices.IsConst): (0x0900000b).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (8013118B) : Duplizierte Typen wurden gefunden, aber die implementierten Schnittstellen sind nicht konsistent (Typen: cliext.impl.vector_impl<Kalender::HolidayDescriptor ^,0>; Schnittstellen: System.IDisposable): (0x0900000c).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (8013118B) : Duplizierte Typen wurden gefunden, aber die implementierten Schnittstellen sind nicht konsistent (Typen: cliext.impl.vector_base<Kalender::HolidayDescriptor ^,0>; Schnittstellen: System.ValueType): (0x0900000d).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (8013118B) : Duplizierte Typen wurden gefunden, aber die implementierten Schnittstellen sind nicht konsistent (Typen: cliext.impl.vector_base<Kalender::HolidayDescriptor ^,0>; Schnittstellen: System.Object): (0x0900000e).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (8013118B) : Duplizierte Typen wurden gefunden, aber die implementierten Schnittstellen sind nicht konsistent (Typen: cliext.impl.vector_base<Kalender::HolidayDescriptor ^,0>; Schnittstellen: System.Runtime.CompilerServices.IsImplicitlyDereferenced): (0x0900000f).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (8013118D) : Duplizierte Typen (cliext._Dehandle<Kalender::HolidayDescriptor ^>) wurden gefunden, aber die Typenlayoutinformationen sind nicht konsistent: (0x02000033).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (8013118D) : Duplizierte Typen (cliext.is_handle<Kalender::HolidayDescriptor ^>) wurden gefunden, aber die Typenlayoutinformationen sind nicht konsistent: (0x02000034).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (80131195) : Die benutzerdefinierten Attribute sind nicht konsistent: (0x0c00002d).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (80131195) : Die benutzerdefinierten Attribute sind nicht konsistent: (0x0c00002e).
Holidays.obj : error LNK2022: Fehler bei Metadatenoperation (80131195) : Die benutzerdefinierten Attribute sind nicht konsistent: (0x0c000031).
LINK : fatal error LNK1255: Fehler bei Verknüpfung aufgrund von Metadatenfehlern.
Sorry for the German messages. I hope the error numbers and type names are explanation enough.

This is the .h file involved:

Code:
// Holidays.h

#pragma once

#include <cliext/set>
#include <cliext/map>
#include <cliext/vector>

namespace Kalender {

using namespace System;
using namespace System::Windows::Forms;
using namespace cliext;

typedef map<DateTime,String ^> HolidayMap_t;

[Flags]
public enum class FedState
{
  BadenWuerttemberg = 0x0001,
  Bayern = 0x0002,
  Berlin = 0x0004,
  Brandenburg = 0x0008,
  Bremen = 0x0010,
  Hamburg = 0x0020,
  Hessen = 0x0040,
  MecklenburgVorpommern = 0x0080,
  Niedersachsen = 0x0100,
  NordrheinWestfalen = 0x0200,
  RheinlandPfalz = 0x0400,
  Saarland = 0x0800,
  Sachsen = 0x1000,
  SachsenAnhalt = 0x2000,
  SchleswigHolstein = 0x4000,
  Thueringen = 0x8000,
  All = 0xFFFF,
  None = 0x0000
};

public ref class HolidayDescriptor // : public IComparable
{
public:
  HolidayDescriptor(DateTime ctDate,String ^ctName) : Date(ctDate), Name(ctName), StateMask(FedState::All)
  {}

  HolidayDescriptor(DateTime ctDate,String ^ctName,FedState ctState) : Date(ctDate), Name(ctName), StateMask(ctState)
  {}

/*
  virtual int CompareTo(Object ^other)
  {
    HolidayDescriptor ^temp = dynamic_cast<HolidayDescriptor ^>(other);
    return Date.CompareTo(temp->Date);
  }
*/

  DateTime Date;
  String ^Name;
  FedState StateMask;
};

typedef vector<HolidayDescriptor ^> HolidayVector_t;

public ref class Holidays
{
public:
  Holidays(MonthCalendar ^calNew) : cal(calNew), StateMask(FedState::All)
  {
    AddRegularHolidays();
    AddMovingHolidays(cal->SelectionStart.Year);
  }

  void AddMovingHolidays(int nYear);
  String ^HolidayName(DateTime dat);
  void ResetHolidays(FedState NewStateMask);
  array<HolidayDescriptor ^> ^GetHolidayArray(int nYear);

private:
  MonthCalendar ^cal;
  set<int> YearsCovered;
  HolidayMap_t HolidayMap;
  FedState StateMask;

  static DateTime EasterSunday(int nYear);

  void AddHolidayArray(array<HolidayDescriptor ^> ^aHol);
  void AddRegularHolidays();
  HolidayVector_t ^GetMovingHolidayVector(int nYear);
  HolidayVector_t ^GetRegularHolidayVector();
};

}
I omit the Holidays.cpp file for brevity, but of course I may post it too later if it should be of interest.

As mentioned above, the vector is only used internally to the Hollidays class. (Actually, I think I couldn't even expose it if I wanted: I tried and got a compiler error, so I stepped back to expose only arrays.) The HolidayDescriptor is only used internally as well, at least until now. The Holidays class itself is instantiated only once in the entire project, as a member of the main form class.

I typedefed the vector to avoid possible ambiguities caused by typos. I also commented out the IComparable implementation in the HolidayDescriptor class that is yet unused anyway. Both to no avail.

The DateTime and String ^ members in the HolidayDescriptor are CTS types and the FedState is an enum, which IMO essentially is nothing more than an integer and some constants. So I don't see what could be suspected of being of unstable size in there.

The MSDN page on that error recommends to do an ildasm -tokens on the object files in questions and compare the results. Unfortunately, my ildasm (version 4.0.30319.1) refuses to process .obj files at all...

I also did a forum search (10 threads hit) and a Google search, both of which brought up several pages that looked promising, but none of them seemed to apply to my case here. The most common scenario for that error seems to be a combination of managed and unmanaged code in the same project. But I didn't even use the type in question in more than one managed module...

So my conclusion is... nothing at all. I'm completely out of ideas yet again. Any advice anyone?

TIA