Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

GetPdfViewInHtml generate "Razor.RuntimeCompilation.CompilationFailedException" error CS1061 on Centos 8 #48

Open
rpennetta opened this issue Dec 29, 2020 · 1 comment

Comments

@rpennetta
Copy link

Like in the object,
in my asp.net core 3.1 application, normaly when i try to use "GetPdfViewInHtml" it's ok. Whereas if i modify html, in order to use a new field created in datamodel, i obtain this error:

"
2020-12-29 15:10:08.881 [Error] An unhandled exception has occurred while executing the request.
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.CompilationFailedException: One or more compilation failures occurred:
/Views/FakeView.cshtml(230,45): error CS1061: 'ModuloConsegnaPdfViewModel' non contiene una definizione di 'Responsabile' e non è stato trovato alcun metodo di estensione accessibile 'Responsabile' che accetta un primo argomento di tipo 'ModuloConsegnaPdfViewModel'. Probabilmente manca una direttiva using o un riferimento all'assembly.
/Views/FakeView.cshtml(236,33): error CS1061: 'ModuloConsegnaPdfViewModel' non contiene una definizione di 'Responsabile' e non è stato trovato alcun metodo di estensione accessibile 'Responsabile' che accetta un primo argomento di tipo 'ModuloConsegnaPdfViewModel'. Probabilmente manca una direttiva using o un riferimento all'assembly.
at Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RuntimeViewCompiler.CompileAndEmit(RazorCodeDocument codeDocument, String generatedCode)
at Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RuntimeViewCompiler.CompileAndEmit(String relativePath)
at Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.RuntimeViewCompiler.OnCacheMiss(String normalizedPath)

"

Thank's

@rpennetta
Copy link
Author

anybody has never encountered this problem?

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

No branches or pull requests

1 participant