Closed Matheos96 closed 3 months ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
@Matheos96,
Thanks for filing this! I actually caught an almost identical bug a while ago. Can you clarify what version of the SDK/MSBuild you're using? I believe this should be 90% better after https://github.com/dotnet/msbuild/pull/9570, and for the remaining 10%, it's essentially the same as https://github.com/dotnet/sdk/issues/37230.
Closing in favor of #37230, but I'll make that one a little more broad. And if you're seeing this with a recent version of MSBuild, it might be good to let the MSBuild team know 🙂
Can you clarify what version of the SDK/MSBuild you're using?
@Forgind Ok, great! As you can see from the screenshots, I used .NET 8.0.101 SDK.
I can't see from the PR, maybe just missing it, but what SDK version will include https://github.com/dotnet/msbuild/pull/9570?
Can you clarify what version of the SDK/MSBuild you're using?
@Forgind Ok, great! As you can see from the screenshots, I used .NET 8.0.101 SDK.
🤦 I can be blind sometimes; you're totally right
I can't see from the PR, maybe just missing it, but what SDK version will include dotnet/msbuild#9570?
That looks like it was merged in January, so it most likely ended up in 17.10 MSBuild, which went into the 8.0.3xx SDK.
Is your feature request related to a problem? Please describe.
This had me baffled for a while. Basically I was trying to package a nuget package using
dotnet pack
by replicating what we do in our CI/CD pipeline. I did not copy the commands correctly, so when running thedotnet pack
command I had a small syntactical error in providing the MsBuildPackageVersion
property... See it?I did not see anything wrong with this for quite some time. Obviously it should be
-p:PackageVersion=8.0.0.0
with an equals sign, not a semi-colon. I noticed it when I actually copied the command straight off but I had the faulty one in my CLI history and could not figure out why it would be there if not working...The dotnet pack output tells me close to nothing. I even tried running it with
-v diag
verbosity to see EVERYTHING but that still did not indicate anything what could have gone wrong...Describe the solution you'd like
Please consider adopting some syntactical checking for these
-p:PropertyName=Value
flags. At the very least tell me that something went wrong, even if I would not know what. There is no error, no red text, nothing. Only through experience I knew I expected more of an output (and of course the .nupkg itself). The console output in no way indicates an error has occurred.Additional context
I realise it may be a challenge to get a very friendly syntax related error message done, probably due to how the command is parsed? I would like to see something though, even just red text saying it failed. Imagine this being in a pipeline and you quickly go through everything trying to figure out why your package has not been published. There is no blatant error anywhere