Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<!-- Override FSharpCompilerPath to point to VSIX Tools directory -->
<!-- This props file is deployed alongside the Tools directory in the VSIX -->
<!-- Calculate path from this file's location to Tools -->
<_FSharpDebugVsixPropsDir>$(MSBuildThisFileDirectory)</_FSharpDebugVsixPropsDir>
<_FSharpDebugVsixToolsPath>$(_FSharpDebugVsixPropsDir)Tools\</_FSharpDebugVsixToolsPath>

<!-- Override only if not already set and compiler exists -->
<FSharpCompilerPath Condition="'$(FSharpCompilerPath)' == '' and Exists('$(_FSharpDebugVsixToolsPath)fscAnyCpu.exe')">$(_FSharpDebugVsixToolsPath)</FSharpCompilerPath>
</PropertyGroup>

<Target Name="WarnAboutDebugVsixCompiler" BeforeTargets="BeforeBuild" Condition="'$(FSharpCompilerPath)' == '$(_FSharpDebugVsixToolsPath)'">
<Warning Text="πŸ”§ [F# Debug VSIX] Using custom F# compiler from: $(FSharpCompilerPath)" />
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
<Asset Type="Microsoft.VisualStudio.ItemTemplate" d:Source="Project" Path="ItemTemplates" d:TargetPath="|TextFile;TemplateProjectOutputGroup|" d:ProjectName="TextFile" d:VsixSubPath="ItemTemplates" />
<Asset Type="Microsoft.VisualStudio.ItemTemplate" d:Source="Project" Path="ItemTemplates" d:TargetPath="|XMLFile;TemplateProjectOutputGroup|" d:ProjectName="XMLFile" d:VsixSubPath="ItemTemplates" />

<Asset Type="Microsoft.VisualStudio.MsBuildProps"
d:Source="File"
Path="Microsoft.FSharp.VSIX.Debug.Overrides.props" />
</Assets>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[|%CurrentProject%;GetVSGeneralVersion|,)" DisplayName="Visual Studio core editor" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,13 @@
</Content>
</ItemGroup>
</Target>

<ItemGroup>
<!-- Deploy the override props file as an MSBuild asset -->
<Content Include="Microsoft.FSharp.VSIX.Debug.Overrides.props">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<IncludeInVSIX>true</IncludeInVSIX>
<VSixSubPath>.</VSixSubPath>
</Content>
</ItemGroup>
</Project>
Loading