The command "paket pack" could not find .exe file
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
I tried to create a nuget package of the console project by using the command "paket pack". The command returns error: FileNotFoundException: Could not find file .exe
Repro steps
- Create an empty directory
- Add a directory .paket with paket.exe in "magic mode".
- Add the empty paket.dependencies file.
- Add the paket.template file with the following content:
type project
- Execute:
- dotnet new sln
- dotnet new console
- dotnet sln add <projectfile.csproj>
- dotnet build -c Release
- .paket\paket update
- .paket\paket pack .\result -v
See sample project into the attach.
Expected behavior
I expects that the paket will create the nuget package with the content of the console project.
Actual behavior
d:\projects\pakettest>.paket\paket pack .\result\ -v
.paket\paket pack .\result\ -v
Paket version 5.179.1
found: d:\projects\pakettest\paket.dependencies
Parsing d:\projects\pakettest\paket.dependencies
Loading assembly metadata for d:\projects\pakettest\bin\Release\netcoreapp2.1\pakettest.exe
Performance:
- Runtime: 444 milliseconds
Paket failed with
-> FileNotFoundException: Could not find file 'd:\projects\pakettest\bin\Release\netcoreapp2.1\pakettest.exe'.
StackTrace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
at ProviderImplementation.AssemblyReader.ILModuleReaderAfterReadingAllBytes(String file, ILGlobals ilGlobals)
at Paket.PackageMetaData.readAssembly(String fileName)
at Paket.PackageProcess.merge$cont@29(String buildConfig, String buildPlatform, FSharpMap`2 specificVersions, ProjectFile projectFile, TemplateFile templateFile, TemplateFile withVersion, Unit unitVar)
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at Paket.PackageProcess.allTemplates@209-3.GenerateNext(IEnumerable`1& next)
at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase`1.MoveNextImpl()
at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@267[T,TResult](ConcatEnumerator`2 x, Unit unitVar0)
at Microsoft.FSharp.Collections.Internal.IEnumerator.map@74.DoMoveNext(b& curr)
at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator`1.System-Collections-IEnumerator-MoveNext()
at Microsoft.FSharp.Collections.Generator.Microsoft-FSharp-Collections-Generator-Generator-1-get_Apply@412-1.Invoke(Unit unitVar0)
at Microsoft.FSharp.Collections.Generator.appG[a](Generator`1 g)
at Microsoft.FSharp.Collections.Generator.EnumeratorWrappingLazyGenerator`1.System-Collections-IEnumerator-MoveNext()
at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
at Paket.PackageProcess.Pack[a](String workingDir, DependenciesFile dependenciesFile, String packageOutputPath, FSharpOption`1 buildConfig, FSharpOption`1 buildPlatform, FSharpOption`1 version, IEnumerable`1 specificVersions, FSharpOption`1 releaseNotes, FSharpOption`1 templateFile, FSharpOption`1 excludedTemplates, Boolean lockDependencies, Boolean minimumFromLockFile, Boolean pinProjectReferences, Boolean symbols, Boolean includeReferencedProjects, FSharpOption`1 projectUrl)
at Paket.Program.handleCommand@836-23.Invoke(ParseResults`1 results)
at Paket.Program.processWithValidationEx$cont@42[a](Boolean silent, FSharpFunc`2 commandF, a result, Unit unitVar)
at Paket.Program.processWithValidation[T](Boolean silent, FSharpFunc`2 validateF, FSharpFunc`2 commandF, ParseResults`1 result)
at Paket.Program.handleCommand(Boolean silent, Command command)
at Paket.Program.main()
Environment
dotnet version: 2.1.300
paket version: 5.179.1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the attached sample and the listed dotnet and paket commands. Start with Paket.PackageProcess.Pack and Paket.PackageMetaData.readAssembly, which appear in the stack trace, and inspect how the built console project's output path is determined. Done means the sample's paket pack command creates the expected NuGet package without the missing-executable exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100