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

[BUG] It doesn't recognize global.json file. #86

Closed
osnoser1 opened this issue Aug 21, 2021 · 5 comments · Fixed by #92
Closed

[BUG] It doesn't recognize global.json file. #86

osnoser1 opened this issue Aug 21, 2021 · 5 comments · Fixed by #92
Assignees
Labels
bug Something isn't working outdated scope: core

Comments

@osnoser1
Copy link

Describe the bug
The project doesn't run with the specific sdk specified in the global.json file.

To Reproduce
Steps to reproduce the behavior:

  1. Create a project with net core 2 or 3.
  2. Run the project with nx serve [project-name].
  3. You will see a warning saying info about the support of a previous version to current.

Expected behavior
It should run the project with the specified version in global.json file.

Screenshots
image

Environment:

  • OS: Windows 11
  • Browser [e.g. chrome, safari]: Not apply.
  • Version: Not apply.
  • Affected Packages: Not apply.
@osnoser1 osnoser1 added bug Something isn't working needs-triage This issue has yet to be looked over by a core team member labels Aug 21, 2021
@osnoser1
Copy link
Author

osnoser1 commented Aug 21, 2021

I had to move the global.json file to the root repository, previously it was in the project folder.
Is this the expected behavior?

@AgentEnder AgentEnder added scope: core and removed needs-triage This issue has yet to be looked over by a core team member labels Aug 23, 2021
@AgentEnder AgentEnder self-assigned this Aug 23, 2021
@AgentEnder
Copy link
Member

Huh, I had not considered that behavior, but it makes sense that it only picks up the root. dotnet crawls up the filetree looking for global.json, but it starts at cwd instead of the the location of the csproj. I'll get a patch out for this.

@AgentEnder
Copy link
Member

I would like to note though, that it does make sense for each project in the same repository to use the same dotnet sdk version, just to make it a cleaner dev + upgrade experience. This is similar to single version principle. I'm fixing this, as it will still work with global.json at root. I would recommend leaving it at root, and only overriding it at the project level if needed.

AgentEnder added a commit that referenced this issue Aug 23, 2021
To accomplish this `dotnet` must be launched from the project's root directories.

Closes #87
Closes #86
AgentEnder added a commit that referenced this issue Aug 23, 2021
To accomplish this `dotnet` must be launched from the project's root directories.

Closes #87
Closes #86
AgentEnder added a commit that referenced this issue Aug 23, 2021
To accomplish this `dotnet` must be launched from the project's root directories.

Closes #87
Closes #86
AgentEnder added a commit that referenced this issue Aug 23, 2021
To accomplish this `dotnet` must be launched from the project's root directories.

Closes #87
Closes #86
AgentEnder added a commit that referenced this issue Aug 23, 2021
To accomplish this `dotnet` must be launched from the project's root directories.

Closes #87
Closes #86
AgentEnder added a commit that referenced this issue Aug 23, 2021
To accomplish this `dotnet` must be launched from the project's root directories.

Closes #87
Closes #86
github-actions bot pushed a commit that referenced this issue Aug 23, 2021
# [1.3.0](v1.2.0...v1.3.0) (2021-08-23)

### Bug Fixes

* display project tag instead of [object Object] ([2dea7fc](2dea7fc))
* **core:** use fully qualified project name in msbuild task ([2c54310](2c54310))

### Features

* **core:** pickup `global.json` overrides at the project level ([49ce6bc](49ce6bc)), closes [#87](#87) [#86](#86)

Aug 23, 2021, 7:06 PM
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working outdated scope: core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants