FunctionMonkey
FunctionMonkey copied to clipboard
Compilation error in beta4
Hi,
I can build everything locally in VS but the build fails on DevOps / TFS with the error: C:\WINDOWS\ServiceProfiles\NetworkService.nuget\packages\functionmonkey.compiler\4.0.44-beta.4\build\netstandard1.0\FunctionMonkey.Compiler.targets(45,20): Error MSB4064: The "InputAssemblyPath" parameter is not supported by the "ConvertErrors" task. Verify the parameter exists on the task, and it is a settable public instance property.
It seems it should be InputPath instead of InputAssemblyPath accodring to commit
<ConvertErrors InputAssemblyPath="$(FunctionPublishParams)" /> should be <ConvertErrors InputPath="$(PublishDir)$(FunctionPathSubFolder)" />
At the moment I removed the task completely and now the build works.
I think this is now fixed on the very latest version - I had an issue with the publish task. Let me know!
It seems you removed ConvertErrors from publish completely. This will work however this won't throw errors if there are any. As a consequence at out DevOps build this may produce invalid functions.dll (actually without any function).
<ConvertErrors InputPath="$(PublishDir)$(FunctionPathSubFolder)" />
this line works for us
Does publish not always invoke build? My (observational) sense was that it did and so publish should work as from an FM point of view there’s no change.
From: alexeymarkov [email protected] Reply to: JamesRandall/FunctionMonkey [email protected] Date: Monday, 17 February 2020 at 09:46 To: JamesRandall/FunctionMonkey [email protected] Cc: James Randall [email protected], Comment [email protected] Subject: Re: [JamesRandall/FunctionMonkey] Compilation error in beta4 (#126)
It seems you removed ConvertErrors from publish completely. This will work however this won't throw errors if there are any. As a consequence at out DevOps build this may produce invalid functions.dll (actually without any function).
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/JamesRandall/FunctionMonkey/issues/126?email_source=notifications&email_token=AABZVV6PV6AD6TLKRFYHHNDRDJMHBA5CNFSM4KSNRPC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL5XLCA#issuecomment-586904968, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AABZVVYDTESXQE3EWPAI4RTRDJMHBANCNFSM4KSNRPCQ.
I will check again,
You are right. The build is called before.
But recently I got a corrupted functions.dll
The error in __fm__errors.json
{"Severity":0,"Message":"Unexpected error: Could not load file or assembly '*****, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. The process cannot access the file because it is being used by another process. (0x80070020)"},{"Severity":2,"Message":"Compilation complete"}
it could not not load one of dependencies.
And nevertheless the build reported success: _2020-02-10T14:35:07.7045800Z FunctionMonkeyAzureFunctionsCompiler: 2020-02-10T14:35:07.7046069Z Running Function Monkey build for Azure Functions 2020-02-10T14:35:07.7074517Z dotnet "C:\WINDOWS\ServiceProfiles\NetworkService.nuget\packages\functionmonkey.compiler\4.0.44-beta.4\build\netstandard1.0....\tools\netcoreapp3.1\FunctionMonkey.Compiler.dll" "C:_agents2019\dev_1_work\1\s...\bin\Release\netcoreapp3.1\bin....FunctionApp.dll" --netcore21 --jsonoutput 2020-02-10T14:35:12.3050172Z Compiler starting 2020-02-10T14:35:12.3050662Z Loading assembly C:_agents2019\dev_1_work\1\s...\bin\Release\netcoreapp3.1\bin...FunctionApp.dll 2020-02-10T14:35:12.3050748Z Compilation complete
I'am not sure which task produced the corrupted functions.dll and ___fm__errors.json with errors but I think it was publish.
It seems both tasks can fail independently so it would make sense to add ConvertErrors to both.