-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ReferenceCopyLocalPaths no longer content NuGetSourceType metadata #3662
Comments
SDK style projects use different code to resolve NuGet references, and I don't think we intend to guarantee that all the metadata is the same. While everything in the build process is essentially public, the reason we have that metadata is for the MSBuild / .NET build logic, not explicitly for custom build logic. If you're not familiar with it, I recommend using binary logs and MSBuild structured log viewer: http://msbuildlog.com/ That will let you easily see item metadata, task inputs and outputs, etc., without having to use a custom target to dump the information or trying to parse through gigantic text log files. |
@dsplaisted thanks for your reply.
The build process I was talking about is actually in <ItemGroup Condition="'$(IncludePackageReferencesInVSIXContainer)'=='true'">
<_ReferenceCopyLocalPathsFromNuGet Include="@(ReferenceCopyLocalPaths)" Condition=" '%(ReferenceCopyLocalPaths.NuGetSourceType)' == 'Package' " />
</ItemGroup> Therefore, I need this metadata since I want package assemblies to be included in the vsix archive.
Thanks for the tip. In this case I just found more practical (across many runs) to print that through a target. |
Any update please ? |
I also ran into this issue. @dsplaisted, I understand the viewpoint that
Is this something that the .NET SDK would consider preserving for back-compatibility with the VS SDK? Or should this issue be routed to the VS SDK team instead to change their targets? |
I would try to get it fixed in the VS SDK. We are trying to reduce the amount of duplicate metadata we have, see here: #3850 |
…120.1 (dotnet#3662) - Microsoft.NET.Sdk.Web - 5.0.100-alpha.1.19570.1
Is there any update on this issue? I'm still seeing it from my SDK-style project with the latest VSSDK. |
The VSSDK BuildTools team is investigating updates to the logic which handles local reference items introduced via PackageReference |
From @joeltankam on Friday, September 20, 2019 2:22:39 PM
Steps to reproduce
I encounter some missing metadata to
ReferenceCopyLocalPaths
item since migrating toMicrosoft.NET.Sdk
format in project files.Lets consider the following project file :
I use the following code to print metadata from
ReferenceCopyLocalPaths
items :Expected behavior
When using old project files format, I had the following metadata :
Actual behavior
Now I get the following :
The difference being the absence of :
However, I need the
NuGetSourceType
metadata in my build process.Is there please any reason why this this metadata disappeared ? Is there a way to set it back ?
I currently use this custom target to set back
NuGetSourceType
:Environment data
msbuild /version
output: 15.9.21.664.NET Core SDK version : 2.2.108
Visual Studio : Professional 2017, v 15.9.16
Copied from original issue: dotnet/msbuild#4754
The text was updated successfully, but these errors were encountered: