TFS error source file could not be opened Archives - Anuj Varma, Hands-On Technology Architect, Clean Air Activist https://www.anujvarma.com/tag/tfs-error-source-file-could-not-be-opened/ Production Grade Technical Solutions | Data Encryption and Public Cloud Expert Thu, 27 Oct 2011 21:50:53 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://www.anujvarma.com/wp-content/uploads/anujtech.png TFS error source file could not be opened Archives - Anuj Varma, Hands-On Technology Architect, Clean Air Activist https://www.anujvarma.com/tag/tfs-error-source-file-could-not-be-opened/ 32 32 TFS Error–Source File Could Not Be Opened (‘Unspecified error ‘) https://www.anujvarma.com/tfs-errorsource-file-could-not-be-opened-unspecified-error/ https://www.anujvarma.com/tfs-errorsource-file-could-not-be-opened-unspecified-error/#comments Thu, 27 Oct 2011 21:50:53 +0000 http://www.anujvarma.com/tfs-errorsource-file-could-not-be-opened-unspecified-error/ Symptom File has already been deleted (from source control and from the filesystem). Yet – the file shows up in the Visual Studio solution (with a yellow warning icon next […]

The post TFS Error–Source File Could Not Be Opened (‘Unspecified error ‘) appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
Symptom

File has already been deleted (from source control and from the filesystem). Yet – the file shows up in the Visual Studio solution (with a yellow warning icon next to it). When one tries to compile, one sees the above error:

source file could not be opened ‘unspecified error ‘

What does not work

By now you’ve already tried all the usual suspects. Tried refreshing, closing (and re-opening VS), clean command etc. Nothing seems to work. 

The Source of the Problem

Something in Visual Studio is obviously remembering a reference to the file path and name. An obvious suspect is the .csproj file for your project. If you look inside it, you will see a reference to the source file that is throwing the above error.

The Solution

Simply delete the entry from your .csproj file – and you should be good to go. Somehow, the .csproj did not remove the entry when you removed this file (perhaps because you first deleted it from the filesystem before deleting it from the solution). That’s it – if you run into this obscure ‘Source file could not be opened  – Unspecified Error’, try editing your .csproj file and see if that fixes it.

The post TFS Error–Source File Could Not Be Opened (‘Unspecified error ‘) appeared first on Anuj Varma, Hands-On Technology Architect, Clean Air Activist.

]]>
https://www.anujvarma.com/tfs-errorsource-file-could-not-be-opened-unspecified-error/feed/ 13