title: "Cannot find compilation library location for package "enc.dll"" error occur .net core dependency injection
body: <p>I am building a website using asp.net core mvc, and for the login i added dependency for enc.dll file, which just encrypt/decrypt user information.
  I made a Seeder class with enc.dll file, which has a key property and en/decrypt with the key. Then I added it to  my service to use dependency injection feature. </p>
  
  <pre><code>services.AddSingleton&lt;ISeeder, Seeder&gt;();
  </code></pre>
  
  <p>While it works well when i call enc, dec function of seeder class, it does not return any error. Below is the example code.</p>
  
  <pre><code>    private readonly ISeeder seed;
      public AccountController(ISeeder seed)
      {
          this.seed = seed;
      }
  
      [HttpGet]
      public IActionResult test()
      {
          string s = seed.Enc("testEncode");
          return Json(s);
      }
  </code></pre>
  
  <p>So it works when i return string s that is created by seed instance.</p>
  
  <p>but it is not working when i try to return a view without using seed instance and throwing an error, where Enc is the dll library i am using.</p>
  
  <pre><code>InvalidOperationException: Cannot find compilation library location for package 'Enc'
  Microsoft.Extensions.DependencyModel.CompilationLibrary.ResolveReferencePaths(ICompilationAssemblyResolver resolver, List&lt;string&gt; assemblies)
  </code></pre>
  
  <p>And below is my Seeder code. </p>
  
  <pre><code> private Enc enc;
      private readonly EncKey key;
      public Seeder(IOptions&lt;EncKey&gt; options)
      {
          enc = new Enc();
          key = options.Value;
      }
  
      public string Dec(string toDec)
      {
          return enc.Dec(toDec, key.EncryptKey);
      }
  
      public string Enc(string toEnc)
      {
          return enc.Enc(toEnc, key.EncryptKey);
      }
  </code></pre>
  
  <p>Could anyone help? I am working on .net core 2.0 environment</p>