dotnet-installer/src/tool_fsharp/tool_fsc.csproj

58 lines
2.7 KiB
XML
Raw Normal View History

<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.tasks))\dir.tasks" />
<PropertyGroup>
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
<TargetFramework>$(CliTargetFramework)</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PublishDir>$(FSharpDirectory)</PublishDir>
<VersionSuffix>$(CommitCount)</VersionSuffix>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NetCore.App" Version="$(CLI_SharedFrameworkVersion)" />
<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" />
</ItemGroup>
<ItemGroup>
<Content Include="RunFsc.sh;RunFsc.cmd">
2017-06-01 20:14:09 -07:00
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<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 -->
<Copy SourceFiles="$(PublishDir)/$(TargetName).runtimeconfig.json;
$(PublishDir)/$(TargetName).deps.json;"
DestinationFiles="$(PublishDir)/fsc.runtimeconfig.json;
$(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;"/>
</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>