-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathUiPath.PowerShell.csproj
More file actions
74 lines (72 loc) · 3.6 KB
/
UiPath.PowerShell.csproj
File metadata and controls
74 lines (72 loc) · 3.6 KB
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">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputPath>$(SolutionDir)\Output\$(Configuration)</OutputPath>
<Deterministic>False</Deterministic>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<DocumentationFile>$(OutputPath)\UiPath.PowerShell.xml</DocumentationFile>
<NoWarn>1701;1702;CS1591;CS0618</NoWarn>
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="PowerShellStandard.Library" Version="5.1.0-preview-06">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.23" />
<PackageReference Include="MSBuildTasks" Version="1.5.0.235">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="RestSharp" Version="106.12.0" />
<PackageReference Include="PowerShellStandard.Library" Version="5.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="XmlDoc2CmdletDoc" Version="0.3.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Properties\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="UiPath.PowerShell.psd1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="UiPath.BindingResolve.ps1">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\UiPath.Web.Client\UiPath.Web.Client.csproj" />
</ItemGroup>
<Target Name="BeforeBuild" Condition="'$(Revision)' != '' ">
<FileUpdate Files="..\properties\GlobalAssemblyInfo.cs" Regex="(?<=AssemblyVersion\("\d+\.\d+\.\d+\.)(\*)" ReplacementText="$(Revision)" />
</Target>
<UsingTask TaskName="GetFileVersion" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<AssemblyPath ParameterType="System.String" Required="true" />
<Version ParameterType="System.String" Output="true" />
</ParameterGroup>
<Task>
<Using Namespace="System.Diagnostics" />
<Code Type="Fragment" Language="cs"><![CDATA[
Log.LogMessage("Getting version details of assembly at: " + this.AssemblyPath, MessageImportance.High);
this.Version = FileVersionInfo.GetVersionInfo(this.AssemblyPath).FileVersion;
]]></Code>
</Task>
</UsingTask>
<Target Name="UpdatePowerShellManifest" AfterTargets="CopyFilesToOutputDirectory">
<GetFileVersion AssemblyPath="$(OutputPath)UiPath.PowerShell.dll">
<Output TaskParameter="Version" PropertyName="UiPathFileVersion" />
</GetFileVersion>
<Message Text="File version is $(UiPathFileVersion)" />
<FileUpdate Files="$(OutputPath)UiPath.PowerShell.psd1" Regex="(?<=ModuleVersion\s=\s)\'.*'" ReplacementText="'$(UiPathFileVersion)'" />
</Target>
</Project>