You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
I'm trying to use Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring in VisualRust. I understand that this is probably not (yet) a supported scenario, but I got it to work quite well. However, I'm still getting MEF composition errors when both RTVS and VisualRust are installed.
----- CompositionError level 1 ------
VisualRust.ProjectSystem.RustProjectSourceItemProviderExtension.ctor(temporaryItems): expected exactly 1 export of Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring.Project.IFileSystemMirroringProjectTemporaryItems but found 2.
VisualRust.ProjectSystem.LoadHooks.Project
Microsoft.VisualStudio.R.Package.ProjectSystem.RProjectLoadHooks.Project
part definition VisualRust.ProjectSystem.RustProjectSourceItemProviderExtension
Microsoft.VisualStudio.R.Package.ProjectSystem.RProjectSourceItemProviderExtension.ctor(temporaryItems): expected exactly 1 export of Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring.Project.IFileSystemMirroringProjectTemporaryItems but found 2.
VisualRust.ProjectSystem.LoadHooks.Project
Microsoft.VisualStudio.R.Package.ProjectSystem.RProjectLoadHooks.Project
part definition Microsoft.VisualStudio.R.Package.ProjectSystem.RProjectSourceItemProviderExtension
Since I think these issues can be fixed quite easily, I'm reporting them here even though VisualRust now loads successfully in spite of those errors. I'm not sure if this is the right way, but I was able to get rid of the errors by using an OrderPrecedenceImportCollection (as described here) for the _temporaryItems in FileSystemMirroringProjectSourceItemProviderExtensionBase, and adding AppliesTo attributes to the FileSystemMirroringProject Project export in RProjectLoadHooks (and my own LoadHooks class).
Furthermore, I think the ProjectItemDependencyProvider also should have an AppliesTo attribute.
By the way, it would be great if Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring could be published on NuGet some day!
The text was updated successfully, but these errors were encountered:
Boddlnagg
changed the title
MPF composition errros when using FileSystemMirroring in a different extension
MEF composition errros when using FileSystemMirroring in a different extension
Oct 15, 2016
How exactly are you reusing the component? VisualRust may be loading OK, but R Tools most probably will stop working due to multiple MEF exports that it is not expecting. Since in VS 15 RTVS come in box and not as extension, this may not be a good idea.
Also, Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring may or may not be present in VS as either of components that implement disk-based file system may not be installed by the user. There are two file mirroring project systems in VS (Cordova and RTVS) - they are forks and are not reusing the same code base.
FMPS is relatively small component you probably want copy the code and change the namespace - check legal copyright of course for applicability.
I'm trying to use
Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring
in VisualRust. I understand that this is probably not (yet) a supported scenario, but I got it to work quite well. However, I'm still getting MEF composition errors when both RTVS and VisualRust are installed.Since I think these issues can be fixed quite easily, I'm reporting them here even though VisualRust now loads successfully in spite of those errors. I'm not sure if this is the right way, but I was able to get rid of the errors by using an
OrderPrecedenceImportCollection
(as described here) for the_temporaryItems
inFileSystemMirroringProjectSourceItemProviderExtensionBase
, and addingAppliesTo
attributes to theFileSystemMirroringProject Project
export inRProjectLoadHooks
(and my ownLoadHooks
class).Furthermore, I think the
ProjectItemDependencyProvider
also should have anAppliesTo
attribute.By the way, it would be great if
Microsoft.VisualStudio.ProjectSystem.FileSystemMirroring
could be published on NuGet some day!The text was updated successfully, but these errors were encountered: