Home > Mobile >  Azure Deployment Center generates error when deploying
Azure Deployment Center generates error when deploying

Time:05-18

I`m facing an error when trying to deploy an .NET API project to Azure using Azure App Service Deployment Center.

This is the error:

Project "D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj" on node 1 (Restore target(s)).
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242: SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildSdkResolver" failed while attempting to resolve the SDK "Microsoft.NET.Sdk.Web". Exception: "System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Program Files (x86)\dotnet\sdk-manifests'.
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at System.IO.FileSystemEnumerableIterator`1.CommonInit()
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at System.IO.Directory.GetDirectories(String path)
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.FallbackForMissingManifest(String manifestId)
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.GetManifestDirectories()
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadManifestReader.SdkDirectoryWorkloadManifestProvider.<GetManifests>d__7.MoveNext()
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.LoadManifestsFromProvider(IWorkloadManifestProvider manifestProvider)
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadResolver.Create(IWorkloadManifestProvider manifestProvider, String dotnetRootPath, String sdkVersion, String userProfileDir)
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver.CachingWorkloadResolver.Resolve(String sdkReferenceName, String dotnetRootPath, String sdkVersion, String userProfileDir)
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at Microsoft.DotNet.MSBuildSdkResolver.DotNetMSBuildSdkResolver.Resolve(SdkReference sdkReference, SdkResolverContext context, SdkResultFactory factory)
D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj : error MSB4242:    at Microsoft.Build.BackEnd.SdkResolution.SdkResolverService.ResolveSdk(Int32 submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, String solutionPath, String projectPath, Boolean interactive, Boolean isRunningInVisualStudio)""
Done Building Project "D:\home\site\repository\Api\Custom.Common.API\Custom.Common.API.csproj" (Restore target(s)) -- FAILED.

Build FAILED.

What can I do to resolve this?

Thank you for your help!

CodePudding user response:

One of the workarounds is to use Azure pipelines.

  1. Try creating an Azure Pipeline from the DevOps portal.
  2. Publish the website in a zip.
  3. Deploy to Azure App Service by creating Service Connection in Azure DevOps.

REFERENCES: Deploy ASP.NET Core websites to Azure App Service with Azure Pipelines

CodePudding user response:

I just started getting this error on 5/16 and had no changes to my Azure settings or projects before hand.

  • Related