# error CS1031: Type expected (custom code function build) in Azure Logic Apps: cause and fix

Source page: https://ipaaserrors.com/azure-logic-apps/custom-code-build-error-cs1031-type-expected
Platform: Azure Logic Apps · Standard workflows: custom code functions (Visual Studio Code) · Code CS1031
Checked against vendor docs: 2026-11-29

These build errors in a Standard workflow's custom code project happen when the function has no variables. Add the parameter string parameter1 = null to the function's Run method and build again.

## Error text

```
error CS1031: Type expected
error CS1001: Identifier expected
```

## Likely causes

- The function has no variables (parameters).

## How to fix it

1. Add the parameter `string parameter1 = null` to the Run method.
2. Build the project again.

## Sources

- [Create and Run Local Functions in Standard Workflows](https://learn.microsoft.com/en-us/azure/logic-apps/create-run-custom-code-functions)

From iPaaS Errors (https://ipaaserrors.com), part of iPaaS Group. When citing, link to https://ipaaserrors.com/azure-logic-apps/custom-code-build-error-cs1031-type-expected and the vendor documentation above.
