unable to create a target path for the nuget package in linux , but its working in Windows

Aditya Dalai 20 Reputation points
2023-12-07T09:06:00.1866667+00:00

currently I am trying to create a nuget package in linux with the help of nuspec file . below is the content of my nuspec file .

<?xml version="1.0"?>
<package >
  <metadata>
    <id>myProject.Emulation.SPI.Virtual</id>
    <version>$version$</version>
    <title>myProject Emulation SPI Virtual</title>
    <authors>myProject AG</authors>
    <owners>myProject AG</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Provides all Emulation .</description>
    <tags>Emulation SPI Virtual</tags>
    <dependencies>
      <group targetFramework=".NETStandard2.0" >
        <dependency id="myProject.Energy.Emulation.Loader" version="2.0.1" />
        <dependency id="Microsoft.ApplicationInsights" version="2.21.0" />
        <dependency id="Microsoft.ApplicationInsights.TraceListener" version="2.21.0" />
        <dependency id="System.Configuration.ConfigurationManager" version="7.0.0" />
        <dependency id="System.Diagnostics.DiagnosticSource" version="7.0.2" />
        <dependency id="System.Drawing.Common" version="7.0.0" />
        <dependency id="Microsoft.Win32.SystemEvents" version="7.0.0" />
      </group>
    </dependencies>
  </metadata>
  <files>
    <file src="../../_Out/Release/myProject.Energy.Emulation.dll" target="lib/netstandard2.0"/>
    <file src="../../_Out/Release/myProject.Energy.Emulation.Data.dll" target="lib/netstandard2.0"/>
  </files>
</package>


by using this command nuget pack <myProject>.nuspec -version 4.4.4 I am able create a nuget file in linux but when I extract the nuget package in linux I am not able to see the lib folder and the dlls in it .

currently I am using NuGet Version: 2.8.7.0 in my Ubuntu Linux machine, but the same thing is working in windows where I am able to see the lib folder and its content . In windows NuGet Version: 6.1.0.106

please help me on this to fix the issue

below is a example of the nuget pack after extraction in linux User's image

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,568 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,562 questions
Microsoft Intune Linux
Microsoft Intune Linux
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Linux: A family of open-source Unix-like operating systems.
45 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Aditya Dalai 20 Reputation points
    2023-12-18T10:09:09.2733333+00:00

    nuget pack <myProject>.nuspec -version 4.4.4 -NoDefaultExcludes this command works if we give relative path in src target.

    0 comments No comments