I have a bunch of .cs
files that represent test cases for certain manipulations using the Roslyn API. Since they are supposed to have valid compile time syntax, I would like to have Intellisense, Resharper and other pre-compile time checks available on those files when writing in them, but not to actually compile them when I build the solution (since the test will only be looking at the syntax).
Now, I could probably create another project just for these input test files (and make sure it never compiles), but I would rather keep them in the test project (where I believe they belong and for simplicity's sake). I don't really care if the files don't end up actually being included IN the solution, as long as I can get syntactic checking in the end (although this seems unlikely).
At first, I thought I could simply exclude a directory from being compiled in the .csproj
, but I found no such property that would allow that. I've heard that <CompileDependsOn>
could potentially help me here, but I don't understand exactly how.
My direct question is this: is it possible to have syntactic checking (Intellisense, Resharper, etc) for files that will not end up being compiled when building a project/solution, without having them in a separate, non-building project ?