summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/GodotTools/GodotTools.ProjectEditor/GodotTools.ProjectEditor.csproj
blob: 37123ba2b220aec7ac82720220c8f55afe8608ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <ProjectGuid>{A8CDAD94-C6D4-4B19-A7E7-76C53CC92984}</ProjectGuid>
    <TargetFramework>net472</TargetFramework>
    <LangVersion>7.2</LangVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Build" Version="16.5.0" />
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\GodotTools.Core\GodotTools.Core.csproj" />
    <ProjectReference Include="..\GodotTools.Shared\GodotTools.Shared.csproj" />
  </ItemGroup>
  <!--
  The Microsoft.Build.Runtime package is too problematic so we create a MSBuild.exe stub. The workaround described
  here doesn't work with Microsoft.NETFramework.ReferenceAssemblies: https://github.com/microsoft/msbuild/issues/3486
  We need a MSBuild.exe file as there's an issue in Microsoft.Build where it executes platform dependent code when
  searching for MSBuild.exe before the fallback to not using it. A stub is fine as it should never be executed.
  -->
  <ItemGroup>
    <None Include="MSBuild.exe" CopyToOutputDirectory="Always" />
  </ItemGroup>
  <Target Name="CopyMSBuildStubWindows" AfterTargets="Build" Condition=" '$(GodotPlatform)' == 'windows' Or ( '$(GodotPlatform)' == '' And '$(OS)' == 'Windows_NT' ) ">
    <PropertyGroup>
      <GodotSourceRootPath>$(SolutionDir)/../../../../</GodotSourceRootPath>
      <GodotOutputDataDir>$(GodotSourceRootPath)/bin/GodotSharp</GodotOutputDataDir>
    </PropertyGroup>
    <!-- Need to copy it here as well on Windows -->
    <Copy SourceFiles="MSBuild.exe" DestinationFiles="$(GodotOutputDataDir)\Mono\lib\mono\v4.0\MSBuild.exe" />
  </Target>
</Project>