title: .NET Get embedded Resource File
body: <p>I have an embedded Resource File:</p>
  
  <p><a href="https://i.stack.imgur.com/sJiPA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/sJiPA.png" alt="enter image description here"></a></p>
  
  <p>I need to open it as a Stream.</p>
  
  <p>What I've tried (did not work, stream is null):</p>
  
  <pre><code>var assembly = Assembly.GetExecutingAssembly();
  using (var stream = assembly.GetManifestResourceStream("client_secret.json"))
  </code></pre>
  
  <p>Any ideas or suggestions?</p>
  
  <p><strong>Edit:</strong> What I'm doing with it:</p>
  
  <pre><code>using (var stream = assembly.GetManifestResourceStream("client_secret.json"))
  {
      credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
                  GoogleClientSecrets.Load(stream).Secrets,
                  // This OAuth 2.0 access scope allows an application to upload files to the
                  // authenticated user's YouTube channel, but doesn't allow other types of access.
                    new[] { YouTubeService.Scope.YoutubeUpload },
                    "user",
                    CancellationToken.None
                  );
  }
  </code></pre>