Bug 12052 – VS2013 (NuGet) complains a lot when VisualD projects are present

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
visuald
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2014-01-31T18:51:00Z
Last change time
2015-06-09T05:15:03Z
Assigned to
nobody
Creator
turkeyman

Comments

Comment #0 by turkeyman — 2014-01-31T18:51:04Z
I'm getting a lot of complaints when I use VisualD under VS2013. This page suggests that maybe some project properties that NuGet tries to query aren't implemented? http://nuget.codeplex.com/discussions/445802 Here is the spam that appears every build: Error occurred while restoring NuGet packages: System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information. 1) The method or operation is not implemented. Resulting in: An exception occurred while trying to create an instance of type 'NuGet.VisualStudio.SolutionManager'. Resulting in: Cannot activate part 'NuGet.VisualStudio.SolutionManager'. Element: NuGet.VisualStudio.SolutionManager --> NuGet.VisualStudio.SolutionManager Resulting in: Cannot get export 'NuGet.VisualStudio.SolutionManager (ContractName="NuGet.VisualStudio.ISolutionManager")' from part 'NuGet.VisualStudio.SolutionManager'. Element: NuGet.VisualStudio.SolutionManager (ContractName="NuGet.VisualStudio.ISolutionManager") --> NuGet.VisualStudio.SolutionManager Resulting in: Cannot set import 'NuGet.VisualStudio.VsSettings..ctor (Parameter="solutionManager", ContractName="NuGet.VisualStudio.ISolutionManager")' on part 'NuGet.VisualStudio.VsSettings'. Element: NuGet.VisualStudio.VsSettings..ctor (Parameter="solutionManager", ContractName="NuGet.VisualStudio.ISolutionManager") --> NuGet.VisualStudio.VsSettings Resulting in: Cannot get export 'NuGet.VisualStudio.VsSettings (ContractName="NuGet.ISettings")' from part 'NuGet.VisualStudio.VsSettings'. Element: NuGet.VisualStudio.VsSettings (ContractName="NuGet.ISettings") --> NuGet.VisualStudio.VsSettings at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition) at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart) at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore() at System.ComponentModel.Composition.Primitives.Export.get_Value() at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValueCore[T](String contractName, ImportCardinality cardinality) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValue[T](String contractName) at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportedValue[T]() at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetService[T]() at NuGet.VisualStudio.ServiceLocator.GetComponentModelService[TService]() at NuGet.VisualStudio.ServiceLocator.GetInstance[TService]() at NuGet.VsEvents.PackageRestorer.IsAutomatic() at NuGet.VsEvents.PackageRestorer.BuildEvents_OnBuildBegin(vsBuildScope Scope, vsBuildAction Action).
Comment #1 by r.sagitario — 2014-02-09T13:52:34Z
I have muted the NuGet errors in the latest beta: https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.38beta2
Comment #2 by turkeyman — 2014-02-09T19:17:21Z
(In reply to comment #1) > I have muted the NuGet errors in the latest beta: > https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.38beta2 That'll do it... but what about that cause of the problem? That article I linked that says it is trying to call some missing API's from the project implementation, does that sound likely?
Comment #3 by r.sagitario — 2014-02-09T23:33:34Z
The cause is that NuGet uses the "automation model" of a project to request project items and properties. This isn't implemented completely in Visual D, mostly because it can involve marshalling which isn't fun to do outside C#. So far, Visual D reported 0 project elements, while it didn't implement an enumerator. This is added now, always returning an empty enumerator. In addition, I support two project properties that are requested by NuGet.
Comment #4 by r.sagitario — 2014-04-12T10:12:39Z