title: Trying to add System.Media namespace to a Visual Studio Code Project
body: <p>I am currently working on a small game-project with the goal to make a program using CSharp. </p>
  
  <p>The project is a console app that has a text-based menu and starting screen and my current goal is to add audio playing as the app launches. </p>
  
  <p>I have researched what I need in order to get music to play but I lack the assembly to do so.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>using System;
  using System.Media;
  
  namespace AntFightingSim
  {
  class Program
  {
      public static string[] menuButtons = new string[] { " Fight!(Press Space) ", " Exit The Game!(Press Escape)" };
      public static bool appRunning = true;
      public static string path;
      public static int buttonCount = 0;
      static void Main(string[] args)
      {
          path = "C:/Users/Spyros/OneDrive - Södertörn university/Project Folder/Csharp Projects/RandomProjects/AntFightingSim/Resources/Dragon Ball FighterZ - OST - Loading Theme.wav";
          MenuMethod();
      }
  
      static void MenuMethod()
      {
  
          while (appRunning &amp;&amp; buttonCount != 1)
          {
              SoundPlayer player = new SoundPlayer();
              player.SoundLocation = path;
              player.Load();
              player.PlayLooping();
              Console.WriteLine("ANT INVESTMENT SIMULATOR");
  
              Console.WriteLine("Press any key to start");
              Console.Write("\n");
              Console.Write("\n");
              Console.ReadKey(true);
  
              Console.Write(menuButtons[0]);
              Console.Write(menuButtons[1]);
              ConsoleKeyInfo info = Console.ReadKey(true);
              if (info.Key == ConsoleKey.Spacebar)
                  StartGame();
              else if (info.Key == ConsoleKey.Escape)
              {
  
                  buttonCount++;
  
              }
  
          }
          while (appRunning &amp;&amp; buttonCount == 1)
          {
              Console.Write("\n");
              Console.Write("\n");
              Console.WriteLine("Are you sure about that?(Press Escape Again)");
              ConsoleKeyInfo info = Console.ReadKey(true);
              if (info.Key == ConsoleKey.Escape)
              {
                  appRunning = false;
              }
  
          }
  
      }
  
  
      static void StartGame()
      {
          buttonCount = 1;
      }
  }
  
  static class Ant
  {
      public static int strength;
      public static int dexterity;
      public static int agility;
      public static string name;
      public static bool gender;
  }
  }
  </code></pre>
  
  <p>I googled the error:</p>
  
  <blockquote>
    <p>The type or namespace name 'Media' does not exist in the namespace 'System' (are you missing an assembly reference?) [C:\Users\Spyros\OneDrive -
    Södertörn university\Project Folder\Csharp Projects\RandomProjects\AntFightingSim\AntFightingSim.csproj]</p>
  </blockquote>
  
  <p>but I don't have the slightest clue as to how to get said assembly reference into Visual Studio Code. So far, Google has only given me 2004-2015 results for Visual Studio only.</p>
  
  <p>Which leads me here. For the first time, I wrote and posted a question in StackOverflow out of desperation. Is there a way to add said namespace/different namespace or is it just not possible in Visual Studio Code? God Speed. </p>
  
  <p>Edit: </p>
  
  <p>After a bit of searching, i have figured out that the <code>System.Media</code> namespace and its assembly (PresentationCore.dll) does not exist within the NuGet list.</p>
  
  <p>Since i lack the knowledge of a proper assembly that helps me with my goal, i am now at the point where i need to ask for an altenative to <code>System.Media</code> and its ability to play audio files.  </p>