title: Use AddServerSideBlazor() from inside a class library
body: <p>I am trying to setup my own Service Collection like so:</p>
  <pre><code>public static void AddMyServices(this IServiceCollection services)
  {
      services.AddServerSideBlazor();
      //services.AddTransient&lt;IMyService, MyService&gt;();
  }
  </code></pre>
  <p>I can't figure out how to get this running, I tried adding several NuGet References but none does work. e.g. <code>Microsoft.AspNetCore.Components.Web</code> to get <code>AddServerSideBlazor();</code> working.</p>
  <p>I want to use it like this in my Startup.cs:</p>
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
      services.AddMyServices();
  }
  </code></pre>
  <p>The Error I get:</p>
  <blockquote>
  <p>'IServiceCollection' does not contain a definition for
  'AddServerSideBlazor' and no accessible extension method
  'AddServerSideBlazor' accepting a first argument of type
  'IServiceCollection' could be found (are you missing a using directive
  or an assembly reference?)</p>
  </blockquote>
  <p>Edit:
  After some more looking into it I think the correct package is
  <code>Microsoft.AspNetCore.App.Ref</code> but adding it via NuGet gives me this error:</p>
  <blockquote>
  <p>The package Microsoft.AspNetCore.App.Ref 5.0.0 has a package type
  DotnetPlatform that is incompatible with this project.</p>
  </blockquote>