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

@DanielAdeniji

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

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