Skip to content

Commit

Permalink
remove more assemblyinfo generation
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel committed Aug 31, 2021
1 parent f5fd07f commit 6744ab9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
1 change: 0 additions & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ System.IO.Directory.SetCurrentDirectory __SOURCE_DIRECTORY__

open Fake
open Fake.Git
open Fake.AssemblyInfoFile
open Fake.ReleaseNotesHelper
open Fake.UserInputHelper
open System
Expand Down
9 changes: 0 additions & 9 deletions integrationtests/Paket.IntegrationTests/AssemblyInfo.fs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<Paket>True</Paket>
<Link>FsUnit.fs</Link>
</Compile>
<Compile Include="AssemblyInfo.fs" />
<Compile Include="TestHelper.fs" />
<Compile Include="NugetDownloadSpecs.fs" />
<Compile Include="InitSpecs.fs" />
Expand Down
6 changes: 5 additions & 1 deletion src/Paket/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ type PaketExiter() =
tracen msg ; exit 0
else traceError msg ; exit 1

let paketVersion = AssemblyVersionInformation.AssemblyInformationalVersion
let paketVersion =
let attrs = System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(false)

attrs
|> Seq.pick (fun a -> match a with | :? System.Reflection.AssemblyInformationalVersionAttribute as i -> Some i.InformationalVersion | _ -> None)

let mutable tracedVersion = false

Expand Down
6 changes: 5 additions & 1 deletion tests/Paket.Tests/Paket.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
<OutputType>Library</OutputType>
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<!-- these three properties are set for some tests around assembly metadata parsing.
they're written to the generated AssemblyInfo.fs -->
<Version>1.0.0</Version>
<Authors>Two,Authors</Authors>
<Description>A description</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' != 'net461'">
<DefineConstants>WEBPROXY_NETSTANDARD;TESTSUITE_RUNS_ON_DOTNETCORE;NO_UNIT_PLATFORMATTRIBUTE;NO_UNIT_TIMEOUTATTRIBUTE;@(DefineConstants)</DefineConstants>
Expand Down

0 comments on commit 6744ab9

Please sign in to comment.