Skip to content

C# - error - "using System.Management" - "Error CS0234: The type or namespace name Management' does not exist in the namespace System'. Are you missing an assembly reference?" #26

Description

@DanielAdeniji

Experiencing an error when trying to compile a C# Source Code that contains "using System.Management".

error CS0234: The type or namespace name Management' does not exist in the namespace System'. Are you missing an assembly reference?

The source code reads:-

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

/*

    Error CS0234: The type or namespace name `Management' does not exist in the namespace `System'. Are you missing an assembly reference?

*/
using System.Management;

namespace HelloWorld
{
	public class Program
	{
	  
		public static void Main(string[] args)
		{
		  
		    Console.WriteLine("Hello World");
		    
		}
		
		
	}
	
}

Sample code available at

https://onecompiler.com/csharp/43dwfw4u4

onecompiler

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions