Paket pack not handling "SourceDir" correctly in *.csproj file
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
If the "OutputPath" has $(SolutionDir) for then Paket pack has a DirectoryNotFoundException. It appears to be concatenating the current working directory to the actual output directory, instead of using the true Visual Studio solution directory, and then concatenate the output directory.
Broken:
$(SolutionDir)buildoutput\Debug</OutputPath>
Works:
....\buildoutput\Debug</OutputPath>
Repro steps
Please provide the steps required to reproduce the problem
-
Change the definition of the "OutputPath" to use $(SolutionDir) instead of a relative path to the directory where the solution file actually exists.
-
Build the solution.
-
CD to the directory that has the *.csproj file and paket.template (type project) and run "paket pack . --version 1.2.3.4 --verbose --template .\paket.template" Then the exception should be thrown. The path to the DLL it is looking to pack should exist under the directory the *.csproj file exists but really exists in a directory relative to the actual Visual Studio solution directory.
If possible then please create a git repository with a repro sample or attach a zip to the issue.
Expected behavior
I would expect Paket to determine the directory location of the solution file and use that instead of the directory the "paket pack..." command is being run from as the $(SolutionDir).
Actual behavior
Seeing a DirectoryNotFoundException and the path indicated is expected under the directory the *.csproj file exists in and is not looking for the *.dll to be included relative to the solution file.
Known workarounds
Manually change the $(SolutionDir) in the OutputPath to a relative path.
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 a .csproj whose OutputPath uses $(SolutionDir), then run paket pack . --version 1.2.3.4 --verbose --template .\paket.template from the project directory. Trace how paket pack resolves the DLL path and compare it with the solution directory; done means the existing DLL is found and packaged without a DirectoryNotFoundException.
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