Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Don't publish MSBuild assemblies in the NuGet package #39

@AndyGerlicher

Description

@AndyGerlicher

https://developercommunity.visualstudio.com/content/problem/208668/the-finddependenciesofexternallyresolvedreferences.html

Customers are reporting issues with projects that use SimpleStubs. We added a parameter to Resolve Assembly References (RAR) in 15.6 and the common targets were updated to use the new parameter. Since Etg.SimpleStubs packages MSBuild (currently 15.5.180) it will load DLLs from that location but common targets/toolset from the installed location.

Options:

  1. Redistribute all of MSBuild. You need to define a toolset (see msbuild.exe.config) for things can be found. It would need all targets/tasks needed to do what you're trying to do. This is really hard to get right since VS installs stuff to the MSBuild extensions folder.
  2. Dynamically load MSBuild at run-time. See https://www.nuget.org/packages/Microsoft.Build.Locator/1.0.7-preview-ge60d679b53
    Code/samples available here: https://github.com/Microsoft/MSBuildLocator

If you choose one, we'll continue to have this issue where we add features and things are out of sync. I can help out with 2 if needed. If you build the repo the sample app shows a simple build and prompts which VS to use (you probably don't want to prompt, but something similar).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions