Skip to content
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

MimeTypes could not be found error #3

Open
aarsan opened this issue Nov 3, 2017 · 2 comments
Open

MimeTypes could not be found error #3

aarsan opened this issue Nov 3, 2017 · 2 comments

Comments

@aarsan
Copy link

aarsan commented Nov 3, 2017

Thanks for putting this together. However, when I run this, I get the following errors in my logs:

2017-11-03T04:15:46.887 run.csx(5,7): error CS0246: The type or namespace name 'MimeTypes' could not be found (are you missing a using directive or an assembly reference?)
2017-11-03T04:15:46.887 run.csx(81,12): error CS0103: The name 'MimeTypeMap' does not exist in the current context

Thanks!
Ahmet

@DamianKomorowski
Copy link

Probably not installed dependencies. Make sure you have the file "project.json" in the function folder
{ "frameworks": { "net46":{ "dependencies": { "MediaTypeMap": "2.1.0" } } } }

If you make an deploy with GitHub it should work the first time :)
image

@A9G-Data-Droid
Copy link

A9G-Data-Droid commented Aug 18, 2023

If you are using https://github.com/khellang/MimeTypes you will find that this happens because that library uses auto-generated code. The type doesn't exist until it has been generated. You get this on a clean, before NuGet restore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants