Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

question about visual studio

Brian_Murphy
New Contributor II
304 Views

I added a .txt file to a vfproj project, and all hell broke loose.

After that visual studio would announce an "exception" when opening the solution containing this vfproj.  So I deleted the .txt file from the project, but VS still would throw an exception saying something about "an extension" was likely the problem.  The solution contains 12 projects.  11 of the projects seem to be behaving normally, but one of the projects would not behave in VS, meaning it properties could not be edited, and its source code files would open in "vanilla" mode and not in "fortran" mode (strangely, it's not the one I added the .txt file to).  If I close the solution, and just open the vfproj for the misbehaving project, it opens without any trouble, and behaves ok.  So I restarted VS, opened the sln, and deleted that vfproj from the sln, and then added it back again (all from within VS).  That seems to have solved the problem, i.e. no more exceptions.

Does anyone know what happened here?  What is the right way to add a .txt file to a project?  I would like to put project notes in the file.

The exception message said to launch VS with a /log command line switch, and look in ActivityLog.xlm for more info.  When I did that, there was one error message.  Here it is in case anyone knows what it means.

262 ERROR System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component. at Microsoft.VisualStudio.VFProject.VFFile.get_SourceFileFormat() at Intel.Fortran.IFLangService.IFClassifier.OriginalSourceFileFormat() at Intel.Fortran.IFLangService.IFClassifier..ctor(IFClassifierProvider provider, ITextBuffer buffer) at Intel.Fortran.IFLangService.IFClassifierProvider.GetClassifier(ITextBuffer buffer) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTaggerProvider.<>c__DisplayClass1`1.<CreateTagger>b__0(IClassifierProvider provider) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable`1 lazyFactories, Func`2 getter, IContentType dataContentType, Object errorSource)   Editor or Editor Extension 

 

0 Kudos
6 Replies
Steve_Lionel
Honored Contributor III
304 Views

Interesting - I have .txt files in Fortran projects all the time, but I have no solutions with 12 projects.

If this is something you can reproduce, I am sure that Intel support would like to see a ZIP of a test case.

0 Kudos
Brian_Murphy
New Contributor II
304 Views

Considering how it nearly caused a heart attack, I'm a bit hesitant to try it again.  I've seen .txt files in vsproj's before, so I thought I'd give it a try.  I'm using VS 2010 if that matters.

0 Kudos
Steve_Lionel
Honored Contributor III
304 Views

Well, if you're using VS2010 then you're also using an older version of Intel Parallel Studio.

0 Kudos
jimdempseyatthecove
Honored Contributor III
304 Views

It may be informative to state how you created the text file. In particular, within VS or by use of some external editor, and if external, which editor and which language version of Windows is installed.

Jim Dempsey

0 Kudos
Brian_Murphy
New Contributor II
304 Views

In solution explorer I right clicked the Source item for the project, selected Add New Item.  Then in the dialog box selected Text File.  OS is Windows 7.  Everything went exactly as I expected, except then the exceptions started happening.  The reason I suspect the text file addition caused the problem is only because it started right after I added it.  I suppose it could have been something else, but I have no other ideas.

0 Kudos
jimdempseyatthecove
Honored Contributor III
304 Views

Thanks for your response.

This may not be pertinent...

I've had a similar experience (Solution goes belly-up) after a Visual Studio upgrade where the Solution works for some period of time, then after some seemingly innocuous change, the Solution craps out and the only way to fix it (for me) was to delete the Solution and then recreate it. Was your original solution created with an earlier version of VS? (e.g. 2005).

Jim Dempsey
 

0 Kudos
Reply