Build/Test Issues

Unable to build net9.0 isolated Azure Functions

Started by arkiaconsulting on 3,775 views

My Azure Function project (net9.0 isolated) cannot build, it fails with the error


NCrunch: If you are experiencing problems in getting this project to build, have a look at https://www.ncrunch.net/documentation/troubleshooting_project-build-issues
..\..\..\..\..\NugetCache\microsoft.azure.functions.worker.sdk\2.0.4\build\Microsoft.Azure.Functions.Worker.Sdk.targets (236, 5): The "AssignTargetPath" task was not given a value for the required parameter "RootFolder".


Noticeable packages:

Microsoft.Azure.Functions.Worker: 2.0.0
Microsoft.Azure.Functions.Worker.Sdk: 2.0.4
Thanks for sharing this issue.

Can you confirm whether you're running the latest version of NCrunch?

Is this a problem you can reproduce with a sample solution that you can share with me? You can submit small samples in ZIP form through the support contact form.
Thanks Remco, I'm running NCrunch 5.15.0.4, VS 2022 17.14.4 Preview 1.0

I'll post a project.
ZIP posted.

I must add that the FunctionApp builds well when using the version 2.0.2 of the Microsoft.Azure.Functions.Worker.Sdk package
arkiaconsulting wrote:ZIP posted.

I must add that the FunctionApp builds well when using the version 2.0.2 of the Microsoft.Azure.Functions.Worker.Sdk package


Thanks for this. They probably shifted something in the targets again. I'll let you know as soon as I have more info.
Could you try setting an NCrunch custom property 'DesignTimeBuild=true' in the Custom Build Properties setting for your function project? I'm hopeful this will get you up and running for the time being. I'm working on a more permanent fix.
Good catch !

As an alternative, downgrading `Microsoft.Azure.Functions.Worker.Sdk` to 2.0.2 works as well.

Thanks @Remco
Remco wrote:Could you try setting an NCrunch custom property 'DesignTimeBuild=true' in the Custom Build Properties setting for your function project? I'm hopeful this will get you up and running for the time being. I'm working on a more permanent fix.


This worked for me, thank you! Does it have any negative implications?
emsurgecto wrote:
This worked for me, thank you! Does it have any negative implications?


So far I know of none. However, it's impossible to account for every toolset. If you don't see any problems with the build completing, then it's a safe bet that you're OK.

Post a reply

Log in to reply.