Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Trying to Add System::ComponentModel

Trying to Add System::ComponentModel

Scheduled Pinned Locked Moved Managed C++/CLI
questionc++visual-studiohelp
4 Posts 2 Posters 22 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Richard Andrew x64R Online
    Richard Andrew x64R Online
    Richard Andrew x64
    wrote on last edited by
    #1

    I want to use the Win32Exception class in my C++/CLI DLL. The docs say it is located in the System::ComponentModel namespace. But Intellisense is telling me that there is no ComponentModel namespace inside System. And worse, there is no System.ComponentModel DLL to which to add a reference. I'm stuck. How do I get the System::ComponentModel namespace and its classes into my DLL?

    The difficult we do right away... ...the impossible takes slightly longer.

    L 2 Replies Last reply
    0
    • Richard Andrew x64R Richard Andrew x64

      I want to use the Win32Exception class in my C++/CLI DLL. The docs say it is located in the System::ComponentModel namespace. But Intellisense is telling me that there is no ComponentModel namespace inside System. And worse, there is no System.ComponentModel DLL to which to add a reference. I'm stuck. How do I get the System::ComponentModel namespace and its classes into my DLL?

      The difficult we do right away... ...the impossible takes slightly longer.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      you might try: Microsoft.Win32.Primitives.dll There is conflicting / confusing information out there. I've confirmed the above in C#.

      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

      Richard Andrew x64R 1 Reply Last reply
      0
      • L Lost User

        you might try: Microsoft.Win32.Primitives.dll There is conflicting / confusing information out there. I've confirmed the above in C#.

        "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

        Richard Andrew x64R Online
        Richard Andrew x64R Online
        Richard Andrew x64
        wrote on last edited by
        #3

        Thanks Gerry. I have 125 copies of that file on my dev machine. Each one is a different size, date, version and in a different folder. I think I'll work around not having that exact exception class for now. :sigh:

        The difficult we do right away... ...the impossible takes slightly longer.

        1 Reply Last reply
        0
        • Richard Andrew x64R Richard Andrew x64

          I want to use the Win32Exception class in my C++/CLI DLL. The docs say it is located in the System::ComponentModel namespace. But Intellisense is telling me that there is no ComponentModel namespace inside System. And worse, there is no System.ComponentModel DLL to which to add a reference. I'm stuck. How do I get the System::ComponentModel namespace and its classes into my DLL?

          The difficult we do right away... ...the impossible takes slightly longer.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          The documentation at Win32Exception Class (System.ComponentModel) | Microsoft Learn[^] tells you which dll holds it.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups