title: .NET core 3.0 and MS Office Interop
body: <p>I am trying to use the recently-released .NET core with MS Office using the interop assemblies</p>
  
  <p>I've got a minimal project file</p>
  
  <pre><code>&lt;Project Sdk="Microsoft.NET.Sdk"&gt;
  
    &lt;PropertyGroup&gt;
      &lt;OutputType&gt;Exe&lt;/OutputType&gt;
      &lt;TargetFramework&gt;netcoreapp3.0&lt;/TargetFramework&gt;
    &lt;/PropertyGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include="Microsoft.Office.Interop.Word"&gt;
        &lt;Version&gt;15.0.4797.1003&lt;/Version&gt;
      &lt;/PackageReference&gt;
    &lt;/ItemGroup&gt;
  
  &lt;/Project&gt;
  </code></pre>
  
  <p>and this C# program</p>
  
  <pre><code>using System;
  using Microsoft.Office.Interop.Word;
  namespace ii
  {
      class Program
      {
          static void Main(string[] args)
          {
              var app = new Application();
              Console.WriteLine(app.Version);
              app.Quit();
          }
      }
  }
  </code></pre>
  
  <p>Unfortunately this fails with</p>
  
  <pre class="lang-none prettyprint-override"><code>Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. The system cannot find the file specified.
  File name: 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
  </code></pre>
  
  <p>When I added the package to the project I got this</p>
  
  <pre class="lang-none prettyprint-override"><code>warn : Package 'Microsoft.Office.Interop.Word 15.0.4797.1003' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.0'. This package may not be fully compatible with your project.
  info : Package 'Microsoft.Office.Interop.Word' is compatible with all the specified frameworks in project 
  </code></pre>
  
  <p>implying 'compatible' but not 'fully compatible'</p>
  
  <p>Is there a way to do this or must I use .NET Framework instead of Core?</p>
  
  <p>I am using Windows 10, .NET core 3.0.100 and MS Office 365 (Word is version 16.0.11929.20298)</p>