On an infrequent random interval, some projects in a solution won’t build anymore. Probably because of the strong named key file beging corrupt or lost..
resulting in the following errors when building the project:
Error 1 Metadata file
‘D:\CasparKleijne.Toolkit\CasparKleijne.Toolkit\bin\Debug\CasparKleijne.Toolkit.dll’
could not be
found CasparKleijne.Toolkit.ReportingError 2 Cannot import the following key file:
CasparKleijne.Toolkit.pfx. The
key file may be password protected. To
correct this, try to import the
certificate again or manually install
the certificate to the Strong Name CSP
with the following key container name:
VS_KEY_11D604D4C94AB54 CasparKleijne.ToolkitError 3 Importing key file
“CasparKleijne.Toolkit.pfx” was
canceled. CasparKleijne.Toolkit
(assembly names are changed for some privacy reasons)
But the file is at the exact same location where it was, but I cannot import it anymore. I have to create a new one and all works fine again.
How can a file be at the correct location but still not be found by vs2010? what is this mystery? How can I avoid this?
Wild guesses:
Check your build configuration and ensure that project is set to build. Make sure it is not getting switched.
Otherwise, in my experience, weird problems like that are ususally due to Visual Studio caching things on its own.
There is no reliable way (or at least I haven’t found yet) to detect what or where to look. I generally resort to a ‘rinse-n-repeat’ procedure:
obj/debugfolders