I am struggling to get dotnet pack to generate a nuget package from a .NetCore2.1 project.
When I run dotnet pack from the cmd line the project is restored but then it goes no further.
Is this a limitation? I am struggling to find anything valuable online.
I am using AspNetCore.Mvc so moving to standard is not an option...
Thanks.
ASP.NET Core and Xunit / test projects aren't packable by default. To create a package containing View assets, create a Razor class library instead. Or create a class library project for .NET Core.
Alternatively, you can add this to your csproj file to force the project to be packable:
Do not that these defaults have been put in place to prevent packages from creating unwanted side-effects or not behaving as expected so use with caution.