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

nuget.exe restore doesn't produce .props and .targets files for .nuproj projects (regression in v3.4.3.855) #2711

Closed
AArnott opened this Issue May 3, 2016 · 14 comments

Comments

Projects
None yet
7 participants
@AArnott
Contributor

AArnott commented May 3, 2016

Repro steps:

git clone https://github.com/AArnott/PCLCrypto.git
cd PCLCrypto
git checkout invalidPortableFx
nuget restore src

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.

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten May 4, 2016

Contributor

Is restore succeeding for you? I get an error saying Invalid portable frameworks. when restoring the src folder.

Contributor

emgarten commented May 4, 2016

Is restore succeeding for you? I get an error saying Invalid portable frameworks. when restoring the src folder.

@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott

AArnott May 4, 2016

Contributor

Sorry, I left out a step to check out a branch where I've fixed that issue.

Contributor

AArnott commented May 4, 2016

Sorry, I left out a step to check out a branch where I've fixed that issue.

@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott

AArnott May 4, 2016

Contributor

That issue is also new in NuGet 3.4. 3.3 was wiling to tolerate 'net-cf' but with 3.4 I had to fix that. So the update to the repro steps I just made switches to the branch where I've updated my package dependencies to remove the net-cf reference.

Contributor

AArnott commented May 4, 2016

That issue is also new in NuGet 3.4. 3.3 was wiling to tolerate 'net-cf' but with 3.4 I had to fix that. So the update to the repro steps I just made switches to the branch where I've updated my package dependencies to remove the net-cf reference.

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten May 4, 2016

Contributor

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.

Contributor

emgarten commented May 4, 2016

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.

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer May 4, 2016

Or we can add a project capability

yishaigalatzer commented May 4, 2016

Or we can add a project capability

@rrelyea rrelyea added this to the 3.5 RC milestone May 4, 2016

@rrelyea rrelyea added the Type:DCR label May 4, 2016

@rrelyea rrelyea changed the title from nuget.exe restore doesn't produce .props and .targets files (regression in v3.4.3.855) to nuget.exe restore doesn't produce .props and .targets files for .nuproj projects (regression in v3.4.3.855) May 4, 2016

@rrelyea rrelyea modified the milestones: 3.4.4, 3.5 RC May 4, 2016

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten

emgarten May 4, 2016

Contributor
Contributor

emgarten commented May 4, 2016

@emgarten emgarten closed this May 4, 2016

@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott

AArnott May 4, 2016

Contributor

Thank you, @emgarten!

Contributor

AArnott commented May 4, 2016

Thank you, @emgarten!

@joelverhagen

This comment has been minimized.

Show comment
Hide comment
@joelverhagen

joelverhagen May 5, 2016

Member

@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:

Removing src/PCLCrypto.Android/PCLCrypto.Android.nuget.targets
Removing src/PCLCrypto.Android/project.lock.json
Removing src/PCLCrypto.Desktop/PCLCrypto.Desktop.nuget.targets
Removing src/PCLCrypto.Desktop/project.lock.json
Removing src/PCLCrypto.Tests.Desktop/PCLCrypto.Tests.Desktop.nuget.props
Removing src/PCLCrypto.Tests.Desktop/PCLCrypto.Tests.Desktop.nuget.targets
Removing src/PCLCrypto.Tests.Desktop/project.lock.json
Removing src/PCLCrypto.Tests.WinRT/PCLCrypto.Tests.WinRT.nuget.props
Removing src/PCLCrypto.Tests.WinRT/PCLCrypto.Tests.WinRT.nuget.targets
Removing src/PCLCrypto.Tests.WinRT/project.lock.json
Removing src/PCLCrypto.WinRT/PCLCrypto.WinRT.nuget.targets
Removing src/PCLCrypto.WinRT/project.lock.json
Removing src/PCLCrypto.WindowsPhone/PCLCrypto.WindowsPhone.nuget.targets
Removing src/PCLCrypto.WindowsPhone/project.lock.json
Removing src/PCLCrypto.iOS-Unified/PCLCrypto.iOS-Unified.nuget.targets
Removing src/PCLCrypto.iOS-Unified/project.lock.json
Removing src/PCLCrypto.iOS/PCLCrypto.iOS.nuget.targets
Removing src/PCLCrypto.iOS/project.lock.json
Removing src/PCLCrypto/PCLCrypto.nuget.targets
Removing src/PCLCrypto/project.lock.json
Member

joelverhagen commented May 5, 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:

Removing src/PCLCrypto.Android/PCLCrypto.Android.nuget.targets
Removing src/PCLCrypto.Android/project.lock.json
Removing src/PCLCrypto.Desktop/PCLCrypto.Desktop.nuget.targets
Removing src/PCLCrypto.Desktop/project.lock.json
Removing src/PCLCrypto.Tests.Desktop/PCLCrypto.Tests.Desktop.nuget.props
Removing src/PCLCrypto.Tests.Desktop/PCLCrypto.Tests.Desktop.nuget.targets
Removing src/PCLCrypto.Tests.Desktop/project.lock.json
Removing src/PCLCrypto.Tests.WinRT/PCLCrypto.Tests.WinRT.nuget.props
Removing src/PCLCrypto.Tests.WinRT/PCLCrypto.Tests.WinRT.nuget.targets
Removing src/PCLCrypto.Tests.WinRT/project.lock.json
Removing src/PCLCrypto.WinRT/PCLCrypto.WinRT.nuget.targets
Removing src/PCLCrypto.WinRT/project.lock.json
Removing src/PCLCrypto.WindowsPhone/PCLCrypto.WindowsPhone.nuget.targets
Removing src/PCLCrypto.WindowsPhone/project.lock.json
Removing src/PCLCrypto.iOS-Unified/PCLCrypto.iOS-Unified.nuget.targets
Removing src/PCLCrypto.iOS-Unified/project.lock.json
Removing src/PCLCrypto.iOS/PCLCrypto.iOS.nuget.targets
Removing src/PCLCrypto.iOS/project.lock.json
Removing src/PCLCrypto/PCLCrypto.nuget.targets
Removing src/PCLCrypto/project.lock.json

@joelverhagen joelverhagen reopened this May 5, 2016

@rrelyea rrelyea assigned joelverhagen and unassigned emgarten May 5, 2016

@joelverhagen

This comment has been minimized.

Show comment
Hide comment
@joelverhagen

joelverhagen May 5, 2016

Member

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?

Member

joelverhagen commented May 5, 2016

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?

@joelverhagen

This comment has been minimized.

Show comment
Hide comment
@AArnott

This comment has been minimized.

Show comment
Hide comment
@AArnott

AArnott May 6, 2016

Contributor

Yes, fixing that allowed use of 3.4.4, which does generate the .props and .targets files.
It's curious that 3.4.4 stumbled on the invalid portable frameworks error when 3.4.3 didn't though. Should I open another issue to improve the error message to specify where it found an invalid framework to make it quicker to find what packages need to be updated? Who else is hitting this besides me?

Thanks for your help.

Contributor

AArnott commented May 6, 2016

Yes, fixing that allowed use of 3.4.4, which does generate the .props and .targets files.
It's curious that 3.4.4 stumbled on the invalid portable frameworks error when 3.4.3 didn't though. Should I open another issue to improve the error message to specify where it found an invalid framework to make it quicker to find what packages need to be updated? Who else is hitting this besides me?

Thanks for your help.

@AArnott AArnott closed this May 6, 2016

@joelverhagen

This comment has been minimized.

Show comment
Hide comment
@joelverhagen

joelverhagen May 6, 2016

Member

It's curious that 3.4.4 stumbled on the invalid portable frameworks error when 3.4.3 didn't though.

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 .nuproj project type.

Member

joelverhagen commented May 6, 2016

It's curious that 3.4.4 stumbled on the invalid portable frameworks error when 3.4.3 didn't though.

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 .nuproj project type.

@KirillOsenkov

This comment has been minimized.

Show comment
Hide comment
@KirillOsenkov

KirillOsenkov May 21, 2016

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?

KirillOsenkov commented May 21, 2016

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?

@yishaigalatzer

This comment has been minimized.

Show comment
Hide comment
@yishaigalatzer

yishaigalatzer May 21, 2016

Very soon

Get Outlook for Androidhttps://aka.ms/ghei36

On Fri, May 20, 2016 at 11:09 PM -0700, "Kirill Osenkov" <notifications@github.commailto:notifications@github.com> wrote:

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.
Reply to this email directly or view it on GitHubhttps://github.com/NuGet/Home/issues/2711#issuecomment-220761147

yishaigalatzer commented May 21, 2016

Very soon

Get Outlook for Androidhttps://aka.ms/ghei36

On Fri, May 20, 2016 at 11:09 PM -0700, "Kirill Osenkov" <notifications@github.commailto:notifications@github.com> wrote:

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.
Reply to this email directly or view it on GitHubhttps://github.com/NuGet/Home/issues/2711#issuecomment-220761147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment