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

[msbuild] Show a warning if asked to load an app manifest that doesn't exist. #18222

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -102,14 +102,17 @@ public override bool Execute ()
PDictionary plist;

var appManifest = AppManifest?.ItemSpec;
if (appManifest is not null && File.Exists (appManifest)) {
if (appManifest is null || string.IsNullOrEmpty (appManifest)) {
plist = new PDictionary ();
} else if (File.Exists (appManifest)) {
try {
plist = PDictionary.FromFile (appManifest)!;
} catch (Exception ex) {
LogAppManifestError (MSBStrings.E0010, appManifest, ex.Message);
return false;
}
} else {
LogAppManifestWarning (MSBStrings.W7108 /* The file '{0}' does not exist. */, appManifest);
plist = new PDictionary ();
}

Expand Down