Could Not Be Opened Unspecified Error C#
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business designer cs could not be opened Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation error cs1504 source file Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like tfs source file could not be opened unspecified error you, helping each other. Join them; it only takes a minute: Sign up AssemblyInfo.cs could not be opened - Unspecified Error [closed] up vote 6 down vote favorite 1 I was working offline from TFS for a while in my solution. I went back online (TFS) and when I tried to compile my solution I get this for a project I had added to this solution. AssemblyInfo.cs could not be opened - Unspecified Error I checked and that file is there so not sure why it can't utilize/read it. This is an ASP.NET Web Application and the project it's complaining about here is just a regular C# class library project. asp.net-mvc share|improve this question edited Jul 28 '12 at 15:44 tereško 42.4k1567124 asked Nov 28 '11 at 6:49 WeDoTDD.com 13.4k79218398 closed as too localized by Kev Nov 28 '11 at 15:39 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question. Check your file in Windows Directory whether it is there or not and also check it if it is ready-only. –Tarik Nov 28 '11 at 6:53 It's there and not read-only. I had checked this before posting. –WeDoTDD.com Nov 28 '11 at 7:04 found it. The project has a missing ref to its AssemblyInfo.cs –WeDoTDD.com Nov 28 '11 at 7:13 add a comment| 2 Answers 2 active oldest votes up vote 7 down vote I have had this happened to me in the past. This can be more of a Visual Studio problem more than anything else. What this means is that the AssemblyInfo.cs file is either missing from the Properties folder in the project or there is a permissions issue. I
Could Not Be Opened (‘Unspecified error ‘) October 27, 2011by Anuj Varma2 min read5 Comments 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 http://stackoverflow.com/questions/8292362/assemblyinfo-cs-could-not-be-opened-unspecified-error 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 http://www.anujvarma.com/tfs-errorsource-file-could-not-be-opened-unspecified-error/ 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. Specializing in high volume web and cloud application architecture, Anuj Varma's customer base includes Fortune 100 companies (dell.com, British Petroleum, Schlumberger). Anuj also offers a 1-day ‘technology crash course' focused on cloud technologies for executives. For Anuj's specialized one-on-one executive seminars, visit ExecutiveTechnologySeminars All content on this site is original and owned by anujvarma.com. Anuj Varma – who has written 512 posts on Anuj Varma, Technology Architect.
TFS error source file could not be opened 5 Comments Vikram says: May 2, 2014 at 9:42 am Hi Anuj, Thanks a lot for this post. I wish I would have read it yesterday and could have saved my time! I had this error (Source File Could Not Be Opened (‘Unspecified error ‘)) and other 4 errors saying ‘metadata file could not be found'. Yesterday, I concentrated on those other 4 errors. Tried everything, but could not get rid of those. Today morning, I read your blog and decidednot be opened (‘Unspecified error ‘) October 31, 2013by Anuj Varma2 min readAdd Comment Introduction You’ve just downloaded a project (from either codeproject or github or some other repository) – and opened http://www.anujvarma.com/source-file-propertiesassemblyinfo-cs-could-not-be-opened-unspecified-error/ it up in your current version of Visual Studio. On trying to compile it, you encounter the following error: AssemblyInfo.cs' could not be opened (‘Unspecified error ‘) This seems to occur for every project in your solution that contains an AssemblyInfo.cs. Simply put, the assemblyinfo.cs contains ‘metadata’ (version number, guid etc.) for your assembly. This metadata is useful in uniquely identifying your could not assembly to all its consumers. Workaround 1 Simply delete these assemblyinfo.cs files. If all you are trying to do is view sample source code, you do not really care about the versioning or COM interoperability (GUID) of the assembly. Your project should compile just fine after this deletion. Workaround 2 If deleting the file is not an option – and you do could not be need the metadata, simply delete the offending file – and create a new one. To create a new one, click on the ‘Properties’ folder in your project (see below). This should bring up the properties dialog. There should be an ‘Assembly Information’ button. Now, the only thing the assembly information really needs is a GUID. From your Tools menu—>CreateGUID as shown below. Click ‘Copy’ on the CreateGUID popup – and paste that content into the Assembly Information screen from the previous step. Delete the leading slashes in the GUID, since you do not need those. Click OK – and you should be done. You will have an assemblyinfo with a GUID – and your project will compile just fine. Summary While uploading projects, the assemblyinfo.cs file often goes missing – and causes a compilation error for users who try downloading and compiling the project. The workaround is simple – either delete the file altogether (you don’t need it) – or delete and re-create it using the steps described in this post. Specializing in high volume web and cloud application architecture, Anuj Varma's custom