-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Determinism end-user experience is poor #26231
Comments
This is a great report covering the complete user experience. Thanks for taking the time to report the details of the various pain points you hit!
My biggest initial concern is the documentation led someone to this conclusion. |
@sharwell from the linked SO answer:
which is exactly my scenario. I would very much like to enable determinism, but right now it's not an option. Regarding documentation, @jaredpar's blog post is pretty complete, but obviously in no way official. |
@IanKemp I believe you misread the SO answer. When you pass those two properties to the build, it will generate an assembly info file containing the values from it. Here is an example of the properties specified in a manually-incremented file ( When using these properties, you do not want wildcard versioning, which means determinism can be enabled. |
@sharwell Thank you - this is what happens when I am sick... and when there isn't appropriate documentation. (Insert sound of dead horse beating.) So then I guess the only remaining question is: why would you ever want to use * in the |
Aside from backwards compatibility (avoiding breaking projects that used it in the past), I am not aware of any reason. |
it has to be in the project properties UI.. whatever reason for using it or not using it.. |
Two thumbs up for adding a determinism checkbox to the project properties. Having to add a tags to the project file to enable auto-versioning is just not right. At the least: how about adding a comment in the Assembly.cs templates that tells you what to do if you want to enable auto-versioning. Simple fix, no code change, less confusion. |
Some doc improvements: dotnet/dotnet-api-docs#9892 |
I created a new .NET Standard 2.0 class library in Visual Studio 2017 (15.6.6) this morning and set the Assembly Version to 1.0.*. Upon build, I was confronted with the error message:
Cue research into what the heck determinism means in the context of C# compilation, leading me to know that I do, in fact, want it disabled for my use case. Cue more research into how to disable it, which finally lead me to this answer on Stack Overflow. Not very discoverable!
I see that #22660 and #22973 somewhat addressed this issue by making the error more explicit, but in my opinion it's still not useful or helpful enough:
This is compounded by the fact that there doesn't seem to be a Microsoft documentation page explaining how to control determinism from the command-line or in a .csproj. The closest I have found is this.
tl;dr this is all a bit of a mess and it's definitely not a great experience for someone who is dipping their toe in .NET Standard. Suggestions to make things better:
The text was updated successfully, but these errors were encountered: