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

ProjectReference causing PM UI to error with "Value cannot be null. Parameter name: frameworkIdentifier" #13737

Closed
donnie-msft opened this issue Aug 27, 2024 · 1 comment · Fixed by NuGet/NuGet.Client#6030
Assignees
Labels
Functionality:VisualStudioUI Package Manager UI et al Priority:1 High priority issues that must be resolved in the current sprint. Product:VS.Client Type:Bug
Milestone

Comments

@donnie-msft
Copy link
Contributor

donnie-msft commented Aug 27, 2024

Framework is null on projectReference resulting in ArgumentNullException: "Value cannot be null. Parameter name: frameworkIdentifier"

Reproes only on the Installed Tab (Browse tab works) on a ConsoleApp which has a ProjectReference to a ClassLibrary in the same solution.

Fixed by deleting bin/obj folders.

image

ConsoleApp2.csproj snippet:

 <ItemGroup>
    <PackageReference Include="Microsoft.Office.Interop.Excel">
      <Version>15.0.4795.1001</Version>
    </PackageReference>
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\ClassLibrary3\ClassLibrary3.csproj">
      <Project>{63D2D8D1-16B3-4D98-9421-259E1B7A4301}</Project>
      <Name>ClassLibrary3</Name>
    </ProjectReference>
  </ItemGroup>

image

NuGet.Frameworks.NuGetFramework.NuGetFramework(frameworkIdentifier = null, frameworkVersion = {System.Version}, profile = "", platform = "", platformVersion = {System.Version}) Line 59
at C:\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\NuGetFramework.cs(59)
NuGet.Frameworks.NuGetFramework.NuGetFramework(frameworkIdentifier = null, frameworkVersion = {System.Version}, platform = "", platformVersion = {System.Version}) Line 53
at C:\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\NuGetFramework.cs(53)
NuGet.Frameworks.NuGetFramework.NuGetFramework(framework = null, version = {System.Version}) Line 35
at C:\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\NuGetFramework.cs(35)
NuGet.Frameworks.NuGetFramework.NuGetFramework(framework = null) Line 30
at C:\NuGet.Client\src\NuGet.Core\NuGet.Frameworks\NuGetFramework.cs(30)
NuGet.PackageManagement.VisualStudio.PackageReferenceProject<System.Collections.Generic.Dictionary<string, NuGet.PackageManagement.VisualStudio.Utility.ProjectInstalledPackage>, System.Collections.Generic.KeyValuePair<string, NuGet.PackageManagement.VisualStudio.Utility.ProjectInstalledPackage>>.GetInstalledAndTransitivePackagesAsync(includeTransitivePackages = true, includeTransitiveOrigins = true, token = IsCancellationRequested = false) Line 229
at C:\NuGet.Client\src\NuGet.Clients\NuGet.PackageManagement.VisualStudio\Projects\PackageReferenceProject.cs(229)
[Async Call Stack]
[Async] NuGet.PackageManagement.VisualStudio.PackageReferenceProject<System.Collections.Generic.Dictionary<string, NuGet.PackageManagement.VisualStudio.Utility.ProjectInstalledPackage>, System.Collections.Generic.KeyValuePair<string, NuGet.PackageManagement.VisualStudio.Utility.ProjectInstalledPackage>>.GetInstalledAndTransitivePackagesAsync(includeTransitiveOrigins = true, token = IsCancellationRequested = false) Line 120
at C:\NuGet.Client\src\NuGet.Clients\NuGet.PackageManagement.VisualStudio\Projects\PackageReferenceProject.cs(120)
[External Code]
[Async] NuGet.PackageManagement.VisualStudio.NuGetProjectManagerService.GetInstalledAndTransitivePackagesAsync(projectIds = {string[1]}, includeTransitiveOrigins = true, cancellationToken = IsCancellationRequested = false) Line 190
at C:\NuGet.Client\src\NuGet.Clients\NuGet.PackageManagement.VisualStudio\Services\NuGetProjectManagerService.cs(190)
[External Code]
[Async] NuGet.PackageManagement.VisualStudio.IProjectContextInfoExtensions.GetInstalledAndTransitivePackagesAsync(projectContextInfo = {NuGet.VisualStudio.Internal.Contracts.ProjectContextInfo}, serviceBroker = "Process view", includeTransitiveOrigins = true, cancellationToken = IsCancellationRequested = false) Line 75
at C:\NuGet.Client\src\NuGet.Clients\NuGet.PackageManagement.VisualStudio\Common\IProjectContextInfoExtensions.cs(75)
[External Code]
[Async] NuGet.PackageManagement.VisualStudio.PackageCollection.GetInstalledAndTransitivePackagesAsync(serviceBroker = "Process view", projectContextInfos = {NuGet.VisualStudio.Internal.Contracts.IProjectContextInfo[1]}, includeTransitiveOrigins = true, cancellationToken = IsCancellationRequested = false) Line 74
at C:\NuGet.Client\src\NuGet.Clients\NuGet.PackageManagement.VisualStudio\Common\PackageCollection.cs(74)
[Async] NuGet.PackageManagement.VisualStudio.NuGetPackageSearchService.CreatePackageFeedAsync(projectContextInfos = {NuGet.VisualStudio.Internal.Contracts.IProjectContextInfo[1]}, targetFrameworks = {string[1]}, itemFilter = Installed, isSolution = false, recommendPackages = false, sourceRepositories = Count = 1, cancellationToken = IsCancellationRequested = false) Line 453
at C:\NuGet.Client\src\NuGet.Clients\NuGet.PackageManagement.VisualStudio\Services\NuGetPackageSearchService.cs(453)
[Async] NuGet.PackageManagement.VisualStudio.NuGetPackageSearchService.SearchAsync(projectContextInfos = {NuGet.VisualStudio.Internal.Contracts.IProjectContextInfo[1]}, packageSources = {NuGet.VisualStudio.Internal.Contracts.PackageSourceContextInfo[1]}, targetFrameworks = {string[1]}, searchText = "", searchFilter = {NuGet.Protocol.Core.Types.SearchFilter}, itemFilter = Installed, isSolution = false, useRecommender = false, cancellationToken = IsCancellationRequested = false) Line 267
at C:\NuGet.Client\src\NuGet.Clients\NuGet.PackageManagement.VisualStudio\Services\NuGetPackageSearchService.cs(267)
[External Code]
[Async] NuGet.PackageManagement.UI.PackageItemLoader.SearchAsync(cancellationToken = IsCancellationRequested = false) Line 228
at C:\NuGet.Client\src\NuGet.Clients\NuGet.PackageManagement.UI\PackageItemLoader.cs(228)

@donnie-msft donnie-msft added Product:VS.Client Type:Bug Functionality:VisualStudioUI Package Manager UI et al Triage:Untriaged Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. and removed Triage:Untriaged labels Aug 27, 2024
@NuGet NuGet deleted a comment from mayank785 Aug 27, 2024
@NuGet NuGet deleted a comment Aug 27, 2024
@donnie-msft donnie-msft added Priority:1 High priority issues that must be resolved in the current sprint. and removed Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. labels Sep 9, 2024
@donnie-msft
Copy link
Contributor Author

Triage: assigning based on Martin thinking this is related to his ongoing work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:VisualStudioUI Package Manager UI et al Priority:1 High priority issues that must be resolved in the current sprint. Product:VS.Client Type:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@zivkan @martinrrm @donnie-msft and others