2017-05-19 23:20:19 -07:00
|
|
|
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2017-08-09 22:30:20 -07:00
|
|
|
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
|
2017-05-19 23:20:19 -07:00
|
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
2017-08-25 14:45:43 -07:00
|
|
|
|
<TargetFramework>$(CliTargetFramework)</TargetFramework>
|
2017-05-19 23:20:19 -07:00
|
|
|
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
|
|
|
|
<PublishDir>$(FSharpDirectory)</PublishDir>
|
|
|
|
|
<VersionSuffix>$(CommitCount)</VersionSuffix>
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" />
|
2017-06-01 17:38:20 -07:00
|
|
|
|
<PackageReference Include="Microsoft.FSharp.Compiler" Version="$(CLI_FSharp_Version)" />
|
2017-06-23 19:48:38 -07:00
|
|
|
|
<PackageReference Include="CliDeps.Satellites.FSharp" Version="$(CLI_FSharp_Satellites_Version)" />
|
2017-11-22 20:09:47 -08:00
|
|
|
|
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
|
2017-05-19 23:20:19 -07:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<Content Include="RunFsc.sh;RunFsc.cmd">
|
2017-06-01 20:14:09 -07:00
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
2017-05-19 23:20:19 -07:00
|
|
|
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
|
|
|
|
</Content>
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<Target Name="MakeFscRunnableAndMoveToPublishDir"
|
|
|
|
|
AfterTargets="Publish"
|
|
|
|
|
BeforeTargets="RemoveFilesAfterPublish">
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
|
<AssetsToRemoveFromDeps Include="tool_fsc.dll"
|
|
|
|
|
SectionName="runtime"/>
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<RemoveAssetFromDepsPackages DepsFile="$(PublishDir)/$(TargetName).deps.json"
|
|
|
|
|
SectionName="%(AssetsToRemoveFromDeps.SectionName)"
|
|
|
|
|
AssetPath="%(AssetsToRemoveFromDeps.Identity)" />
|
|
|
|
|
|
2017-11-22 20:09:47 -08:00
|
|
|
|
<!-- Deploy deps and runtime config for fsc.exe and fsi.exe. Both apps have exactly the same dependencies so this is Ok -->
|
2017-06-01 17:38:20 -07:00
|
|
|
|
<Copy SourceFiles="$(PublishDir)/$(TargetName).runtimeconfig.json;
|
2017-05-19 23:20:19 -07:00
|
|
|
|
$(PublishDir)/$(TargetName).deps.json;"
|
2017-06-01 17:38:20 -07:00
|
|
|
|
DestinationFiles="$(PublishDir)/fsc.runtimeconfig.json;
|
2017-05-19 23:20:19 -07:00
|
|
|
|
$(PublishDir)/fsc.deps.json;"/>
|
2017-11-22 20:09:47 -08:00
|
|
|
|
<Copy SourceFiles="$(PublishDir)/$(TargetName).runtimeconfig.json;
|
|
|
|
|
$(PublishDir)/$(TargetName).deps.json;"
|
|
|
|
|
DestinationFiles="$(PublishDir)/fsi.runtimeconfig.json;
|
|
|
|
|
$(PublishDir)/fsi.deps.json;"/>
|
2017-05-19 23:20:19 -07:00
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
|
|
<Target Name="RemoveFilesAfterPublish"
|
|
|
|
|
AfterTargets="Publish">
|
|
|
|
|
<Delete Files="$(PublishDir)/$(TargetName).dll" />
|
|
|
|
|
<Delete Files="$(PublishDir)/$(TargetName).pdb" />
|
|
|
|
|
<Delete Files="$(PublishDir)/$(TargetName).runtimeconfig.json" />
|
|
|
|
|
<Delete Files="$(PublishDir)/$(TargetName).deps.json" />
|
|
|
|
|
</Target>
|
|
|
|
|
</Project>
|