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

ResolveNuGetPackageAssets will throw NullReferenceException when PackageVersion is not set #171

Open
donnie-msft opened this issue Oct 12, 2023 · 0 comments

Comments

@donnie-msft
Copy link

Moved from https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1896623

I have a legacy .csproj solution that uses Central Package Management. If I add a to a project and exclude the Version property (as expected for CPM) but forget to define the Version in Directory.Packages.props for that package ID, I get a null reference exception:

20>C:\Program Files\Microsoft Visual Studio\2022\IntPreview\MSBuild\Microsoft\NuGet\17.0\Microsoft.NuGet.targets(198,5): error : Object reference not set to an instance of an object.

NU1010: The PackageReference items RuntimeContracts do not have corresponding PackageVersion.

Related: #77

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

No branches or pull requests

1 participant