Search code examples
roslynvisual-studio-extensionsroslyn-code-analysismicrosoft.codeanalysis

Visual Studio 2015 Package Extension,referenced dll not copied


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?


Solution

  • 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/