Skip to content

Issue with packet pack and multiple paket.template files #893

Description

@cr7pt0gr4ph7

I discovered the issue with Paket version 1.16.0, and it is still present in the current version 1.17.0.

Details

When calling packet pack inside a multi-project solution where multiple projects have paket.template, pack selects the wrong .csproj file - see below for an example.

Reproduction steps

Given the following directory layout:

.paket/
  paket.bootstrapper.exe
  paket.exe
bin/
src/
  paket.dependencies
  ProjectA/
    ProjectA.csproj
    paket.template
  ProjectB/
    ProjectB.csproj
    paket.template

When calling:

src\ProjectB> ..\..\.paket.exe pack output . templatefile paket.template

I get the following error (note: this should use ProjectB.dll, and not ProjectA.dll!):

found: C:\<path>\src\paket.dependencies
Parsing C:\<path>\src\paket.dependencies
Loading assembly metadata for C:\<path>\src\ProjectA\..\..\bin\ProjectA.dll
Paket failed with:
        Die Datei "C:\<path>\bin\lib.SD.DefaultImplementations.dll" konnte nicht gefunden werden.
StackTrace:
     bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, S
tring msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolea
n checkHost)
   bei System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
   bei Paket.PackageMetaData.loadAssemblyId(String buildConfig, ProjectFile projectFile)
   bei Paket.PackageProcess.merged$cont@56(String buildConfig, TemplateFile templateFile, ProjectFile projectFile, OptionalPackagingInfo opt, ProjectCoreInfo md, Unit unitVar)
   bei Paket.PackageProcess.f@1-10(String buildConfig, FSharpOption`1 version, HashSet`1 allTemplateFiles, ProjectFile projectFile, TemplateFile templateFile)
   bei Paket.PackageProcess.Pack(DependenciesFile dependencies, String packageOutputPath, FSharpOption`1 buildConfig, FSharpOption`1 version, FSharpOption`1 releaseNotes, FSharpOption`1 templateFile)
   bei Paket.Program.handler@288-19.Invoke(ArgParseResults`1 results)
   bei Paket.Program.processWithValidation[T](FSharpFunc`2 validateF, FSharpFunc`2 commandF, Command command, String[] args)
   bei Paket.Program.processCommand@71-1.Invoke(Command command, String[] args)
   bei Paket.Program.main()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions