Getting an Error 'C:\Users\VssAdministrator.nugetpackages\microsoft.net.sdk.functions\1.0.12build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(44,7): Error MSB4064: The "UserProvidedFunctionJsonFiles" parameter is not supported by the "GenerateFunctions" task. Verify the parameter exists on the task, and it is a settable public instance property.' in the VSTS build pipeline.
The related Build task is Visual Studio Build
This issue persists in FunctionsSDK v1.0.13 and does not only affect the Azure Functions V2 projects as it is impacting our V1 compiled function projects as well.
It happens typically on a rebuild of the project, and will usually clear if the dev builds it again. Its quite an annoyance.
Where are we on this issue ?
This is blocking a VSTS build to be completed on my project.
Any Update on this?
Until it's fixed, delete the folder in %userprofile%\.nuget\packages\microsoft.net.sdk.functions\.
Any ideas how to fix this on the build server?
I have the same question as artursokhikyan. What about with a VSTS build server, you do not control the package folders.
A roadmap for the correction of this issue would be appreciated.
Have a nice day
@JulienChafraix @artursokhikyan i tried couple of solutions (also tried to delete the nuget packages cache from the VSTS build agent) but had no luck.
I was able to get a successful build by updating the Microsoft.NET.Sdk.Functions package to 1.0.6 version :)
Good Luck
@sharfanfq using the version 1.0.7 of Microsoft.NET.Sdk.Functions is working for me.
@FabienLavocat great.. i will update mine :)
I have Microsoft.NET.Sdk.Functions version 1.0.14 and the issue persists. Rebuilding the solution however works for me, but I agree that it is annoying.
How are we going with this? I'm just getting this error. I have Microsoft.NET.Sdk.Functions version 1.0.23.
I get the same error. It only seems to show up when I try to publish the function, which make the publish fail.. I also have Microsoft.NET.Sdk.Functions version 1.0.23
Same problem here.. Got it on the build agent (Hosted VS2017)
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AzureFunctionsVersion>v2</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="3.0.1" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.23" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
I think the hosted agent does not have the latest Azure Function tools installed. Not sure how I can add them myself though..
I think the hosted agent does not have the latest Azure Function tools installed. Not sure how I can add them myself though..
When I published my function I got a prompt saying that Functions needed to be updated, and gave me an option to do so.. Don't know why you didn't..
After "Clean solution", closing all Visual Studios, reboot the pc, start Visual Studio again and Publish - It now works.. I have no idea why...
Solved it for my case. I had one solution with two Azure Function projects. First was V1, the second V2.
By splitting them in two seperate solutions, the build server was able to build them both.
downgrading to 1.0.7 doesn't work if you're wanting to use Durable Functions. There's a dependency on a newer version of that package.
This issue should not happen with the latest functions tools. Please re-open if this is still an issue.
1.0.24 the same error.
C:\Users\teamcity\.nuget\packages\microsoft.net.sdk.functions\1.0.24\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(46, 7): error MSB4064: The "UserProvidedFunctionJsonFiles" parameter is not supported by the "GenerateFunctions" task. Verify the parameter exists on the task, and it is a settable public instance property.
C:\Users\teamcity\.nuget\packages\microsoft.net.sdk.functions\1.0.24\build\netstandard1.0\Microsoft.NET.Sdk.Functions.Build.targets(41, 5): error MSB4063: The "GenerateFunctions" task could not be initialized with its input parameters.
however, we do have V1 (1.0.7) & V2 (1.0.24) function sdks in the same solution file. maybe that might cause the issue?
That should not cause an issue. Can you please share a sample solution?
It's a TC and not VSTS. Does it change the context then? Locally solution builds fine.
issue seems to be related to the case that different SDK versions are being installed on shared TC agent.
issue seems to be related to the case that different SDK versions are being installed on shared TC agent.
Dont quite understand what the issue is. Can you please elaborate?
basically what he's saying, and I just confirmed on my end using VS2019 preview 3, is that if you have a mixture of versions of Microsoft.NET.Sdk.Functions in your solution, then you will see this error. I have to downgrade every function in my solution to use version 1.0.7 because if I don't then the project that is using 1.0.24 will throw the error. Now, I haven't recently tested putting everything back to the latest, however, I had tried that before and it didn't work. Literally the only way for me to avoid the issue is to just keep everything at 1.0.7.
edit: correction. that's not what he's saying. not sure what he means by TC. but I can reproduce the normal solution build, even building locally throws the error.
it's both, having different versions within the single solution, or having shared build agent who is responsible for building various versions along the way.
we are not able to jump everywhere to latest version, therefore - downgrading to base which is 1.0.7
can confirm that this is still an issue with 1.0.25. there is NO way to have 1.0.7 based functions are durable (because lowest they require is 1.0.12 which references required azure.webjobs 2.2.0 package) functions in the same solution nor compiling on the shared build server.
this is deal breaker.. anyone can take a look?
Can you share a sample solution where this occurs? Does this occur only in the build agent or in VS as well?
Can you share a sample solution where this occurs? Does this occur only in the build agent or in VS as well?
This is happening in VS as well :(

So.... I went to make a solution with 2 functions in it. 1 using core and the other using framework. 1 using Microsoft.NET.Sdk.Functions 1.0.25 and the other using 1.0.7. Solution created, projects inserted. Tell it to build, BOOM Error. ok good, tell it to build again, no error. huh!? Build again, a few more times, no error. Do a clean, BOOM error. ok, I have it figured out. Clean again, no error.... really... If I go in and manually delete the bin and obj folders, it gives me the error though. so... there's that.
@ASeale - Thanks for the repro. project. Looks like 1.0.7 version of the GenerateFunctions is getting loaded which does not have the option - 'UserProvidedFunctionJsonFiles'.
Is there a reason why you want one of the projects to target 1.0.7? 1.0.24 is the latest version and that should support everything that is supported by 1.0.7.
To fix this you can target both the projects to 1.0.24 & delete all the other version of the packages from this folder
C:\Users\
Once this is done, you should not run into this issue again.
the challenge why we can't uplift everyone to 1.0.25 (latest) or even 1.0.24 is that there are many teams and projects involved and everyone is building on the same set of TC agents. It's of course our goal to upgrade, bit it takes time.
However, I cannot repro @ASeale problem on my local machine..
@valdisiljuconoks - Understood. it looks like there is an issue here where the 1.0.24 target is trying to use the GenerateFunctions from 1.0.7 and there are breaking changes in the targets when the versions are upgraded.
I was suggesting the work-around in this case. We may have to go back and look why msbuild is trying to use the task assembly from a different package.
thx
@vijayrkn can you please help me as well . I have a Azure Function that is triggered by EventHubTrigger , targetting Function runtime V1. I have depenencies on
The Microsoft.NET.Sdk.Functions version is 1.0.24.
When i build the project the build gets succeeded , but i am getting the below warnings and i am not able to publish it to Azure.
warning NU1608: Detected package version outside of dependency constraint: Microsoft.NET.Sdk.Functions 1.0.24 requires Microsoft.Azure.WebJobs (>= 2.2.0 && < 2.4.0) but version Microsoft.Azure.WebJobs 3.0.4 was resolved.
Also , i am getting this error
error MSB3073: The command "copy /Y
"D:\develop{MyProjectName}\Caching\bin\Release\Caching.dll" "Undefined..\Assemblies\Caching.dll"" exited with code 1. [D:\develop{MyProjectName}\Caching\Caching.csproj]
But when i browse the folder manually i can see the Caching.dll is present in the bin folder.
Any help would be appreciated.
Thanks
@vijayrkn The only reason we haven't upgraded is because at the time that this was originally happening for us we tried to upgrade everything to 1.0.23 and the build server would throw this error. We went through a lot of trial and error until we got it down to 1.0.7 and the build server was happy. I assumed it was still an issue because of us getting the error locally whenever we added a new function to the solution and didn't downgrade it. I will try to upgrade everything to 1.0.25 and see how the build server handles it now.
Just a small follow-up. It should be possible to build V1 (netfx) functions with 1.0.26 SDK, right? we managed to jump to 1.0.26 everywhere in the solution, but msbuild just hangs upon function project compilation. I'll see if I can extract msbuild logs..
at least correct version of generator is invoked:
"C:\Users\valdis.nugetpackages\microsoft.net.sdk.functions\1.0.26\tools\net46Microsoft.NET.Sdk.Functions.Generator.exe" "C:...\Functions.dll " "C:...\Functions\bin\Debug\net471\ "
Is the generator still hanging? Do you have a sample project?
@soninaren - Do you want to take a look?
yes it's still hangs. unfortunately I cannot share project yet. I can try to repro it on clean solution. when attached to generator process:
main thread:
Not Flagged > 21944 1 Main Thread Main Thread Microsoft.NET.Sdk.Functions.Generator.exe!MakeFunctionJson.FunctionJsonConverter.TryRun

alrighty, so I have more update here.
initially we had following packages installed in that project:
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Twilio" Version="1.1.0-beta4" />
<PackageReference Include="Microsoft.Azure.WebJobs.ServiceBus" Version="2.3.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.26" />
we were speculating that Twilio package might too old and causing the hang problem.
so we jump over all versions (1.1.0-beta4 => 1.3.0)
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Twilio" Version="1.3.0" />
still problem remains.
jump to very latest Twilio is not yet possible:
you cannot jump to Extensions.Twilio 3.0:
Severity Code Description Project File Line Suppression State
Error NU1107 Version conflict detected for Microsoft.Azure.WebJobs. Install/reference Microsoft.Azure.WebJobs 3.0.0 directly to project FunctionApp4 to resolve this issue.
FunctionApp4 -> Microsoft.Azure.WebJobs.Extensions.Twilio 3.0.0 -> Microsoft.Azure.WebJobs (>= 3.0.0)
FunctionApp4 -> Microsoft.NET.Sdk.Functions 1.0.26 -> Microsoft.Azure.WebJobs (>= 2.2.0 && < 2.4.0). FunctionApp4 C:\Users\valdis\source\repos\FunctionApp4\FunctionApp4\FunctionApp4.csproj 1
ok, we stopped at 1.3. we then switched over to ServiceBus package. we are having this version installed:
<PackageReference Include="Microsoft.Azure.WebJobs.ServiceBus" Version="2.3.0" />
having a function with service bus binding worked as well:
public class DataPumpFunction
{
[ServiceBusAccount("ServiceBusConnectionString")]
[FunctionName("DataPump")]
public static async Task Run([TimerTrigger("*/5 * * * * *")] TimerInfo myTimer, TraceWriter log)
{
log.Info($"{nameof(DataPumpFunction)} executed successfully at: {DateTime.UtcNow}");
}
}
then we focused on our last function:
public class FeedEndpointFunction
{
[FunctionName("FeedEndpoint")]
public static async Task<HttpResponseMessage> Run(
[HttpTrigger(AuthorizationLevel.Function, "get")]
HttpRequestMessage request,
TraceWriter log)
{
var result = new HttpResponseMessage(HttpStatusCode.OK)
{
Content = new StringContent("ok")
};
return result;
}
}
so it turned out that this is actually the guilty function. whenever we commented out this function project can be built. you include function in project and msbuild output artifacts generation just hangs:

sample repro: https://github.com/valdisiljuconoks/FunctionApp4
hope this will help you to solve the issue!
hi,
any follow-up on this issue?
still nothing, really?
i might be wrong, but it looks like this is solved in 1.0.27. will try another round with our project and will keep it updated here.
can confirm that with latest sdk package version (1.0.27) we cannot repro this issue anymore! 馃憤
@valdisiljuconoks can you validate against 1.0.28?
Closing this issue. Please reopen if you can still repro this.
Hi, we are facing this issue in our CI/CD
C:\Users\VssAdministrator\.nuget\packages\microsoft.net.sdk.functions\1.0.31\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5): error MSB4062: The "GenerateFunctions" task could not be loaded from the assembly C:\Users\VssAdministrator\.nuget\packages\microsoft.net.sdk.functions\1.0.31\build\..\tools\netcoreapp2.1\\Microsoft.NET.Sdk.Functions.MSBuild.dll. Assembly with same name is already loaded Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [d:\a\1\s\src\Functions\Functions.csproj]
0 Warning(s)
1 Error(s)
We've got one project that's using net 4.7.2 because of an old WCF service and is referencing microsoft.net.sdk.functions\1.0.31 the second project is in .NET Core 3.1 and references microsoft.net.sdk.functions\3.0.2.
Is there any workaround to make it work in azure devops?
Just started running into this today. No repro, other than that it happens intermittently.
Happening still with Microsoft.NET.Sdk.Functions 3.03.
NetcoreApp3.1 and Netstandard2.0 projects with Microsoft.NET.Sdk.Functions 1.0.29 in the same solution.
I tried setting pipeline variables (as per https://github.com/Azure/azure-functions-vs-build-sdk/issues/320) but it had no effect:
@wolkowsky @23min, I had a problem with building on ADO, which I fixed by adding "--no-restore" to Arguments parameter of build step. Of course I have separate nuget restore step in my pipeline. I hope this will help
How is this still an issue and not being looked at? Do we need a new issue?
Still seeing this problem with a netcoreapp3.1.
Repro: dotnet build solution_file_path
Removing the microsoft.net.sdk.functions folders does not fix the issue.
C:\Users\name.nugetpackages\microsoft.net.sdk.functions\3.0.3
For some reason it builds fine from devenv, but not from dotnet.exe.
C:\Users\name\.nuget\packages\microsoft.net.sdk.functions\3.0.3\build\Microsoft.NET.Sdk.Functions.Build.targets(41,5):
error MSB4062: The "GenerateFunctions" task could not be loaded from the assembly
C:\Users\name\.nuget\packages\microsoft.net.sdk.functions\3.0.3\build\..\tools\netcoreapp3.0\\Microsoft.NET.Sdk.Functions.MSBuild.dll.
Assembly with same name is already loaded Confirm that the <UsingTask> declaration is correct,
that the assembly and all its dependencies are available
This is still happening! Why has this been closed?
I can "repro" this.
can confirm I still experienced this in a project I inherited using 1.0.35. blowing away my local nuget and rebuilding the solution fixed the issue for me for anyone who stumbles across this in the future.
Closing the issue since the fix has been merged.
Which SDK version is this fix available now?
Tried different version of SDK nuget and it still fails in the latest one.
Compile and Build works but this error happens during Publish phase
2>The "TaskAssemblyDirectory" parameter is not supported by the "GenerateFunctions" task. Verify the parameter exists on the task, and it is a settable public instance property.
2>The "GenerateFunctions" task could not be initialized with its input parameters.
Microsoft.NET.Sdk.Functions
Works => v3.0.3
Works => v3.0.7
Fails => v3.0.8
@sukesh-ak - Thank you for reporting this and sorry to hear that you are running into this issue. I can see why this is happening for 3.0.8. There was a breaking change in the task assembly contract and the assembly version was not changed as part of this update. Will get this fixed in 3.0.9. Until then I would suggest to keep the Functions sdk at 3.0.7.
There is also another issue with 3.0.8 that might prevent the native dependencies from getting resolved. So the best course of action for now would be to stick to 3.0.7.
Will get a test added for the above scenario so that we don't regress this scenario again.
Thanks @vijayrkn
What is the timeline for 3.0.9?
I mean where do I track this? Is there a separate issue to track this, since this one is already closed?
@sukesh-ak - I have re-opened it. Please note that this is an issue only with 3.0.8. Others versions should work correctly since v1, v2 & v3 have different assembly versions and can load side by side. Will make sure that the next change will take care of this issue permanently and further changes wouldn't be required.
Thanks. Tested and it works now with 3.0.9
I've faced this problem as well, sometimes while trying to Rebuild or Publish and constantly while trying to Batch Build the entire solution.
I have two function apps in my solution. One was using Microsoft.NET.Sdk.Functions 1.0.29 and another using 1.0.31.
After I set them both in version 1.0.29, the error gone. Cheers!
Most helpful comment
Until it's fixed, delete the folder in
%userprofile%\.nuget\packages\microsoft.net.sdk.functions\.