Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
nuget.exe restore doesn't produce .props and .targets files for .nuproj projects (regression in v18.104.22.1685) #2711
Expected (NuGet 3.3 behavior)
NuGet restore places adds a src\PCLCrypto.NuGet\PCLCrypto.NuGet.nuget.props and .targets file in my source tree.
Actual (NuGet 3.4.3 behavior)
No .props and .targets files are added to the src\PCLCrypto.NuGet directory.
Thanks, I was able to repro this. Nuproj isn't a known extension type in NuGet right now so it gets skipped. This was added in 3.4.0 along with support for restoring .Xproj which does not support msbuild targets.
I think the fix here is to generate targets for all project types except xproj, instead of only generating targets for known msbuild types. And nuproj should be added to that list as well.
changed the title from
nuget.exe restore doesn't produce .props and .targets files (regression in v22.214.171.1245)
nuget.exe restore doesn't produce .props and .targets files for .nuproj projects (regression in v126.96.36.1995)
May 4, 2016
@AArnott and I both tried this offline and we're seeing a different error now:
MSBuild auto-detection: using msbuild version '15.0' from 'C:\Program Files (x86)\MSBuild\15.0\bin'. Restoring packages for D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto.Tests.Desktop\project.json... Restoring packages for D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto.WindowsPhone\project.json... Restoring packages for D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto.iOS\project.json... Restoring packages for D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto\project.json... - truncated - Committing restore... Generating MSBuild file PCLCrypto.Desktop.nuget.targets. D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto.Desktop\PCLCrypto.Desktop.csproj Restore completed in 458ms. Restoring packages for D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto.Tests.UWP\project.json... Committing restore... Committing restore... Generating MSBuild file PCLCrypto.Tests.Desktop.nuget.targets. Generating MSBuild file PCLCrypto.Tests.WinRT.nuget.targets. Committing restore... Generating MSBuild file PCLCrypto.Tests.Desktop.nuget.props. Generating MSBuild file PCLCrypto.Tests.WinRT.nuget.props. Generating MSBuild file PCLCrypto.iOS-Unified.nuget.targets. D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto.Tests.Desktop\PCLCrypto.Tests.Desktop.csproj Restore completed in 594ms. D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto.Tests.WinRT\PCLCrypto.Tests.WinRT.csproj Restore completed in 595ms. Restoring packages for D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto.Tests.WinRT.Phone\project.json... Restoring packages for D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto.NuGet\project.json... D:\trash\2016-05-05\PCLCrypto\src\PCLCrypto.iOS-Unified\PCLCrypto.iOS-Unified.csproj Restore completed in 173ms. Invalid portable frameworks.
The following files are generated during this process:
Looks like your PCLCrypto.NuGet project.json is depending on ReadOnlySourceTree 0.1.24-beta instead of 0.1.36-beta (which seems to have been fixed to remove that invalid TFM).
Does bumping that dependency version (along with using the latest nuget.exe) unblock you?
To clarify, I am talking about this line:
Yes, fixing that allowed use of 3.4.4, which does generate the .props and .targets files.
Thanks for your help.
3.4.3 had the same framework validations that 3.4.4 has. 3.4.3 did not get to the point that 3.4.4 did because it does not recognized the
referenced this issue
May 6, 2016
Get Outlook for Androidhttps://aka.ms/ghei36
Is there a workaround for not discovering .nuproj if I'm stuck on 3.4.3?
Or will 3.4.4 be released soon enough?
You are receiving this because you commented.