Visual Studio 2015 Package Extension,referenced dll not copied

438 views Asked by At

Hi I use roslyn Microsoft.CodeAnalysis.Csharp dlls in my vs2015 extension,I upgraded my visual studio extension project to visual studio 2013 to 2015. but only My roslyn dll's are not copied when I want to install extension.My target framework is still same (.net 4.5.0). and I check nuget.org to new roslyn dlls ,Supported version looks same.I try to upgrade my roslyn versions but result is same. If I manually copy to extension path roslyn dlls that time myextension is working. Is there any Idea about that?

2

There are 2 answers

0
Bilgehan On BEST ANSWER

In visual studio 2015 vsix projects some dlls like Microsoft.CodeAnalysis.dll not copied to extension path.You can add

<ForceIncludeInVSIX>true</ForceIncludeInVSIX>

tag inside your reference tag like.

<Reference Include="Microsoft.CodeAnalysis.dll, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <ForceIncludeInVSIX>true</ForceIncludeInVSIX>
</Reference>

For details you can check this site... http://comealive.io/Forcing-DLLs-To-Vsix/

4
SLaks On

Roslyn is included with Visual Studio; you should not include Roslyn DLLs in your VSIX.

If you do, you may get lots of strange errors from loading a different copy of the DLLs.