Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to SourceLink v2 #2200

Merged
merged 25 commits into from
Apr 24, 2017
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<packageSources>
<clear />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
<add key="msbuildsdkextras" value="https://www.myget.org/F/msbuildsdkextras/api/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
os: Visual Studio 2017
init:
- git config --global core.autocrlf input
build_script:
Expand Down
23 changes: 17 additions & 6 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,23 @@ Target "CleanDocs" (fun _ ->
// --------------------------------------------------------------------------------------
// Build library & test project

Target "Build" (fun _ ->
Target "MSBuildRestore" (fun _ ->
!! solutionFile
|> MSBuildReleaseExt "" [
"VisualStudioVersion", "14.0"
"ToolsVersion" , "14.0"
] "Rebuild"
|> ignore
|> Seq.iter (build (fun p -> {p with RestorePackagesFlag=true; Targets=["Restore"]}))
)

Target "Build" (fun _ ->
if isMono then
!! solutionFile
|> MSBuildReleaseExt "" [
"VisualStudioVersion", "14.0"
"ToolsVersion" , "14.0"
] "Rebuild"
|> ignore
else
!! solutionFile
|> MSBuildReleaseExt "" [] "Rebuild"
|> ignore
)


Expand Down Expand Up @@ -582,6 +592,7 @@ Target "All" DoNothing
=?> ("InstallDotNetCore", not <| hasBuildParam "DISABLE_NETCORE")
=?> ("DotnetRestore", not <| hasBuildParam "DISABLE_NETCORE")
=?> ("DotnetBuild", not <| hasBuildParam "DISABLE_NETCORE")
=?> ("MSBuildRestore", not isMono)
==> "Build"
=?> ("DotnetPackage", not <| hasBuildParam "DISABLE_NETCORE")
=?> ("BuildPowerShell", not isMono)
Expand Down
2 changes: 0 additions & 2 deletions docs/content/dependencies-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ To give you an overview, consider the following `paket.dependencies` file:
nuget NUnit ~> 2.6.3
nuget FAKE ~> 3.4
nuget DotNetZip >= 1.9
nuget SourceLink.Fake

// Files from GitHub repositories
github forki/FsUnit FsUnit.fs
Expand All @@ -27,7 +26,6 @@ The file specifies that Paket's NuGet dependencies should be downloaded from [nu
* [NUnit](http://www.nunit.org/) in version [2.6.3 <= x < 2.7](nuget-dependencies.html#Pessimistic-version-constraint)
* [FAKE](http://fsharp.github.io/FAKE/) in version [3.4 <= x < 4.0](nuget-dependencies.html#Pessimistic-version-constraint) as a build tool
* [DotNetZip](http://dotnetzip.codeplex.com/) with version which is at [least 1.9](http://fsprojects.github.io/Paket/nuget-dependencies.html#Greater-than-or-equal-version-constraint)
* [SourceLink.Fake](https://github.com/ctaggart/SourceLink) in the latest version
* [FSUnit.fs](https://github.com/forki/FsUnit) from GitHub.
* Gist number [1972349](https://gist.github.com/Thorium/1972349) from GitHub Gist
* External HTTP resource, e.g. [1n](http://www.fssnip.net/1n) from [FSSnip](http://www.fssnip.net/)
Expand Down
9 changes: 9 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.1.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.NuGet.Build.Tasks.Workaround" Version="*" PrivateAssets="all" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workaround for mixed msbuild projects like this for current MSBuild 15 NuGet/Home#4532

</ItemGroup>
</Project>
14 changes: 14 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project>
<PropertyGroup>
<BuildDependsOn>EmbedPaketFiles;$(BuildDependsOn)</BuildDependsOn>
</PropertyGroup>
<Target Name="EmbedPaketFiles">
<ItemGroup>
<EmbeddedFiles Include="$([System.IO.Path]::GetFullPath('%(Compile.Identity)'))"
Condition="$([System.String]::Copy('%(Identity)').Contains('paket-files'))" />
</ItemGroup>
<CreateProperty Value="@(EmbeddedFiles)">
<Output TaskParameter="Value" PropertyName="embed" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This embeds the paket-files in the pdb since they are not in the repository. csharp and vb support @(EmbeddedFiles) with relative directories, but not fsharp. This would work with all of them.

</CreateProperty>
</Target>
</Project>
1 change: 0 additions & 1 deletion src/Paket.Core/Paket.Core.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
<StartWorkingDirectory>D:\code\PaketKopie</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>..\..\bin</OutputPath>
Expand Down
2 changes: 0 additions & 2 deletions src/Paket.PowerShell/Paket.PowerShell.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>..\..\bin</OutputPath>
Expand All @@ -30,7 +29,6 @@
</StartArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>..\..\bin</OutputPath>
Expand Down
2 changes: 0 additions & 2 deletions src/Paket/Paket.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Tailcalls>false</Tailcalls>
<OutputPath>..\..\bin\</OutputPath>
Expand All @@ -41,7 +40,6 @@
<StartWorkingDirectory>D:\temp\watchr2</StartWorkingDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Tailcalls>true</Tailcalls>
<OutputPath>..\..\bin</OutputPath>
Expand Down