The FileVersionInfo
class has an IsPreRelease
property.
Is there any way through AssemblyInfo or something else in my .NET assembly project to get that property to return true in the resulting .dll file?
Pre-release versions are then denoted by appending a hyphen and a string after the patch number. Technically speaking, you can use any string after the hyphen and NuGet will treat the package as pre-release.
Run the pack command Select Build > Configuration Manager, and then set the Active solution configuration to Release. Select the AppLogger project in Solution Explorer, and then select Build > Pack. Visual Studio builds the project and creates the . nupkg file.
NuGet 4.3. 0+ supports SemVer 2.0. 0, which supports pre-release numbers with dot notation, as in 1.0.
If you specifically need it in your project/solution, then the classic path is to create a Resource Script (.rc) file. This is a homely, grungy format, but doable. The downside is that you need to get all the correct settings to start with, then maintain them manually thereafter.
The easiest path, if you're okay with manual clicking after the build, is using ResEdit (or equivalent), and adding VS_FF_PRERELEASE into the FileFlags field.
Note, the FileFlagsMask field should already have the prerelease flag or'ed together with a batch of others--that's necessary, but not sufficient.
Also, you can use resedit to generate a starter .rc file pretty simply:
resedit -convert my.dll my.rc
If you need an auto-with-build process, then there may well be a utility out there that can make that targeted modification on the command line, and then you could add that as a post-build step on the project that builds the .dll in question.
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With