Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Create Nuget package for dot net core project from static files

$
0
0

I have created npm package which has js and css files just similar to bootstrap as folder structure. I want to ship same package for .Net mvc web applications so I created .nuspec file specifying files from build output and created Nuget package. Both the Nuget and NPM package working great.

Now I want to publish same package for dot net core project. When I install same Nuget package in dot net core web application it installed successfully but does not copied static files to project folders.

How to create/fix nugget package of static files for dot net core application. I don't want to create .net core project to ship static files. It would be great if I could add some configuration file like .nuspec for dot net core application as well.

I have searched but not able to get any help in regards, So any suggestion or reference would be appriciated.

myproject.nuspec

<?xml version="1.0"?><package ><metadata><id>MyPackage</id><version>1.0.1</version><title>MyProject</title><authors>Me</authors><owners>Me</owners><projectUrl>some url...</projectUrl>   <requireLicenseAcceptance>false</requireLicenseAcceptance><description>This is similar to bootstrap</description><copyright>Copyright 2020</copyright><tags></tags><dependencies><dependency id="jQuery" version="[3.0.0, 4.0.0)" /></dependencies></metadata><files><file src="dist\css\**\*.*" target="content\Content\css" /><file src="dist\fonts\**\*.*" target="content\Content\fonts" /><file src="dist\js\mypackage.js" target="content\Scripts" /><file src="dist\images\**\*.*" target="content\Content\Images" /></files></package> 

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>