Missing "BuiltProjectOutputGroupDependencies" creating VSIX depending on new simplified csproj

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

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

This obviously looks like incompatibility with traditional VSIX csproj, expecting something from dependent projects that the new csproj does not provide.

Has anyone come across this or consulted about it? I am going to study deleting a link to a project and manually link to the output DLL.

As a related party, it is not clear which output DLL that VSIX will select from the class library, since the new csproj supports several target frameworks.

+6
source share
2 answers

As pointed out in the GitHub issue , the workaround is:

  • Unload the VSIX project.
  • Right-click and edit the .csproj file.
  • Find the <ProjectReference> for the project that caused the problem.
  • Add the <AdditionalProperties>TargetFramework=net452</AdditionalProperties> element using the correct version of the .NET Framework that you are targeting in the specified project.
  • Reboot and rebuild the VSIX project.
+4
source

I believe that you were faced with the same problem that I encountered when I tried to reference the Visual Studio extension from the .NET Standard library, which was aimed at several frameworks. There is a GitHub dotnet / sdk # 433 issue about this.

I needed to remove other targets. In my case, I had:

 <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFrameworks>netstandard1.3;net46</TargetFrameworks> </PropertyGroup> ... </Project> 

And I had to change it only for the target netstandard1.3 (since it is compatible with .NET 4.6 according to the .NET Standard chart ), and my VSIXs are aimed at .NET 4.6.

 <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netstandard1.3</TargetFramework> </PropertyGroup> ... </Project> 
0
source

Source: https://habr.com/ru/post/1014376/


All Articles