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

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

    - Feodor

  2. See attached

  3. Thanks!

  4. 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. 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. 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. 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