Skip to content

Commit

Permalink
set EmbedInteropTypes to false; Ninject can now correctly resolve the…
Browse files Browse the repository at this point in the history
… VBE dependency across assemblies :)
  • Loading branch information
retailcoder committed Jul 24, 2015
1 parent 67b9549 commit f61e9ed
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion RetailCoder.VBE/Root/RubberduckConventions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System.Linq;
using System.Reflection;
using Microsoft.Vbe.Interop;
using Ninject;
using Ninject.Extensions.Conventions;
using Rubberduck.Parsing;
using Rubberduck.Parsing.VBA;
using Rubberduck.SourceControl;
using Rubberduck.VBEditor;

namespace Rubberduck.Root
Expand All @@ -19,9 +21,10 @@ public RubberduckConventions(IKernel kernel)

public void Apply(VBE vbe, AddIn addin)
{
_kernel.Bind<App>().ToSelf();

_kernel.Bind<VBE>().ToConstant(vbe);
_kernel.Bind<AddIn>().ToConstant(addin);
_kernel.Bind<App>().ToSelf();

// bind IFoo to Foo across all assemblies:
_kernel.Bind(t => t.FromThisAssembly().SelectAllClasses().BindDefaultInterface());
Expand Down
1 change: 0 additions & 1 deletion RetailCoder.VBE/Rubberduck.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@
<Compile Include="Refactorings\ReorderParameters\ReorderParametersPresenter.cs" />
<Compile Include="Refactorings\ReorderParameters\ReorderParametersPresenterFactory.cs" />
<Compile Include="Refactorings\ReorderParameters\ReorderParametersRefactoring.cs" />
<Compile Include="Root\ActiveCodePaneEditor.cs" />
<Compile Include="Root\RubberduckConventions.cs" />
<Compile Include="Settings\DisplayLanguageSetting.cs" />
<Compile Include="Settings\SourceControlConfiguration.cs" />
Expand Down
2 changes: 1 addition & 1 deletion Rubberduck.SourceControl/Rubberduck.SourceControl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</Reference>
<Reference Include="Microsoft.Vbe.Interop, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\libs\Microsoft.Vbe.Interop.dll</HintPath>
</Reference>
<Reference Include="System" />
Expand Down
3 changes: 2 additions & 1 deletion Rubberduck.VBEEditor/Rubberduck.VBEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@
</Reference>
<Reference Include="Microsoft.Vbe.Interop, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>True</EmbedInteropTypes>
<EmbedInteropTypes>False</EmbedInteropTypes>
<HintPath>..\libs\Microsoft.Vbe.Interop.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="ActiveCodePaneEditor.cs" />
<Compile Include="DocumentEventHandlerPrefixes.cs" />
<Compile Include="Extensions\CodeModuleExtensions.cs" />
<Compile Include="CodeModuleSelection.cs" />
Expand Down

0 comments on commit f61e9ed

Please sign in to comment.