Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-10554

.NET: Jars are not copied to target dir under .NET Core

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.8
    • Component/s: platforms
    • Labels:
    • Release Note:
      .NET Core 3.0 supported officially
    • Ignite Flags:
      Release Notes Required

      Description

      We use PowerShell script to update post-build event in the target project and copy jar files to target directory during build.

      However, this no longer works with .NET Core.
      nuspec file should be updated with new format, see example from https://github.com/NuGet/Samples/blob/master/ContentFilesExample/authoring/ContentFilesExample.nuspec:

      <?xml version="1.0"?>
      <package>
        <metadata minClientVersion="3.3.0">
          <id>ContentFilesExample</id>
          <version>1.0.0</version>
          <authors>nuget</authors>
          <owners>nuget</owners>
          <requireLicenseAcceptance>false</requireLicenseAcceptance>
          <description>A content v2 example package.</description>
          <tags>contentv2 contentFiles</tags>
          <!-- Build actions for items in the contentFiles folder -->
          <contentFiles>
              <!-- Include Assets as Content -->
              <files include="**/images/*.*" buildAction="Content" />
              <files include="**/data.txt" buildAction="Content" />
              <!-- Copy tool scripts to the output folder -->
              <files include="**/tools/*" buildAction="None" flatten="false" copyToOutput="true" />
          </contentFiles>
        </metadata>
      </package
      

      UPDATE: this breaks NuGet package usage completely under .NET Core 3.0
      NuGet behavior has changed in .NET Core 3.0:

      The dotnet build command now copies NuGet dependencies for your application from the NuGet cache to the build output folder

      In .NET Core 2.x dependencies are used directly from NuGet cache, so JAR files are resolved.
      In 3.0 this does not work anymore, we should find a way to copy JAR files to the output folder.

      Test cases:

      • .NET 4.x
      • .NET Core 2.x, 3.x Windows & Linux
      • LINQPad
      • Binary zip distribution (examples, .NET Core examples)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ptupitsyn Pavel Tupitsyn
                Reporter:
                ptupitsyn Pavel Tupitsyn
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m