Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reverting Syntax Vizualizer dependencies to use MSBuild so we can specify that nuget dependencies are build-time only #7261

Merged
merged 1 commit into from
Dec 6, 2015

Conversation

jmarolf
Copy link
Contributor

@jmarolf jmarolf commented Dec 6, 2015

#7259 introduces a problem: project.json has no way to specify that dependencies should not be copied to the output folder (buildtime vs. runtime dependencies), therefore it will happily copy Microsoft.CodeAnalysis.dll Version 1.0 over the top of Microsoft.CodeAnalysis.dll 1.2 since all of our binaries are dropped into a single directory.

To solve this, we revert back to packages.config which gives us the ability to test that certain sets of dependencies should not be copied to the output folder.

…cify that nuget dependencies are build-time only
@jmarolf
Copy link
Contributor Author

jmarolf commented Dec 6, 2015

@dotnet/roslyn-ide @dotnet/roslyn-infrastructure

jmarolf added a commit that referenced this pull request Dec 6, 2015
reverting Syntax Vizualizer dependencies to use MSBuild so we can specify that nuget dependencies are build-time only
@jmarolf jmarolf merged commit 9e6cb00 into dotnet:master Dec 6, 2015
@jasonmalinowski
Copy link
Member

Why didn't we just turn off copying to the output directory? There's an option for that.

@jmarolf
Copy link
Contributor Author

jmarolf commented Dec 7, 2015

@jasonmalinowski is there an option to not copy the references but still copy the binaries being built? I was unaware of such an option

@jasonmalinowski
Copy link
Member

It looks like you can set UseCommonOutputDirectory to true?

    ============================================================
                                        _CopyFilesMarkedCopyLocal

    Copy references that are marked as "CopyLocal" and their dependencies, including .pdbs, .xmls and satellites.
    ============================================================
    -->
  <Target
      Name="_CopyFilesMarkedCopyLocal"
      Condition="'@(ReferenceCopyLocalPaths)' != ''"
        >

    <PropertyGroup>
      <!-- By default we're not using Hard Links to copy to the output directory, and never when building in VS -->
      <CreateHardLinksForCopyLocalIfPossible Condition="'$(BuildingInsideVisualStudio)' == 'true' or '$(CreateHardLinksForCopyLocalIfPossible)' == ''">false</CreateHardLinksForCopyLocalIfPossible>
    </PropertyGroup>

    <Copy
        SourceFiles="@(ReferenceCopyLocalPaths)"
        DestinationFiles="@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)')"
        SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
        OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
        Retries="$(CopyRetryCount)"
        RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
        UseHardlinksIfPossible="$(CreateHardLinksForCopyLocalIfPossible)"
        Condition="'$(UseCommonOutputDirectory)' != 'true'"
            >

      <Output TaskParameter="DestinationFiles" ItemName="FileWritesShareable"/>

    </Copy>

  </Target>

@jasonmalinowski
Copy link
Member

Also, in your case, isn't the only binary being shipped in the VSIX the Visualizers DLL itself, since everything else is being picked up from the ambient shell? If that's the case, you could also just set CopyNuGetImplementations = false.

@jmarolf jmarolf deleted the Update_1_SDK branch December 10, 2015 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants