Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to include views in asp.net 5 class library nuget package

I'm creating a class library project that will contain some ViewComponents. It is nice that VS 2015 can automatically produce the NuGet package for me, but is there any way that I can make it include content files like .cshtml view files that my ViewComponents will need?

Previously I've done packaging with batch files and nuspec files to make it include content, will I have to continue that approach or is there a way to tell VS 2015 about content files to include?

like image 225
Joe Audette Avatar asked Jul 14 '15 16:07

Joe Audette


People also ask

How do I use a Nupkg file?

Copy the . nupkg file to a local folder. Add the folder to your package sources using the nuget sources add -name <name> -source <path> command (see nuget sources). Note that you need only set this local source once on any given computer.

How use NuGet package in asp net?

Open your Visual Studio application. On the Tools menu, select Options. Expand the NuGet Package Manager and select Package Sources. Click the Add button (green plus), and enter the 'Package Name' and 'Package Source URL' of the Syncfusion ASP.NET Web Forms NuGet packages.

What is Nuspec file?

nuspec file is an XML manifest that contains package metadata. This manifest is used both to build the package and to provide information to consumers. The manifest is always included in a package. In this topic: General form and schema.

How do I add a class library to an existing project?

Create a class library project. Add a new . NET class library project named "StringLibrary" to the solution. Right-click on the solution in Solution Explorer and select Add > New Project.


1 Answers

Not doable as yet. The feature will be in beta7

like image 120
davidfowl Avatar answered Oct 20 '22 14:10

davidfowl