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

Warning about PrivateP2PCaching.proj #1040

Open
thomas-ravkilde opened this issue Apr 4, 2024 · 5 comments
Open

Warning about PrivateP2PCaching.proj #1040

thomas-ravkilde opened this issue Apr 4, 2024 · 5 comments

Comments

@thomas-ravkilde
Copy link

I have the same issue as #787. If I understand correctly, this issue should have been circumvented for v3.6 by #847. However, I still get the issue with v3.6.133. I'm not using a graph build, AFAIK:

Directory.Build.props:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')">
      <PrivateAssets>all</PrivateAssets>
      <Version>3.6.133</Version>
    </PackageReference>
  </ItemGroup>
</Project>
@AArnott
Copy link
Collaborator

AArnott commented Apr 6, 2024

Code inspection suggests that the fix is in fact present in 3.6.133. I'm going to need more information for this to be actionable.
Where are you seeing the warning? What version of the software are you on? Can you share a minimal repro?

@thomas-ravkilde
Copy link
Author

Where are you seeing the warning?

I'm seeing the warning in the Error List on build in Visual Studio Community 2022 (64-but), v17.9.2.

image

What version of the software are you on?

Here are the full installation specs:

Microsoft Visual Studio Community 2022
Version 17.9.2
VisualStudio.17.Release/17.9.2+34622.214
Microsoft .NET Framework
Version 4.8.03761

Installed Version: Community

ASP.NET and Web Tools   17.9.197.37128
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.9.197.37128
Azure App Service Tools v3.0.0

C# Tools   4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

NuGet Package Manager   6.9.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

TypeScript Tools   17.0.30103.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.9.0-3.24121.1+a98c90d56455379836dd5c845b35fa932b00cfa3
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools   17.9.0-beta.23614.3+a521e1cd420beb56c15faf6836184fadd2b7937a
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

Can you share a minimal repro?

Hopefully this can help: src.zip

@thomas-ravkilde
Copy link
Author

Note that the warnings show up for .NET Framework 4.8 projects but not .NET 8.0 projects. I think, I forgot to mention that.

@AArnott
Copy link
Collaborator

AArnott commented Apr 8, 2024

Great. That last clue is perhaps the most important. I'll give a repro a try. My original fix should have been plenty adequate, but I have a guess as to why it didn't work for non-SDK style projects in VS and an idea of how to fix it.

@thomas-ravkilde
Copy link
Author

Sound great. Let me know if you need me to test anything.

AArnott added a commit that referenced this issue Apr 9, 2024
This makes the `ProjectReference` item itself completely undiscoverable for project systems that enumerate references using the MSBuild API that gets items regardless of condition, which appears to be how the legacy project system (csproj.dll) does it at least sometimes.

Fixes #1040
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants