Gics file not found with WPF and code contracts
Can you elaborate on your stages of reproduction in more detail? Meaning files ending in .gics are files created specifically to include intellisense in running projects. They are not part of the build process and probably should not be used by code contracts. I am not an expert on code contracts by any means, although I could be wrong on this question.
source to share
I've posted a registry and workaround for this issue on the Code Contracts forum. Here's the url:
The short answer is that the error occurs whenever you have multiple projects that reference each other in a solution, and one of the child projects is a WPF control library. To work around this issue, you can either disable contract checking for the parent project (those referenced by other projects), or add a post-build event to the offending child project to create * .gics that look for rewriting the contract code.
For example, create a blank text file in the root directory of your child project and name it "Blank.txt". Then add the following command as a post-build event in this project:
copy "$(ProjectDir)Blank.txt" "$(ProjectDir)obj\$(Configuration)\GeneratedInternalTypeHelper.g.i.cs"
Copy this line as many times as necessary, one for each missing file.
source to share