-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathRemote Server.csproj
166 lines (157 loc) · 7.64 KB
/
Remote Server.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<RootNamespace>ASCOM.Remote</RootNamespace>
<AssemblyName>RemoteServer</AssemblyName>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AssemblyTitle>ASCOM Remote Server</AssemblyTitle>
<Product>ASCOM Remote Server</Product>
<Copyright>Copyright © 2024 Peter Simpson</Copyright>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Platforms>AnyCPU;x86;x64</Platforms>
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
</PropertyGroup>
<Target Name="Test" AfterTargets="AfterBuild">
<Message Importance="High" Text=" Version: $(ProductMajor).$(ProductMinor).$(ProductPatch).$(BuildNumber)" />
<Message Importance="High" Text=" InformationalVersion: $(InformationalVersion)" />
<Message Importance="High" Text=" Short GIT tag: $(Head)" />
</Target>
<Target Name="WriteInstallerVersion" AfterTargets="CopyFilesToOutputDirectory">
<PropertyGroup>
<InstallerVersion>$(ProductMajor).$(ProductMinor).$(ProductPatch)$(ProductPreReleaseSeparator)$(ProductPreRelease)+$(BuildNumber).$(Head)</InstallerVersion>
</PropertyGroup>
<WriteLinesToFile File="$(PublishDir)..\InstallerVersion.txt" Overwrite="true" Lines="$(InstallerVersion)" />
</Target>
<Target Name="ShortGitId" BeforeTargets="PreBuildEvent">
<Exec Command="git rev-parse --short HEAD > head.txt" />
<ReadLinesFromFile File="head.txt">
<Output TaskParameter="Lines" PropertyName="Head" />
</ReadLinesFromFile>
<Delete Files="head.txt" />
<ItemGroup>
<!-- Include must be the fully qualified .NET type name of the Attribute to create. -->
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<!-- _Parameter1, _Parameter2, etc. correspond to the matching parameter of a constructor of that .NET attribute type -->
<_Parameter1>ShortGitId</_Parameter1>
<_Parameter2>$(BuildNumber).$(Head)</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
</Target>
<PropertyGroup>
<!-- Set version numbers -->
<ProductMajor>7</ProductMajor>
<ProductMinor>0</ProductMinor>
<ProductPatch>1</ProductPatch>
<!-- Set the pre-release string without a leading minus e.g. rc.1 -->
<ProductPreRelease></ProductPreRelease>
<!--Create a dynamic revision number based on time of build
The revision number is calculated by using the lowest 5 bits (0::31) to store the build hour (0::23) and the upper 11 bits to store the build day since the 1st January 2023.
This approach gives a revision number that changes every hour and that only repeats after 2048 days (over 5 years).
To simplify the formula, years are assumed to be 366 days in length and UTC is used for the time of day so that daylight savings time changes can be ignored. -->
<BuildNumber>$([MSBuild]::Add($([MSBuild]::Multiply($([MSBuild]::Modulo($([MSBuild]::Add($([MSBuild]::Multiply($([MSBuild]::Subtract($([System.DateTime]::UtcNow.Year),2023)),366)),$([System.DateTime]::UtcNow.DayOfYear))),2048)),32)),$([System.DateTime]::UtcNow.TimeOfDay.Hours)))</BuildNumber>
</PropertyGroup>
<!-- Create the pre-release string minus character separator if this is a pre-release -->
<PropertyGroup Condition="'$(ProductPreRelease)'!=''">
<ProductPreReleaseSeparator>-</ProductPreReleaseSeparator>
</PropertyGroup>
<PropertyGroup>
<!--Set the assembly version numbers to major.minor.patch.build - This must be a a separate property group to the group where the variables are set -->
<AssemblyVersion>$(ProductMajor).$(ProductMinor).$(ProductPatch).$(BuildNumber)</AssemblyVersion>
<FileVersion>$(ProductMajor).$(ProductMinor).$(ProductPatch).$(BuildNumber)</FileVersion>
<!--Set the product version to the SEMVER version string including the major, minor, patch, pre-release and build number elements-->
<InformationalVersion>$(ProductMajor).$(ProductMinor).$(ProductPatch)$(ProductPreReleaseSeparator)$(ProductPreRelease)+$(BuildNumber)</InformationalVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>embedded</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DebugType>embedded</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
<DebugType>embedded</DebugType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>embedded</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>embedded</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
<DebugType>embedded</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>true</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup>
<StartupObject>ASCOM.Remote.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>..\Remote Server Key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>ASCOM.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>True</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Compile Update="DriverHostForm.cs" />
<Compile Update="DriverHostForm.Designer.cs">
<DependentUpon>DriverHostForm.cs</DependentUpon>
</Compile>
<Compile Update="ServedDevice.cs" />
<Compile Update="ServedDevice.Designer.cs">
<DependentUpon>ServedDevice.cs</DependentUpon>
</Compile>
<Compile Update="SetupForm.cs" />
<Compile Update="SetupForm.Designer.cs">
<DependentUpon>SetupForm.cs</DependentUpon>
</Compile>
<Compile Update="ServerForm.cs" />
<Compile Update="ServerForm.Designer.cs">
<DependentUpon>ServerForm.cs</DependentUpon>
</Compile>
<EmbeddedResource Update="DriverHostForm.resx">
<DependentUpon>DriverHostForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="ServedDevice.resx">
<DependentUpon>ServedDevice.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="SetupForm.resx">
<DependentUpon>SetupForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="ServerForm.resx">
<DependentUpon>ServerForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Include="ASCOM.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="ASCOMAlpacaMidRes.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="ascomicon.ico">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ASCOM.Com.Components" Version="2.0.8" />
<PackageReference Include="ASCOM.Common.Components" Version="2.0.8" />
<PackageReference Include="ASCOM.DeviceInterfaces" Version="7.0.0" />
<PackageReference Include="ASCOM.Exception.Library" Version="7.0.1" />
<PackageReference Include="ASCOM.Tools" Version="2.0.8" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Octokit" Version="14.0.0" />
<PackageReference Include="Semver" Version="3.0.0" />
</ItemGroup>
</Project>