Wil
Wil

Reputation: 10594

Is there a way to disable compile checking of views that have been excluded from a project?

I have Compile Views turned on and have just changed a big portion of my project so that a few of the views are not relevant at the moment.

I right clicked on them and chose Exclude from project.

However, these files are still be checked at compile time and come up in errors (as their ViewModel/model no longer exists).

The model/ViewModel themselves are excluded from the project and are not checked, but, these files will one day be included and I do not want to delete them.

So far, the only solution I have found is to highlight the entire content of the views and comment them out.

Whilst my solution does work, is this a bug or am I doing something wrong... or even, is there a better work around?

Upvotes: 3

Views: 267

Answers (1)

ChrisF
ChrisF

Reputation: 137178

If the files are excluded from the project then they shouldn't be compiled.

What you might have is that the object files are still the output directory and it's these that are generating the errors.

You could either clean the project before excluding the files or simply delete the bin and obj directories to remove all the old output.

Upvotes: 0

Related Questions