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

Fix invalid target framework error for Solution restore #6091

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

martinrrm
Copy link
Contributor

Bug

Fixes:

Description

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@martinrrm martinrrm changed the title add check in nuget.targets Fix invalid target framework error for Solution restore Oct 9, 2024
@@ -454,6 +454,12 @@ private static IEnumerable<TargetFrameworkInformation> GetTargetFrameworkInforma
foreach (var item in GetItemByType(items, "TargetFrameworkInformation"))
{
var frameworkString = item.GetProperty("TargetFramework");
if (frameworkString.Contains(';'))
{
var error = RestoreLogMessage.CreateError(NuGetLogCode.NU1001, string.Format(CultureInfo.CurrentCulture, Strings.Error_InvalidTargetFramework, frameworkString));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is in draft, and we had chatted about validating the different scenarios.
If we're going to add something like this, I think static graph might need some changes too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for letting me know, I'll make sure I update static graph too

@microsoft-github-policy-service microsoft-github-policy-service bot added Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed labels Oct 21, 2024

This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch.

1 similar comment

This PR has been automatically marked as stale because it has no activity for 7 days. It will be closed if no further activity occurs within another 7 days of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch.

@dotnet-policy-service dotnet-policy-service bot removed the Status:No recent activity PRs that have not had any recent activity and will be closed if the label is not removed label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants