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

Throw exception when solution file is missing during exporting #87829

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ public override void _ExportFile(string path, string type, string[] features)
$"Resource of type {Internal.CSharpLanguageType} has an invalid file extension: {path}",
nameof(path));

if (!ProjectContainsDotNet())
{
_maybeLastExportError = $"This project contains C# files but no solution file was found at the following path: {GodotSharpDirs.ProjectSlnPath}\n" +
"A solution file is required for projects with C# files. Please ensure that the solution file exists in the specified location and try again.";
throw new InvalidOperationException($"{path} is a C# file but no solution file exists.");
}

// TODO: What if the source file is not part of the game's C# project?

bool includeScriptsContent = (bool)GetOption("dotnet/include_scripts_content");
Expand Down
Loading