-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not load file or assembly 'Microsoft.CodeAnalysis #23
Comments
Even running your
|
It is something to do with framework version, are you running function against net core 3? |
@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 |
Thanks @AndyMDoyle, that works. |
@AndyMDoyle thank you so much! You just save the day. |
I'm trying to use this lib to generate HTML on an Azure Function, not sure what could be going wrong here.
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)
The text was updated successfully, but these errors were encountered: