Try this:
1) create a <packages_id>.props
file under build
folder of the project folder. In your side, it should be named as RazorClassLibrary1.props
so that the file will work. See this link.

And if your nuget package is called RazorClassLibrary1.1.0.0.nupkg
, the file should be RazorClassLibrary1.props
and keep the name same as the package id.
2) add these under RazorClassLibrary1.props
:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyFiles" BeforeTargets="Build">
<ItemGroup>
<File Include="$(MSBuildThisFileDirectory)..\Areas\**\*.*"></File>
</ItemGroup>
<Exec Command="xcopy /I/e/d/s/y %(File.Identity) $(ProjectDir)Areas\"></Exec>
</Target>
</Project>
3) add these on RazorClassLibrary1.csproj
file:
<ItemGroup>
<None Include="Areas\**\*.*" Pack="true" PackagePath="Areas"></None>
<None Include="build\RazorClassLibrary1.props" Pack="true" PackagePath="build"></None>
</ItemGroup>
Also, when you install this new version of nuget package, please clean your nuget caches or delete all files under C:\Users\xxx(current user)\.nuget\packages
.
Besides, here is a similar issue.