Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing "BuiltProjectOutputGroupDependencies" building VSIX depending on new simplified csproj

I have a standard VSIX project taking a project dependency on a class library project in the same solution. Everything was building just fine until I switched the class library to the new VS2017RC simplified csproj. The class library builds fine (my dotnet SDK is 1.0.0-preview4-004233), but when trying to build the VSIX I get:

error MSB4057: The target "BuiltProjectOutputGroupDependencies" does not exist in the project.

This obviously looks like an incompatibility with a traditional VSIX csproj expecting something from dependent projects that the new csproj doesn't provide.

Has anyone bumped into this or have any advice on working around it? I'm going to look into removing the project reference and manually referencing the output DLL.

As a related side note, it's unclear which output DLL the VSIX would select from the class library, as the new csproj supports multiple target frameworks.

like image 654
Shay Rojansky Avatar asked Jan 24 '17 15:01

Shay Rojansky


1 Answers

As stated on the GitHub issue, here's a workaround:

  1. Unload the VSIX project.
  2. Right-click and edit its .csproj file.
  3. Find the <ProjectReference> to the project which started causing the issue.
  4. Add the element <AdditionalProperties>TargetFramework=net452</AdditionalProperties>, using the correct .NET Framework version you target in the referenced project.
  5. Reload and rebuild the VSIX proejct.
like image 139
Ray Avatar answered Sep 21 '22 15:09

Ray