mhutch / MonoDevelop.MSBuildEditor

Improved MSBuild editing support
Other
211 stars 24 forks source link

Fix #233 #234

Open HakamFostok opened 2 months ago

HakamFostok commented 2 months ago

Fix #233

mhutch commented 2 months ago

GlobalPackageReference and PackageVersion are already defined in NuGet.buildschema.json - I'd rather not have duplicate definitions. It's ok to apply metadata to items that aren't defined in the same schema file. Could also consider moving *Assets metadata to NuGet.buildschema.json as they may make more sense there. I think they were added to CommonTargets.buildschema.json before NuGet.buildschema.json was created.

Are you certain that the *Assets metadata is valid on PackageVersion items? From a quick scan of the NuGet targets/tasks that didn't seem to me to be the case, but I may have missed something.

nkolev92 commented 2 months ago

GlobalPackageReference does not really support Include/Exclude/PrivateAssets.

It's syntactic sugar, and it automatically sets that to that PackageReference it creates: https://github.com/NuGet/NuGet.Client/blob/c57a95605a71ff65853a05dd536d19efbed36926/src/NuGet.Core/NuGet.Build.Tasks/NuGet.targets#L120-L129.

So only version should apply there.

PackageVersion supports Version only.