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

The dll's in the release 4.1 has version 4.0.1 #4705

Closed
OsirisTerje opened this issue May 7, 2024 · 0 comments · Fixed by #4706
Closed

The dll's in the release 4.1 has version 4.0.1 #4705

OsirisTerje opened this issue May 7, 2024 · 0 comments · Fixed by #4706
Labels
Milestone

Comments

@OsirisTerje
Copy link
Member

OsirisTerje commented May 7, 2024

This is caused by the hardcoding of the version numbers in the CommonAssemblyInfo.cs file.
We're now using Cake.MinVer to generate the correct versionnumber, and sending that through MSBuild.
This doesn't work for the assemblies (, but it works for the package), since we don't generate the assembly info (GenerateAssebmlyInfo=false). If we set this to true, MSBuild can't override them. We can't set it all from Cake since some information there is target framework dependent. We can't roll that out by compiling for each frameworks, because our projects have different target frameworks.

So the resolution is to generate an AssemblyInfo.g.cs file in the build.cake script, and run that before the build starts. This file is then added to the framework, framework.legacy and the nunitlite projects. The others don't need any version.

Thanks to @CharliePoole for finding this!

@OsirisTerje OsirisTerje added this to the 4.2 milestone May 7, 2024
OsirisTerje added a commit that referenced this issue May 7, 2024
OsirisTerje added a commit that referenced this issue May 26, 2024
* Fixes Issue #4705

* Delete src/src.sln

* Changed to using conditionals in the directory.build.props and adjusted csprojs and assemblyinfo.cs files accordingly.

* Adding caketest

* Update src/NUnitFramework/framework/nunit.framework.csproj

Co-authored-by: Manfred Brands <manfred-brands@users.noreply.github.com>

* Update src/NUnitFramework/nunit.framework.legacy/nunit.framework.legacy.csproj

Co-authored-by: Manfred Brands <manfred-brands@users.noreply.github.com>

* Update src/NUnitFramework/nunitlite/nunitlite.csproj

Co-authored-by: Manfred Brands <manfred-brands@users.noreply.github.com>

* updated files and directory.build.props

* commented out Choose, didnt work, in directory.build.props

* Updated some tests, fixing nullrefs

* reverted formatting

* fix compiler warnings/errors

* updated cake

* Raise Error when compiling for a TargetFramework with no AssemblyConfiguration

.NET 7.0 is out of support as of May 14th 2024.

* Fixed null suppressions

* Moved cake scripts to its own project and loaded the code into the build.cake

* Fix null

* Fix more minor stuff

* Fix SA warnings

* Using same file and assembly version numbers, same as we have done earlier

* Final review changes

* Fetch tags in CI

* Updated to cake 4. Get a warnign about other cake tools like minver, raised a PR there too, but the warning can be safely ignored for now

* Now we can use AsSpan in CakeScript

---------

Co-authored-by: Manfred Brands <manfred-brands@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant