Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Darren Hunter 140 posts 232 karma points
    Jun 05, 2023 @ 15:13
    Darren Hunter
    0

    NuGet Package

    I having an Issue building a Nuget Package for my Media DashBoard project.

    In Visual Studio I have the option ticked that will build the nuget package and I have checked the Nuget package using Nuget Package Explorer and all the files I expect to be in the package are there.

    But when I install the package in to a test site I am only seeing half the files.

    it missing a number of CSS, JS and HTML files, all files are set as content and copy to output location but now showing up.

    Any Advice.

    Thanks Darren

  • Steffen Hornbæk Nielsen 54 posts 165 karma points
    Jun 06, 2023 @ 06:35
    Steffen Hornbæk Nielsen
    0

    Hi Darren,

    In Visual studio, you can try and select the static files and in the property window, set the "Build action" to "Content". This tells dotnet build, to include the files to the output directory. Remember to rebuild the project afterwards, to update the .csproj file.

    If this does not work, you might have a .nuspec file that is not setup correctly.

  • Darren Hunter 140 posts 232 karma points
    Jun 06, 2023 @ 09:44
    Darren Hunter
    0

    I have set the file as Content and I tried it with and with out copy and I am getting the same issue.

    Here is the Meta Data from Nuget enter image description here

    I am new to using NeGit this was generated by Visual Studio so I thought it would be correct.

    This is what I am seeing when I import the package in to my Vanilla Site.

    enter image description here

    So any clues would be helpful.

    Also it not copying the files to the correct location. It showing them as referenced in the project explorer but when you go to view the file system they are not there. enter image description here

    enter image description here

    I have tried to update the nuget package after it been generated with no changes or making it worse.

    Can some one point out what I am doing wrong please.

    Thanks Darren

  • Darren Hunter 140 posts 232 karma points
    Jun 06, 2023 @ 15:25
    Darren Hunter
    0

    I have been looking at .targer files and I can't seem to get this to work either, what am I doing wrong:

    enter image description here enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft