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

The "GetNearestTargetFramework" task was not given a value for the required parameter "ReferringTargetFramework". #416

Closed
weidazhao opened this issue Nov 21, 2016 · 5 comments
Assignees
Labels
Milestone

Comments

@weidazhao
Copy link

weidazhao commented Nov 21, 2016

This is a scenario of Service Fabric application with an ASP.NET Core web service targeting .NET Framework.

In Visual Studio, Service Fabric Application project (similar to a Deployment project) adds project references to the service projects. With #363, the SDK will check if referencing project and referenced project are compatible in terms of the target frameworks. However, Service Fabric Application project is not a managed code project, so it doesn't have any target framework moniker. In this case, the SDK reports an error on the referenced service project (ASP.NET Core on .NET FX)because of ReferringTargetFramework being empty.

As a tactical fix for RC.2, I suggest this: If ReferringTargetFramework is empty, GetNearestTargetFramework returns the only TFM if the project only has one. Otherwise, it throws error. In this case, the semantic of ReferringTargetFramework being empty is that the referencing project can accept any TFM.

@dsplaisted dsplaisted added this to the 1.0 RC2 milestone Nov 22, 2016
@dsplaisted dsplaisted self-assigned this Nov 22, 2016
@srivatsn srivatsn added the Bug label Nov 22, 2016
dsplaisted added a commit to dsplaisted/sdk that referenced this issue Nov 22, 2016
dsplaisted added a commit to dsplaisted/sdk that referenced this issue Nov 22, 2016
dsplaisted added a commit to dsplaisted/sdk that referenced this issue Nov 22, 2016
@mgwalm
Copy link

mgwalm commented Feb 26, 2017

I have the latest version of VS2017 - Version 15.0.26206.0 D15REL.

I'm still getting this error as of today feb 27.

@dsplaisted
Copy link
Member

@mgwalm Could you open a new issue with repro steps and a description of what you're seeing?

@pksorensen
Copy link

I also just saw the error, trying to figure out why. could possible be that the service project targets both netcoreapp1.1 and net462.

@fleed
Copy link

fleed commented Jun 27, 2017

I'm getting the same error when targeting both netcoreapp1.1 and net461. Is there a way to for ServiceFabric to get the net461 version?

@mani0070
Copy link

mani0070 commented Jul 6, 2017

im getting same error

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.Common.targets(73, 5): error MSB4044: The "GetNearestTargetFramework" task was not given a value for the required parameter "ReferringTargetFramework".

mmitche pushed a commit to mmitche/sdk that referenced this issue Jun 5, 2020
…reation

Fixing the Web Deploy package generation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants