title: How to add tsconfig to razor class library nuget package
body: <p>I have created razor class library and added</p>
  <ul>
  <li>Typescript/tsconfig.json</li>
  <li>Typescript/scripts.ts</li>
  <li>PackageReference to <code>Microsoft.TypeScript.MSBuild</code></li>
  </ul>
  <p>When I reference the project in my app using ProjectReference, it works fine.</p>
  <p><strong>When I reference it using PackageReference, I'm getting weird build error:</strong></p>
  <blockquote>
  <p>tsc : error TS18003: Build:No inputs were found in config file 'C:/Users/danie/.nuget/packages/mypackage/0.5.0/contentFiles/any/net6.0/Typescript/tsconfig.json'. Specified 'include' paths were '[&quot;**/*&quot;]' and 'exclude' paths were '[&quot;../wwwroot&quot;]'. [C:\Projects\app\App.csproj]</p>
  </blockquote>
  <ol>
  <li><p>How do I properly include typescript in razor class library, so that I can create valid nuget package from it?</p>
  </li>
  <li><p>Why is the <code>dotnet build app.csproj</code> event attempting to build typescript located in nuget package?</p>
  </li>
  </ol>
  <hr />
  <p>This is my MyPackage.csproj</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Project Sdk=&quot;Microsoft.NET.Sdk.Razor&quot;&gt;
  
    &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;net6.0&lt;/TargetFramework
      &lt;GeneratePackageOnBuild&gt;True&lt;/GeneratePackageOnBuild&gt;
      &lt;PackageId&gt;MyPackage&lt;/PackageId&gt;
      &lt;EmbedUntrackedSources&gt;true&lt;/EmbedUntrackedSources&gt;
    &lt;/PropertyGroup&gt;
    
    &lt;ItemGroup&gt;
      &lt;SupportedPlatform Include=&quot;browser&quot; /&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;PackageReference Include=&quot;Microsoft.SourceLink.GitHub&quot; Version=&quot;1.0.0&quot; PrivateAssets=&quot;All&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.AspNetCore.Components.Web&quot; Version=&quot;6.0.0&quot; /&gt;
      &lt;PackageReference Include=&quot;Microsoft.TypeScript.MSBuild&quot; Version=&quot;4.5.3&quot;&gt;
        &lt;IncludeAssets&gt;runtime; build; native; contentfiles; analyzers; buildtransitive&lt;/IncludeAssets&gt;
        &lt;PrivateAssets&gt;all&lt;/PrivateAssets&gt;
      &lt;/PackageReference&gt;
    &lt;/ItemGroup&gt;
  
    &lt;ItemGroup&gt;
      &lt;Folder Include=&quot;wwwroot\&quot; /&gt;
    &lt;/ItemGroup&gt;
  &lt;/Project&gt;
  </code></pre>