-
Notifications
You must be signed in to change notification settings - Fork 847
Description
This is similar to #2917 and #3040.
I installed 15.5 Preview 2 over an existing VS 2017 Enterprise 15.5 Preview 1 installation and noticed that F# Desktop Language Support was unchecked, although I had installed F#. I added the package. The upgrade finished without errors.
After that, I started getting the same error dialog box as the other issues. ActivityLog.xml contains the same entries:
<entry>
<record>1016</record>
<time>2017/10/24 12:08:40.315</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [FSharpPackage]</description>
<guid>{871D2A70-12A2-4E42-9440-425DD92A4116}</guid>
</entry>
<entry>
<record>1017</record>
<time>2017/10/24 12:08:40.327</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [FSharpPackage]Source: 'Microsoft.VisualStudio.Composition' Description: Expected 1 export(s) with contract name "Microsoft.VisualStudio.FSharp.Editor.SettingsPersistence+ISettings" but found 0 after applying applicable constraints.
Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "Microsoft.VisualStudio.FSharp.Editor.SettingsPersistence+ISettings" but found 0 after applying applicable constraints.
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition)
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String contractName, ImportCardinality cardinality)
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String contractName)
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T](String contractName)
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]()
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]()
 at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]()
 at Microsoft.VisualStudio.FSharp.Editor.FSharpPackage.Initialize()
 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)</description>
<guid>{871D2A70-12A2-4E42-9440-425DD92A4116}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>1018</record>
<time>2017/10/24 12:08:40.330</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [FSharpPackage](null)</description>
<guid>{871D2A70-12A2-4E42-9440-425DD92A4116}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>1019</record>
<time>2017/10/24 12:08:40.333</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [FSharpPackage]</description>
<guid>{871D2A70-12A2-4E42-9440-425DD92A4116}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>1020</record>
<time>2017/10/24 12:08:40.336</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Package failed to load; error message suppressed by skip flag</description>
<guid>{871D2A70-12A2-4E42-9440-425DD92A4116}</guid>
</entry>
<entry>
<record>1021</record>
<time>2017/10/24 12:08:40.336</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{871D2A70-12A2-4E42-9440-425DD92A4116}</guid>
</entry>
<entry>
<record>1022</record>
<time>2017/10/24 12:08:40.336</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [FSharpPackage]</description>
<guid>{871D2A70-12A2-4E42-9440-425DD92A4116}</guid>
</entry>
<entry>
<record>1023</record>
<time>2017/10/24 12:08:40.357</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [FSharpPackage]Source: 'Microsoft.VisualStudio.Composition' Description: Expected 1 export(s) with contract name "Microsoft.VisualStudio.FSharp.Editor.SettingsPersistence+ISettings" but found 0 after applying applicable constraints.
Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "Microsoft.VisualStudio.FSharp.Editor.SettingsPersistence+ISettings" but found 0 after applying applicable constraints.
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition)
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String contractName, ImportCardinality cardinality)
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String contractName)
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T](String contractName)
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T]()
 at Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValue[T]()
 at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]()
 at Microsoft.VisualStudio.FSharp.Editor.FSharpPackage.Initialize()
 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)</description>
<guid>{871D2A70-12A2-4E42-9440-425DD92A4116}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>1024</record>
<time>2017/10/24 12:08:40.361</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [FSharpPackage](null)</description>
<guid>{871D2A70-12A2-4E42-9440-425DD92A4116}</guid>
<hr>80131500</hr>
<errorinfo></errorinfo>
</entry>
My F# projects load and build, but therere is no syntax highlighting and the Enter key doesn't work on F# files.
The same error appeared for a time whenever I loaded a solution that contained F# projects. After restarting Visual Studio 2-3 times the error dialog box disappeared but the editor still doesn't work.
Uninstalling and reinstalling the F# package didn't help. The same error dialog box started appearing again.
The problem does not occur in a 15.5 Preview 1 Community edition I have installed side-by-side. The F# package is installed and called F# Language support. The same projects open and build without problems. The version of F# tools installed in this installation has 15.4.1.170929605.
Update
I was able to solve this by removing the 15.5.2 package and installing the latest nightly build, 15.4.1.17102302