-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path to DotNet relative to project #31008
Conversation
bfb995e
to
510ac5f
Compare
The actual problem was the many HintPaths. It works on Windows and the CI with a unique path to the project directory. |
entire solution. $(SolutionDir) is not defined in that case, so we need to workaround that. | ||
We make SCons restore the NuGet packages in the project directory instead in this case. | ||
--> | ||
<HintPath Condition=" '$(SolutionDir)' != '' ">$(SolutionDir)\packages\DotNet.Glob.2.1.1\lib\net45\DotNet.Glob.dll</HintPath> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed when building the entire solution instead of a specific project. What we should do here is add conditions:
<HintPath Condition=" '$(SolutionDir)' != '' And Exists('$(SolutionDir)\packages\...') ">$(SolutionDir)\packages\...</HintPath>
<HintPath Condition=" '$(SolutionDir)' == '' Or !Exists('$(SolutionDir)\packages\...') ">$(ProjectDir)\packages\...</HintPath>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only GodotTools.ProjectEditor uses DotNet and has a packages.config for it. It isn't a package used for the whole solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But when restoring the entire solution, the packages folder is created in the solution directory instead of the project directory. At least when running nuget restore
, which is what SCons uses; I didn't check with msbuild /t:restore
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It happens to me too. The solution restores a DotNet package which is not used for any project and GodotTools.ProjectEditor another DotNet specific for it. You can the details in the manage panel in VS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still pending. I just checked again to be sure. When running nuget restore
on a solution, the packages
folder is created in the solution dir. The alternative hintpaths I commented above should always work.
modules/mono/editor/GodotTools/GodotTools.ProjectEditor/GodotTools.ProjectEditor.csproj
Show resolved
Hide resolved
What's the status of this PR? |
Superseded by #31770. Thanks for the contribution nevertheless which helped find the right fix. |
For a fresh build, more specifically, if GodotTools.ProjectEditor wasn't build and there is no binaries already generated I always get this error:
It builds fine with or without mono_glue with the correct relative HintPath.