Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Namespace missing

Solved554 views25th November 2024
2
Stefan Schedletzky [DevOps Enabler]2.06K 29th July 2024 1 Comment

Hi,

I'm trying to use HttpClient in my QAction but I get the following error:
error CS0246: The type or namespace name 'HttpClient' could not be found (are you missing a using directive or an assembly reference?)

But I'm using:
using System.Net;
using System.Net.Http;

I'm a little bit lost now why it's showing the error. Any idea?

Stefan Schedletzky [DevOps Enabler] Selected answer as best 25th November 2024
Marieke Goethals [SLC] [DevOps Catalyst] commented 22nd November 2024

Hi Stefan,
I see that this question has been inactive for some time. Do you still need help with this? If not, could you select the answer (using the ✓ icon)?

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
4
Jeroen Neyt [SLC] [DevOps Advocate]2.35K Posted 29th July 2024 0 Comments

HttpClient lives in the System.Net.Http.dll assembly which is not referenced by default in SLScripting (the process which is executing the QActions) so you need to tell the QAction where you're using HttpClient to do so.

This can be achieved by configuring it through the dllImport attribute of the QAction.

e.g:

<QAction id="1" name="MyQAction" encoding="csharp" triggers="1" dllImport="System.Net.Http.dll">

Alternatively, if you're using DIS, you can just reference the dll in your QAction project and it will set everything right for you in the background.

Right click QAction project > Add > Project Reference... > Assemblies >  System.Net.Http > OK

Stefan Schedletzky [DevOps Enabler] Selected answer as best 25th November 2024
You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin