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

RazorCompilationService should throw a meaningful error when a user produces an application without preserveCompilationContext #4202

Closed
pranavkm opened this issue Mar 2, 2016 · 1 comment
Assignees
Milestone

Comments

@pranavkm
Copy link
Contributor

pranavkm commented Mar 2, 2016

When the compilation service encounters an application that has been compiled without the preserveCompilationContext flag - it attempts to compile the application without any reference assemblies. This invariably fails with messages such as The type or namespace System could not be found. See - https://cloud.githubusercontent.com/assets/4823412/13446609/1bd6c9dc-dfd2-11e5-94cc-fb7547f4c585.png. We should instead throw an exception that instructs users to add this flag to their project.json.

cc @davidfowl

@Eilon Eilon added this to the 1.0.0-rc2 milestone Mar 7, 2016
@Eilon Eilon assigned javiercn and pranavkm and unassigned javiercn Mar 7, 2016
@Eilon
Copy link
Member

Eilon commented Mar 7, 2016

I'm fine doing this as long as it's a reliable thing to throw on. That is, if there are any legitimate cases where I have Razor views yet don't want preserveCompilationContext then we should reconsider this. But if it's truly needed 100% of the time then let's do it.

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

No branches or pull requests

3 participants