You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Problems building a single project in a larger solution that imports paket.targets using "msbuild" from the command line #172
If I build the solution everything i fine. However if I do
cd src\X
msbuild
then there is an error
1>RestorePackages:
"..\..\.paket\paket.exe" install
The system cannot find the path specified.
I believe that "....\paket.exe" is being run in the SolutionDir, which is "....". This means that we are looking for paket.exe in two directories above the SolutionDir.
I ran into this as well. My local fix to paket.targets was to use MSBuildThisFileDirectory. Note that it does include a trailing slash, so I adjusted a couple references. That property has been available since MSBuild 4.
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<!--<PaketToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".paket"))</PaketToolsPath>-->
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
</PropertyGroup>
Could you please send me your paket.targets?
On Sep 29, 2014 7:20 AM, "Cameron Taggart" notifications@github.com wrote:
I ran into this as well. My local fix to paket.targets was to use
MSBuildThisFileDirectory. Note that it does include a trailing slash, so
I adjusted a couple references. That property has been available since
MSBuild 4.
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<!--<PaketToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".paket"))</PaketToolsPath>-->
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
</PropertyGroup>
—
Reply to this email directly or view it on GitHub #172 (comment).
Hello
I had difficulties to reproduce the bug (had to patch fsproj to use F# 3.1)
But I think the current fix is too restrictive.
It would be better to dynamically find the location of .paket folder to guess the SolutionDir with :
To put it shortly : the fix in paket.targets is OK. And paket.targets import in projects is OK while we have one .paket dir per solution directory (SolutionDir must be defined relatively to $(MSBuildProjectDirectory) to be able to build projects directly).
But if we are in the large repository (like mine at work) with 1500+ projects and where solutions are automatically generated, in this case we might need one .paket dir at the root of the repo (not at the solution level). Then it would be better to use GetDirectoryNameOfFileAbove for paket.targets imports in projects. This would work for current cases (one solution in repo root) and my large case (many solutions, one .paket dir in repo root).
I've started dev and tests, but I miss time. Anyway I don't think this is critical right now.
And maybe you want to keep one .paket dir per solution ?
I think we actually want one .paket folder per repo.
I'd also love to see a "one paket install per solution build". AFAIK we
install in every project build.
On Sep 30, 2014 8:42 AM, "Vianney P." notifications@github.com wrote:
To put it shortly : the fix in paket.targets is OK. And paket.targets
import in projects is OK while we have one .paket dir per solution
directory (SolutionDir must be defined relatively to
$(MSBuildProjectDirectory) to be able to build projects directly).
But if we are in the large repository (like mine at work) with 1500+
projects and where solutions are automatically generated, in this case we
might need one .paket dir at the root of the repo (not at the solution
level). Then it would be better to use GetDirectoryNameOfFileAbove for
paket.targets imports in projects. This would work for current cases (one
solution in repo root) and my large case (many solutions, one .paket dir in
repo root).
I've started dev and tests, but I miss time. Anyway I don't think this is
critical right now.
And maybe you want to keep one .paket dir per solution ?
—
Reply to this email directly or view it on GitHub #172 (comment).
Ok I will try to push a PR then
On Sep 30, 2014 8:49 AM, "Steffen Forkmann" notifications@github.com
wrote:
I think we actually want one .paket folder per repo.
I'd also love to see a "one paket install per solution build". AFAIK we
install in every project build.
On Sep 30, 2014 8:42 AM, "Vianney P." notifications@github.com wrote:
To put it shortly : the fix in paket.targets is OK. And paket.targets
import in projects is OK while we have one .paket dir per solution
directory (SolutionDir must be defined relatively to
$(MSBuildProjectDirectory) to be able to build projects directly).
But if we are in the large repository (like mine at work) with 1500+
projects and where solutions are automatically generated, in this case
we
might need one .paket dir at the root of the repo (not at the solution
level). Then it would be better to use GetDirectoryNameOfFileAbove for
paket.targets imports in projects. This would work for current cases
(one
solution in repo root) and my large case (many solutions, one .paket dir
in
repo root).
I've started dev and tests, but I miss time. Anyway I don't think this
is
critical right now.
And maybe you want to keep one .paket dir per solution ?
—
Reply to this email directly or view it on GitHub #172 (comment).
—
Reply to this email directly or view it on GitHub #172 (comment).
Activity
First package restore from within Visual Studio - references #130
dsyme commentedon Sep 26, 2014
See this comment: a29b9f6#commitcomment-7945050
forki commentedon Sep 26, 2014
any ideas how to fix this?
dsyme commentedon Sep 26, 2014
It looks like they don't set the WorkingDirectory, but instead compute the explicit path to the packages.config:
and then pass$(PackagesConfig) ro the command along with SolutionDir (actually $ (PaddedSolutionDir) )
forki commentedon Sep 26, 2014
Is there an OSS project where I can reproduce?
ctaggart commentedon Sep 29, 2014
I ran into this as well. My local fix to paket.targets was to use
MSBuildThisFileDirectory. Note that it does include a trailing slash, so I adjusted a couple references. That property has been available since MSBuild 4.forki commentedon Sep 29, 2014
Could you please send me your paket.targets?
On Sep 29, 2014 7:20 AM, "Cameron Taggart" notifications@github.com wrote:
ctaggart commentedon Sep 29, 2014
https://gist.github.com/ctaggart/77706d81703f241dd1c7
forki commentedon Sep 29, 2014
@ctaggart thanks. I modified it a bit. Could please check?
@dsyme you can download a fixed
paket.targetsfrom https://github.com/fsprojects/Paket/releases/latestdedale commentedon Sep 29, 2014
Hello
I had difficulties to reproduce the bug (had to patch fsproj to use F# 3.1)
But I think the current fix is too restrictive.
It would be better to dynamically find the location of .paket folder to guess the SolutionDir with :
ded'
forki commentedon Sep 29, 2014
cool.
any chance to submit this as PR? would help us a lot.
dedale commentedon Sep 30, 2014
To put it shortly : the fix in paket.targets is OK. And paket.targets import in projects is OK while we have one .paket dir per solution directory (SolutionDir must be defined relatively to $(MSBuildProjectDirectory) to be able to build projects directly).
But if we are in the large repository (like mine at work) with 1500+ projects and where solutions are automatically generated, in this case we might need one .paket dir at the root of the repo (not at the solution level). Then it would be better to use GetDirectoryNameOfFileAbove for paket.targets imports in projects. This would work for current cases (one solution in repo root) and my large case (many solutions, one .paket dir in repo root).
I've started dev and tests, but I miss time. Anyway I don't think this is critical right now.
And maybe you want to keep one .paket dir per solution ?
forki commentedon Sep 30, 2014
I think we actually want one .paket folder per repo.
I'd also love to see a "one paket install per solution build". AFAIK we
install in every project build.
On Sep 30, 2014 8:42 AM, "Vianney P." notifications@github.com wrote:
dedale commentedon Sep 30, 2014
Ok I will try to push a PR then
On Sep 30, 2014 8:49 AM, "Steffen Forkmann" notifications@github.com
wrote: