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

error CTC1030: Parameter name: path2 #10031

Closed
2 of 14 tasks
DaveBubenik opened this issue Jun 10, 2024 · 11 comments
Closed
2 of 14 tasks

error CTC1030: Parameter name: path2 #10031

DaveBubenik opened this issue Jun 10, 2024 · 11 comments

Comments

@DaveBubenik
Copy link

Description

I'm seeing this error when building in Azure DevOps on Microsoft Hosted Agents. I don't see the error when I build locally on Visual Studio Pro Version 17.10.1.

The error exists in the following image:
https://github.com/actions/runner-images/releases/tag/win22%2F20240603.1

Here is the full error:

##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(329,5): Error CTC1030: Value cannot be null.
Parameter name: path2
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(329,5): error CTC1030: Value cannot be null. [D:\a\1\s\MyProject\src\LocalDevOnly\docker-compose.dcproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets(329,5): error CTC1030: Parameter name: path2 [D:\a\1\s\MyProject\src\LocalDevOnly\docker-compose.dcproj]
Done Building Project "D:\a\1\s\MyProject\src\LocalDevOnly\docker-compose.dcproj" (default targets) -- FAILED.

I've also opened a bug with the DockerTools repo because I'm not sure where the error is originating:
microsoft/DockerTools#430

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

I was able reproduce this with a minimal example:

  1. Create a Blazor Project
  2. Add Docker Support
  3. Add Docker Compose Orchestration
  4. Create a minimal Azure DevOps build script

I've attached a project using the above sequence. The Azure build pipeline file is azure-pipelines.yml.
BlazorApp.zip

Is it regression?

https://github.com/actions/runner-images/releases/tag/win22%2F20240514.3

Expected behavior

No error

Actual behavior

error CTC1030: Parameter name: path2

Repro steps

  1. Create a Blazor Project
  2. Add Docker Support
  3. Add Docker Compose Orchestration
  4. Create a minimal Azure DevOps build script

I've attached a project using the ab
BlazorApp.zip
ove sequence. The Azure build pipeline file is azure-pipelines.yml.

@kishorekumar-anchala
Copy link
Contributor

HI @DaveBubenik , we're working on your issue will share the workaround ASAP.

@kishorekumar-anchala
Copy link
Contributor

kishorekumar-anchala commented Jun 12, 2024

Hi @DaveBubenik , Please look into below provided link by developer community . the vs 17.10.1 is latest version , they rolled out the version to 17.9.6 from latest. try to re-run the pipeline by taking below link as reference.

https://devblogs.microsoft.com/visualstudio/visual-studio-2022-17-10-performance-enhancements/

@kishorekumar-anchala
Copy link
Contributor

Hi @DaveBubenik ,

Please share your comments on your issue to proceed to next step.

@DaveBubenik
Copy link
Author

I re-ran the pipeline, but it's still broken.

I opened a bug with the DockerTools repo as well here:
microsoft/DockerTools#430 (comment)

They advised I add "msbuildArchitecture: 'x64'" to my vsbuild argument. This got me past the path2 error, but now the image is complaining that I'm trying to build Linux containers but only Windows containers are available.

We don't actually use the Docker containers that are built using vsbuild. So I'm not actually sure they were being built before the regression occurred.

I can create custom configurations to prevent the docker-compose project from being built in the build pipeline, but it would be nice to not have to maintain this.

Do you know if there is some other workaround? Or is there a way switch the runner to use Linux containers?

@kishorekumar-anchala
Copy link
Contributor

@DaveBubenik ,

Do you know if there is some other workaround? Or is there a way switch the runner to use Linux containers?

pool: vmImage: 'ubuntu-latest'

could you please try run the pipeline with linux agent as AZ pipelines takes windows agents by default . if you're already running on ubuntu machines , we request you to share your pipeline to understand the issue .

@DaveBubenik
Copy link
Author

@kishorekumar-anchala the pipeline script is in the project I attached when I originally opened this ticket. It's azure-pipelines.yml

Here it is again for your reference:
azure-pipelines.zip

The VSBuild task only works on Windows agents. I'm trying to use VSBuild to build my sln file, but my sln file contains a docker compose project that has Linux containers. Previously, my project built without any problems, but now it's failing dues to an update in the runner-image.

@kishorekumar-anchala
Copy link
Contributor

@DaveBubenik ,

By configuring docker compose task in your pipeline after vsbuild task , it would be work , kindly try to re run your pipeline by adding the docker compose task .

task like this

- task: DockerCompose@0 inputs: containerregistrytype: 'Azure Container Registry' dockerComposeFile: '**/docker-compose.yml' action: 'Run a Docker Compose command'

step 2 : if fails with windows-latest runner images , please try to run with ubuntu agents as mentioned above.

Please revert us if you're facing the same issue, thankyou !

@DaveBubenik
Copy link
Author

@kishorekumar-anchala the vsbuild step fails when I do this because of the error I listed in this defect.

I can't use ubuntu-latest because it does not support vsbuild.

@kishorekumar-anchala
Copy link
Contributor

HI @DaveBubenik ,

@DaveBubenik ,

Have you tried with the below task ?

- task: DockerCompose@0 inputs: containerregistrytype: 'Azure Container Registry' dockerComposeFile: '**/docker-compose.yml' action: 'Run a Docker Compose command'

please try to run your pipeline to build your docker compose .

@DaveBubenik
Copy link
Author

@kishorekumar-anchala I added the docker compose step, but VSBuild still fails

@kishorekumar-anchala
Copy link
Contributor

HI @DaveBubenik ,

I have tried locally , now it got succeeded. try with below workarounds.

`
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2022 AS base
USER app
WORKDIR /app
EXPOSE 8080
EXPOSE 8081

FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2022 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["BlazorApp3/BlazorApp3.csproj", "BlazorApp3/"]
RUN dotnet restore "./BlazorApp3/BlazorApp3.csproj"
COPY . .
WORKDIR "/src/BlazorApp3"
RUN dotnet build "./BlazorApp3.csproj" -c $BUILD_CONFIGURATION -o /app/build

FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./BlazorApp3.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "BlazorApp3.dll"]`

  1. Updated dcproj target OS as below
    <DockerTargetOS>Windows</DockerTargetOS>

  2. I have run the pipeline with msbuid x64

trigger:

  • master

pool:
vmImage: 'windows-latest'

variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

steps:

  • task: NuGetToolInstaller@1
    inputs:
    versionSpec:
    checkLatest: true

  • task: NuGetCommand@2
    inputs:
    command: 'restore'
    restoreSolution: '$(solution)'
    feedsToUse: 'select'

  • task: VSBuild@1
    inputs:
    solution: '$(solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:PublishUrl="$(Build.ArtifactStagingDirectory)\BlazorApp3"'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
    clean: true
    msbuildArchitecture: 'x64'
    `

Note : We're not going to handle these type of issues, Could you please raise bug issues with appropriate repo.

we hope the above workaround will resolve your issue, Thankyou !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants