You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are attempting to build with a self hosted agent. The Host OS for the Build Server is Windows Server 2022 Data Center - Azure Edition. We are using Docker CE on the build server. Our project does contain a resx file. we get the following:
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: The "GenerateResource" task failed unexpectedly. [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {7B8A2D94-0AC9-11D1-896C-00C04FB6BFC4} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)). [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at System.RuntimeTypeHandle.AllocateComObject(Void* pClassFactory) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.IsDangerous(String filename) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.Execute() [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
I checked the file system and urlmon.dll does exist. I checked the registry and it is registered.
The following is a simple test project that reproduces the issue. NID.TestDeploy.zip
Steps to Reproduce
Setup a Windows Server 2022 Datacenter Azure Edition as a self hosted agent for Azure DevOps. Install and Configure Docker CE.
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force Prepare Windows operating system containers | Microsoft Learn Configure Docker in Windows | Microsoft Learn
Be sure to add the user that the Azure Devops Agent service is running as to a local windows group and add the group to the 'group' section of the daemon.json at C:\ProgramData\docker\config. Install Visual Studio 2022 build tools. Create a pipeline in Azure Devops. Run the pipeline.
Expected Behavior
Expect for the container to be built.
Actual Behavior
Build fails with the following:
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: The "GenerateResource" task failed unexpectedly. [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {7B8A2D94-0AC9-11D1-896C-00C04FB6BFC4} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)). [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at System.RuntimeTypeHandle.AllocateComObject(Void* pClassFactory) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.IsDangerous(String filename) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.Execute() [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
Analysis
No response
Versions & Configurations
MSBuild version 17.9.8+b34f75857 for .NET Framework
17.9.8.16306
The text was updated successfully, but these errors were encountered:
I have same problem. I am using Docker Desktop in Windows mode. At do "dotnet publish" (defined in dockerfile of service) using docker compose, the error happen. At do "dotnet build", where it succed a step back, not happen.
Issue Description
We are attempting to build with a self hosted agent. The Host OS for the Build Server is Windows Server 2022 Data Center - Azure Edition. We are using Docker CE on the build server. Our project does contain a resx file. we get the following:
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: The "GenerateResource" task failed unexpectedly. [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {7B8A2D94-0AC9-11D1-896C-00C04FB6BFC4} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)). [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at System.RuntimeTypeHandle.AllocateComObject(Void* pClassFactory) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.IsDangerous(String filename) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.Execute() [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
I checked the file system and urlmon.dll does exist. I checked the registry and it is registered.
The following is a simple test project that reproduces the issue.
NID.TestDeploy.zip
Steps to Reproduce
Setup a Windows Server 2022 Datacenter Azure Edition as a self hosted agent for Azure DevOps. Install and Configure Docker CE.
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Prepare Windows operating system containers | Microsoft Learn
Configure Docker in Windows | Microsoft Learn
Be sure to add the user that the Azure Devops Agent service is running as to a local windows group and add the group to the 'group' section of the daemon.json at C:\ProgramData\docker\config. Install Visual Studio 2022 build tools. Create a pipeline in Azure Devops. Run the pipeline.
Expected Behavior
Expect for the container to be built.
Actual Behavior
Build fails with the following:
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: The "GenerateResource" task failed unexpectedly. [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {7B8A2D94-0AC9-11D1-896C-00C04FB6BFC4} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)). [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at System.RuntimeTypeHandle.AllocateComObject(Void* pClassFactory) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.IsDangerous(String filename) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.Tasks.GenerateResource.Execute() [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
C:\Program Files\dotnet\sdk\6.0.421\Microsoft.Common.CurrentVersion.targets(3262,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\src\NID.TestDeploy\NID.TestDeploy.csproj]
Analysis
No response
Versions & Configurations
MSBuild version 17.9.8+b34f75857 for .NET Framework
17.9.8.16306
The text was updated successfully, but these errors were encountered: