Azure-Samples / function-image-upload-resize

Sample function in Azure Functions that demonstrates how to upload and resize images in Azure Storage.
MIT License
66 stars 157 forks source link

compilation error #7

Open cherchyk opened 5 years ago

cherchyk commented 5 years ago

I was following this scenario https://docs.microsoft.com/en-us/azure/event-grid/resize-images-on-storage-blob-upload-event?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&tabs=net#deploy-the-function-code

here is the error

Executing 'Functions.imageresizerfunc' (Reason='EventGrid trigger fired at 2018-10-10T23:36:18.3983661+00:00', Id=f56c4c83-3624-4673-99df-d24f6a1be981)
Function compilation error
run.csx(4,1): error CS0006: Metadata file 'ImageResizer' could not be found
run.csx(10,7): error CS0246: The type or namespace name 'ImageResizer' could not be found (are you missing a using directive or an assembly reference?)
xiaohu0828 commented 5 years ago

Has the same errors.

`14:56:31.778 [Error] Function compilation error

Microsoft.CodeAnalysis.Scripting.CompilationErrorException : Script compilation failed.

at async Microsoft.Azure.WebJobs.Script.Description.DotNetFunctionInvoker.CreateFunctionTarget(CancellationToken cancellationToken) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\DotNet\DotNetFunctionInvoker.cs : 314

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

at async Microsoft.Azure.WebJobs.Script.Description.FunctionLoader`1.GetFunctionTargetAsync[T](Int32 attemptCount) at C:\azure-webjobs-sdk-script\src\WebJobs.Script\Description\FunctionLoader.cs : 55

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

`

waysidefarm commented 4 years ago

You're missing the SixLabors.ImageSharp package - you need to add this in through Pacakage Manager.

SixLabors.ImageSharp is in pre-release so will not show in Nuget Package Manager unless you tick the "include pre-release" checkbox. You can also add it through the PM Console using Install-Package SixLabors.ImageSharp -Version 1.0.0-beta0007