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

Publishing with missing project file on Windows fails to return MSB1003 or useful error if multiple .NET SDKs are installed. #138

Open
rekhoff opened this issue Jan 17, 2025 · 0 comments

Comments

@rekhoff
Copy link
Contributor

rekhoff commented Jan 17, 2025

From within a windows terminal, running spacetime publish foo when the working directory does not contain a project file, and the system has more than 1 .NET SDK version installed, the terminal will return an error message that does not provide the user a useful path forward.

Expected message ( As seen when only 1 .NET SDK version is installed):
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file. Error: command ["dotnet", "publish", "-c", "Release", "-v", "quiet"] exited with code 1

Returned message:
Error: .NET SDK 8.0 is required, but found {version}. If you have multiple versions of .NET SDK installed, configure your project using https://learn.microsoft.com/en-us/dotnet/core/tools/global-json.

Notes:
Because no user projects are in the directory when the command is run, the error message returned does not provide the user a path forward to resolve the problem.

To check the versions of .NET SDKs installed on the current system, run the following in a PowerShell terminal:
dotnet --list-sdks

@rekhoff rekhoff changed the title Publishing with missing project file on Windows sometimes fails to return MSB1003 or useful error. Publishing with missing project file on Windows fails to return MSB1003 or useful error if multiple .NET SDKs are installed. Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant