Skip to content
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

Fix BuildTool output path #2219

Merged
merged 3 commits into from
Sep 20, 2019
Merged

Conversation

hazzik
Copy link
Member

@hazzik hazzik commented Sep 18, 2019

There seems to be a difference in -o behaviour between versions of .NET Sdk. The .NET Sdk up to 2.2 output the build artefacts relative to the project file, and starting from previews of 3.0 the build output is calculated relative to the current directory.

@hazzik
Copy link
Member Author

hazzik commented Sep 18, 2019

@lillo42 please test.

@lillo42
Copy link
Contributor

lillo42 commented Sep 18, 2019

@hazzik it is not fixes yet, pushd not found:

https://stackoverflow.com/a/5193087

rlillo@Lenovo-ideapad-320:~/Downloads/nhibernate-core-fix-building-build-tool$ ./ShowBuildMenu.sh 
./ShowBuildMenu.sh: 17: ./ShowBuildMenu.sh: pushd: not found
Microsoft (R) Build Engine version 16.3.0-preview-19455-02+4a2d77107 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: BuildTool.sln
./ShowBuildMenu.sh: 19: ./ShowBuildMenu.sh: popd: not found
========================= NHIBERNATE BUILD MENU ==========================
--- TESTING ---
A. (Step 1) Set up a new test configuration for a particular database.
B. (Step 2) Activate a test configuration.
C. (Step 3) Run tests.
.
--- BUILD ---
E. Build NHibernate (Debug)
F. Build NHibernate (Release)
.
--- Code generation ---
H. Generate async code (Generates files in Async sub-folders)
.
--- Exit ---
X. Make the beautiful build menu go away.
.
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-./Tools/BuildTool/bin/BuildTool.dll does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-./Tools/BuildTool/bin/BuildTool.dll does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
cat: /home/rlillo/Downloads/nhibernate-core-fix-building-build-tool/folder.tmp: No such file or directory
cp: cannot access '/lost+found': Permission denied

@hazzik
Copy link
Member Author

hazzik commented Sep 19, 2019

pushd: not found

Very strange...

@hazzik
Copy link
Member Author

hazzik commented Sep 19, 2019

@lillo42 I've replaced pushd/popd with cd. Could you please check now?

@lillo42
Copy link
Contributor

lillo42 commented Sep 19, 2019

@hazzik it's working now \o/

fi
cd "$SCRIPT_PATH"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just have used cd ../.. before the fi, but why not.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking, but decided against it.

@fredericDelaporte
Copy link
Member

(Verified under Windows and Linux, from the same folder and from src, with and without the build tool already built, but without dotnet 3.)

@hazzik hazzik merged commit 48b3bb9 into nhibernate:master Sep 20, 2019
@hazzik hazzik deleted the fix-building-build-tool branch September 20, 2019 01:09
@hazzik hazzik added r: Fixed and removed t: Fix labels Sep 20, 2019
@fredericDelaporte fredericDelaporte added this to the 5.3 milestone Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants