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

BuiltProjectOutputGroupDependencies target missing after updating Nerdbank.GitVersioning to 3.5.x #751

Closed
josesimoes opened this issue May 9, 2022 · 8 comments · Fixed by #752

Comments

@josesimoes
Copy link

Hey!

After upgrading to the latest 3.5.103 a VSIX project I have it's failing with the error:

C:\Users\VssAdministrator\.nuget\packages\nerdbank.gitversioning\3.5.103\build\PrivateP2PCaching.proj : error MSB4057: The target "BuiltProjectOutputGroupDependencies" does not exist in the project.

Reverting to 3.4.255 "fixes" it. Any hints on where I should look?

@AArnott AArnott changed the title Building VSIX failing Build fails after updating Nerdbank.GitVersioning to 3.5.x May 9, 2022
@AArnott
Copy link
Collaborator

AArnott commented May 9, 2022

There is no vsix. I presume you mean nuget package.

Yes, this is a risk of the 3.5 upgrade on account of it being made to work with msbuild's static graph feature. You can see a little history over at #688.

@AArnott
Copy link
Collaborator

AArnott commented May 9, 2022

As a workaround while we add support for this target, of course you can stick with 3.4. Or you can define your own .targets file that implements this target (it can be totally empty):

<Project>
  <Target Name="BuiltProjectOutputGroupDependencies" />
</Project>

and then set the NBGV_PrivateP2PAuxTargets property in your projects to point to this file. Defining this property once in your Directory.Build.props file is recommended.

<PropertyGroup>
  <NBGV_PrivateP2PAuxTargets>$(MSBuildThisFileDirectory)YourAuxTargets.targets</NBGV_PrivateP2PAuxTargets>
</PropertyGroup>

Where "YourAuxTargets.targets" is the name of your custom .targets file.

@josesimoes
Copy link
Author

Excuse my bad English... I was trying to explain that this happened to me when updating a VSIX project on which I'm using nbgv.
Everything works fine with 3.5.103 in other class library projects where it's being used.

I'll take a look at #688 as you're suggesting and see if I can find something.

@AArnott AArnott changed the title Build fails after updating Nerdbank.GitVersioning to 3.5.x BuiltProjectOutputGroupDependencies target missing after updating Nerdbank.GitVersioning to 3.5.x May 9, 2022
@AArnott AArnott added this to the v3.5 milestone May 9, 2022
@AArnott AArnott added the bug label May 9, 2022
@AArnott
Copy link
Collaborator

AArnott commented May 9, 2022

I'd love to see if #752 resolves your issue. Are you comfortable with nuget enough to download the nupkg from the PR build and give it a try?

@josesimoes
Copy link
Author

I'd love to see if #752 resolves your issue. Are you comfortable with nuget enough to download the nupkg from the PR build and give it a try?

Yeap! I can give it a try.

@josesimoes
Copy link
Author

josesimoes commented May 9, 2022

@AArnott I've started by implementing your suggestion above. It fixed it but a new error popped complaining about another target missing DebugSymbolsProjectOutputGroup.
I've added that one too to the "dummy" targets. 😅 The build when fine afterwards.

You may want to take a look at the PR when these nanoframework/nf-Visual-Studio-extension#719.

Please let me know if you still want me to use that new nuget from your pipeline, or if you'll be changing anything to (maybe) address that new error.

@AArnott
Copy link
Collaborator

AArnott commented May 9, 2022

Great. It was additional missing targets that I was mostly curious about. I've updated my PR. Your existing validation covers what I was looking for, so I'll complete the PR when its build is done. Thank you.

@josesimoes
Copy link
Author

josesimoes commented May 9, 2022

No problem! Thank YOU for the quick turn around and, of course, for the work on this awesome tool!! 😃 💯

AArnott added a commit that referenced this issue May 9, 2022
* Define an empty BuiltProjectOutputGroupDependencies target
* Define an empty DebugSymbolsProjectOutputGroup target

Fixes #751
@AArnott AArnott closed this as completed May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants