forked from Azure-App-Service/KuduLite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kudu.Services.Web.csproj
74 lines (74 loc) · 4.89 KB
/
Kudu.Services.Web.csproj
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TieredCompilation>true</TieredCompilation>
</PropertyGroup>
<!-- Supressing Net Core migration warnings-->
<PropertyGroup>
<NoWarn>$(NoWarn);NU1608</NoWarn>
<NoWarn>$(NoWarn);NU1701</NoWarn>
<NoWarn>$(NoWarn);NU1604</NoWarn>
<NoWarn>$(NoWarn);NU1591</NoWarn>
<NoWarn>$(NoWarn);NU1702</NoWarn>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
</PropertyGroup>
<PropertyGroup>
<ServerGarbageCollection>false</ServerGarbageCollection>
</PropertyGroup>
<PropertyGroup>
<TrimUnusedDependencies>true</TrimUnusedDependencies>
</PropertyGroup>
<Target Name="BeforeBuild" AfterTargets="BeforeBuild">
<Message Importance="High" Text="%0a+++ Building KuduLite +++%0a%0a" />
</Target>
<ItemGroup>
<PackageReference Include="AspNetCore.Proxy" Version="4.2.0" />
<PackageReference Include="AspNetCore.RouteAnalyzer" Version="0.5.3" />
<PackageReference Include="log4net" Version="2.0.8" />
<PackageReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Proxy" />
<PackageReference Include="Microsoft.Diagnostics.Runtime" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="XmlSettings" Version="0.1.3" />
</ItemGroup>
<Target Name="_IncludePrePublishGeneratedContent" BeforeTargets="GetCopyToPublishDirectoryItems" Condition=" '$(EnableDefaultItems)' == 'true' And '$(EnableDefaultContentItems)' == 'true' " />
<ItemGroup>
<ProjectReference Include="..\Kudu.Core\Kudu.Core.csproj" />
<ProjectReference Include="..\Kudu.Services\Kudu.Services.csproj" />
</ItemGroup>
<ItemGroup>
<!-- Odds and ends for the Scripts\ directory -->
<ContentWithTargetPath Include="$(NuGetPackageRoot)KuduSync.NET\**\tools\*" TargetPath="Scripts\%(FileName)%(Extension)" CopyToOutputDirectory="Always" />
<ContentWithTargetPath Include="$(NuGetPackageRoot)KuduHandles\**\KuduHandles.exe" TargetPath="Scripts\KuduHandles.exe" CopyToOutputDirectory="Always" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\Content\Styles\" />
<Folder Include="wwwroot\Content\Scripts\" />
</ItemGroup>
<!-- Run updateNodeModules to install kuduscript -->
<Target Name="PutNodeModulesInBinDir" AfterTargets="Build">
<Exec Command="$(ProjectDir)\updateNodeModules.cmd "$(PublishDir)"" Condition="'$(OS)' == 'Windows_NT' AND '$(Configuration)'=='Release'" />
<Exec Command="$(ProjectDir)\updateNodeModules.cmd "$(OutputPath)"" Condition="'$(OS)' == 'Windows_NT' AND '$(Configuration)'=='Debug'" />
<Exec Command="sh $(ProjectDir)/updateNodeModules.sh "$(PublishDir)"" Condition="'$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Release'" />
<Exec Command="sh $(ProjectDir)/updateNodeModules.sh "$(OutputPath)"" Condition="'$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Debug'" />
</Target>
<Target Name="BuildKuduConsole" AfterTargets="Build">
<Message Text="%0a%0aBuilding KuduConsole%0a" Importance="high" />
<Exec Command="dotnet build ../Kudu.Console -o $(MSBuildProjectDirectory)/$(PublishDir)..\KuduConsole" Condition="'$(Configuration)' == 'Debug' AND '$(OS)' == 'Windows_NT'" />
<Exec Command="dotnet build ../Kudu.Console -o $(OutputPath)/KuduConsole" Condition="'$(Configuration)' == 'Debug' AND '$(OS)' != 'Windows_NT'" />
<Exec Command="dotnet publish ..\Kudu.Console --configuration Release -o $(PublishDir)\KuduConsole" Condition="'$(Configuration)' == 'Release' AND '$(OS)' == 'Windows_NT'" />
<Exec Command="dotnet publish ../Kudu.Console --configuration Release -o $(PublishDir)/KuduConsole" Condition="'$(Configuration)' == 'Release' AND '$(OS)' != 'Windows_NT'" />
</Target>
<Target Name="ChangeScriptPermissionsForLinux" AfterTargets="publish">
<Message Text="%0a%0aSetting Permissions for Kudu Script(s)%0a" Importance="high" />
<Exec Command="chmod -R +x $(PublishDir)/KuduConsole" Condition=" '$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Release'" />
<Exec Command="chmod -R +x $(PublishDir)/node_modules" Condition=" '$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Release'" />
<Exec Command="chmod -R +x $(PublishDir)/Scripts" Condition=" '$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Release'" />
<Exec Command="chmod -R +x $(OutputPath)/KuduConsole" Condition=" '$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Debug'" />
<Exec Command="chmod -R +x $(OutputPath)/node_modules" Condition=" '$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Debug'" />
<Exec Command="chmod -R +x $(OutputPath)/Scripts" Condition=" '$(OS)' != 'Windows_NT' AND '$(Configuration)' == 'Debug'" />
</Target>
</Project>