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

VS 2017 (15.3) doesn't restore nuget packages in netstandard1.4 projects because it seems to ignore projects.json-frameworks-netstandard1.4-imports #5806

Closed
tuath opened this Issue Aug 25, 2017 · 6 comments

Comments

Projects
None yet
5 participants
@tuath

tuath commented Aug 25, 2017

Restore fails in build:
NU1202: Package Microsoft.Azure.Mobile 0.14.0 is not compatible with netstandard1.4 (.NETStandard,Version=v1.4). Package Microsoft.Azure.Mobile 0.14.0 supports:

  • monoandroid403 (MonoAndroid,Version=v4.0.3)
  • portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
  • uap10.0 (UAP,Version=v10.0)
  • xamarinios10 (Xamarin.iOS,Version=v1.0)

Project.json holds this
"frameworks": {
"netstandard1.4": {
"imports": [ "portable-net45+win8+wp8+wpa81" ]
}
}

it worked perfectly with 15.2

Others seem to have the bug also
https://developercommunity.visualstudio.com/content/problem/98947/visual-studio-2017-v153-can-not-build-the-solution.html

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Aug 25, 2017

Contributor

Yes, we have a fix underway. Considering releasing in a 15.3.x servicing release.
Covered by internal bug: 482586

Workaround until we fix for real:
a) move from Project.json to PackageReference and represent your imports via the PackageTargetFallback property in the csproj.
Update: removed the first version of the workaround...which was mistaken.

Cause: We now support UAP10.0.xxxxx TFMs, instead of the earlier supported UAP10.0.
This problem is caused by code that is trying to help project.json users by replacing their framework with the more precise TFM version. However, we neglected to preserve the imports setting.

Contributor

rrelyea commented Aug 25, 2017

Yes, we have a fix underway. Considering releasing in a 15.3.x servicing release.
Covered by internal bug: 482586

Workaround until we fix for real:
a) move from Project.json to PackageReference and represent your imports via the PackageTargetFallback property in the csproj.
Update: removed the first version of the workaround...which was mistaken.

Cause: We now support UAP10.0.xxxxx TFMs, instead of the earlier supported UAP10.0.
This problem is caused by code that is trying to help project.json users by replacing their framework with the more precise TFM version. However, we neglected to preserve the imports setting.

@onovotny

This comment has been minimized.

Show comment
Hide comment
@onovotny

onovotny Aug 25, 2017

@rrelyea can you please point me to the PR that has the fix? I just did a bit of work around this area for my extras (onovotny/MSBuildSdkExtras@2bfa253), and I want to track the fix.

BTW, as is, using uap10.0 with a TPMV of 10.0.10240.0 fails to restore since the TFM is UAP,Version=v10.0.10240. The code works fine if it's uap10.0.10240, so in my case, I special-cased uap10.0. Not sure if you saw anything around that.

onovotny commented Aug 25, 2017

@rrelyea can you please point me to the PR that has the fix? I just did a bit of work around this area for my extras (onovotny/MSBuildSdkExtras@2bfa253), and I want to track the fix.

BTW, as is, using uap10.0 with a TPMV of 10.0.10240.0 fails to restore since the TFM is UAP,Version=v10.0.10240. The code works fine if it's uap10.0.10240, so in my case, I special-cased uap10.0. Not sure if you saw anything around that.

@emgarten

This comment has been minimized.

Show comment
Hide comment
@emgarten
Collaborator

emgarten commented Aug 26, 2017

@rrelyea rrelyea added this to the 4.3 milestone Aug 28, 2017

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Aug 28, 2017

Contributor

We are shooting to fix this in 15.3.3 (which is undergoing testing)

Contributor

rrelyea commented Aug 28, 2017

We are shooting to fix this in 15.3.3 (which is undergoing testing)

@tuath

This comment has been minimized.

Show comment
Hide comment
@tuath

tuath Aug 29, 2017

tuath commented Aug 29, 2017

@rrelyea rrelyea added the Type:Bug label Aug 30, 2017

@rrelyea

This comment has been minimized.

Show comment
Hide comment
@rrelyea

rrelyea Aug 30, 2017

Contributor

Fixed in VS 2017 version 15.3.3 (released yesterday).

Contributor

rrelyea commented Aug 30, 2017

Fixed in VS 2017 version 15.3.3 (released yesterday).

@rrelyea rrelyea closed this Aug 30, 2017

mrward added a commit to mono/monodevelop that referenced this issue Sep 13, 2017

[NuGet] Update to NuGet 4.3.1.4445
Fixed bug #59447 - Package is not compatible error for project.json
with imports
https://bugzilla.xamarin.com/show_bug.cgi?id=59447

Imports in a project.json file are ignored with older NuGet 4.3
versions. Updating to NuGet 4.3.1 fixes this. NuGet bug:

NuGet/Home#5806

mrward added a commit to mono/monodevelop that referenced this issue Sep 14, 2017

[NuGet] Update to NuGet 4.3.1.4445
Fixed bug #59447 - Package is not compatible error for project.json
with imports
https://bugzilla.xamarin.com/show_bug.cgi?id=59447

Imports in a project.json file are ignored with older NuGet 4.3
versions. Updating to NuGet 4.3.1 fixes this. NuGet bug:

NuGet/Home#5806

mrward added a commit to mono/monodevelop that referenced this issue Sep 14, 2017

[NuGet] Update to NuGet 4.3.1.4445
Fixed bug #59447 - Package is not compatible error for project.json
with imports
https://bugzilla.xamarin.com/show_bug.cgi?id=59447

Imports in a project.json file are ignored with older NuGet 4.3
versions. Updating to NuGet 4.3.1 fixes this. NuGet bug:

NuGet/Home#5806
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment