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