You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Could not load file or assembly 'Microsoft.CodeAnalysis #23
System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
Source=RazorEngineCore
StackTrace:
at RazorEngineCore.RazorEngineCompilationOptions..ctor()
at RazorEngineCore.RazorEngineCompilationOptionsBuilder..ctor(RazorEngineCompilationOptions options)
@Nilotaviano, I ran in to the same issue a few weeks ago and it drove me crazy trying to find the problem.
It turns out there's a known issue with Azure Functions where assemblies are cleaned up during build and this currently results in some assemblies being removed by mistake if you have installed a newer version of an assembly than expected.
To work around the issue, add the following to your csproj file to prevent the cleanup:
Activity
Nilotaviano commentedon Jul 9, 2020
Even running your
Basic Usageexample gives the same erroradoconnection commentedon Jul 9, 2020
It is something to do with framework version, are you running function against net core 3?
@AndyMDoyle may bring some light.
AndyMDoyle commentedon Jul 9, 2020
@Nilotaviano, I ran in to the same issue a few weeks ago and it drove me crazy trying to find the problem.
It turns out there's a known issue with Azure Functions where assemblies are cleaned up during build and this currently results in some assemblies being removed by mistake if you have installed a newer version of an assembly than expected.
To work around the issue, add the following to your csproj file to prevent the cleanup:
The Azure Functions team are aware of this and are working on fixing it. You can follow along on the issue at Azure/azure-functions-host#5894
Nilotaviano commentedon Jul 14, 2020
Thanks @AndyMDoyle, that works.
rochapablo commentedon Aug 12, 2020
@AndyMDoyle thank you so much! You just save the day.