AssemblyInfo.fs
Hello
I'm creating a nuget package from an F# library and included an AssemblyInfo.fs so that I might patch the version so that the package version is set accordingly, but assembly info patching only seems to work with .cs files
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 23 May, 2014 03:33 PM
Could you please drop me an example of AssemblyInfo.fs?
- Feodor
2 Posted by Jon on 23 May, 2014 03:47 PM
See attached
Support Staff 3 Posted by Feodor Fitsner on 23 May, 2014 04:38 PM
Thanks!
Support Staff 4 Posted by Feodor Fitsner on 23 May, 2014 04:51 PM
OK, I see. AppVeyor recognizes attributes in the form
[<assembly: AssemblyVersion("1.0.0.0")>]
(withassembly:
prefix), so if you change your AssemblyInfo.fs like below it will be automatically patched:5 Posted by Jon on 23 May, 2014 05:52 PM
That works, brilliant.
Is this the only way to align the package version with the build version? Can you specify in the yml that Version should be set on nuget pack?
Support Staff 6 Posted by Feodor Fitsner on 23 May, 2014 06:03 PM
I far as I understand there are three ways of setting nuget package version:
1) through assembly - when you build package from VS project (
nuget pack some.csproj
) it replaces$version$
from output assembly.2) specifying version in command line:
nuget pack foo.nuspec -Version 2.1.0
. You can useAPPVEYOR_BUILD_VERSION
environment variable here (http://www.appveyor.com/docs/environment-variables)3) patch .nuspec file with required information. This is not something currently supported by AppVeyor, but might be a good todo item.
7 Posted by Jon on 23 May, 2014 06:11 PM
Thanks Feodor
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:43 AM.