Skip to content

Commit a978b87

Browse files
CopilotmarcpopMSFT
andcommitted
Remove exception throwing from InitializeManifests to allow workload commands to proceed
- Reverted throwing behavior in InitializeManifests() - Workload install/update/restore commands can now proceed without being blocked - Error messages still displayed in info commands via ShowWorkloadsInfo() - This allows users to run 'dotnet workload update' to fix missing manifests Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
1 parent b32666d commit a978b87

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,6 @@ private void InitializeManifests()
8484
if (!_initializedManifests)
8585
{
8686
LoadManifestsFromProvider(_manifestProvider);
87-
88-
// If manifests from a workload set are missing, throw the error when trying to use workloads
89-
// This ensures errors are shown when building apps that require workloads
90-
if (_manifestProvider is SdkDirectoryWorkloadManifestProvider sdkProvider)
91-
{
92-
var manifestError = sdkProvider.GetManifestErrorMessage();
93-
if (manifestError != null)
94-
{
95-
// There's an error with missing manifests from a workload set
96-
// Throw it so users know what's wrong
97-
throw new FileNotFoundException(manifestError);
98-
}
99-
}
100-
10187
ComposeWorkloadManifests();
10288
_initializedManifests = true;
10389
}

0 commit comments

Comments
 (0)