AssemblyInfo.fs

Jon's Avatar

Jon

23 May, 2014 03:10 PM

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

  1. Support Staff 1 Posted by Feodor Fitsner on 23 May, 2014 03:33 PM

    Feodor Fitsner's Avatar

    Could you please drop me an example of AssemblyInfo.fs?

    - Feodor

  2. 2 Posted by Jon on 23 May, 2014 03:47 PM

    Jon's Avatar

    See attached

  3. Support Staff 3 Posted by Feodor Fitsner on 23 May, 2014 04:38 PM

    Feodor Fitsner's Avatar

    Thanks!

  4. Support Staff 4 Posted by Feodor Fitsner on 23 May, 2014 04:51 PM

    Feodor Fitsner's Avatar

    OK, I see. AppVeyor recognizes attributes in the form [<assembly: AssemblyVersion("1.0.0.0")>] (with assembly: prefix), so if you change your AssemblyInfo.fs like below it will be automatically patched:

    [<assembly: AssemblyTitle("")>]
    [<assembly: AssemblyDescription("")>]
    [<assembly: AssemblyConfiguration("")>]
    [<assembly: AssemblyCompany("")>]
    [<assembly: AssemblyProduct("")>]
    [<assembly: AssemblyCopyright("Copyright ©  2014")>]
    [<assembly: AssemblyTrademark("")>]
    [<assembly: AssemblyCulture("")>]
    [<assembly: ComVisible(false)>]
    [<assembly: Guid("47944d69-b687-48a1-bdad-e5a2573d10ed")>]
    [<assembly: AssemblyVersion("1.0.0.0")>]
    [<assembly: AssemblyFileVersion("1.0.0.0")>]
    
  5. 5 Posted by Jon on 23 May, 2014 05:52 PM

    Jon's Avatar

    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?

  6. Support Staff 6 Posted by Feodor Fitsner on 23 May, 2014 06:03 PM

    Feodor Fitsner's Avatar

    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 use APPVEYOR_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. 7 Posted by Jon on 23 May, 2014 06:11 PM

    Jon's Avatar

    Thanks Feodor

  8. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:43 AM.

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