Build system fixes and cleanups

This commit is contained in:
Jordan Brown
2019-12-30 11:58:07 -05:00
parent 9a50b6f894
commit e49598a9ce
16 changed files with 234 additions and 277 deletions
+7
View File
@@ -0,0 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TgsCoreVersion>4.0.1.4</TgsCoreVersion>
<TgsApiVersion>4.0.2</TgsApiVersion>
<TgsClientVersion>4.0.3.0</TgsClientVersion>
</PropertyGroup>
</Project>
@@ -1,8 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Cyberboss</Authors>
<Company>/tg/station</Company>
<Description>API definitions for tgstation-server</Description>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>tgs.ico</PackageIcon>
<PackageProjectUrl>https://tgstation.github.io/tgstation-server</PackageProjectUrl>
<RepositoryType>Git</RepositoryType>
<RepositoryUrl>https://github.com/tgstation/tgstation-server</RepositoryUrl>
<Copyright>2018</Copyright>
<PackageTags>json web api tgstation-server tgstation ss13 byond</PackageTags>
<PackageReleaseNotes>Added ApiHeaders.RawUserAgent</PackageReleaseNotes>
<Version>$(TgsApiVersion)</Version>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<LangVersion>latest</LangVersion>
</PropertyGroup>
@@ -21,18 +35,16 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.1.1" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-beta.61">
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="System.ComponentModel.Annotations" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="../../build/stylecop.json" />
<None Include="$(SolutionDir)/LICENSE" Pack="true" PackagePath=""/>
<None Include="$(SolutionDir)/build/tgs.ico" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
<Version>4.0.3.0</Version>
<Version>$(TgsClientVersion)</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Cyberboss</Authors>
<Company>/tg/station 13</Company>
@@ -13,8 +14,8 @@
<RepositoryUrl>https://github.com/tgstation/tgstation-server</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<NeutralLanguage>en-CA</NeutralLanguage>
<PackageIconUrl>https://raw.githubusercontent.com/tgstation/tgstation-server/master/build/tgs.ico</PackageIconUrl>
<PackageLicenseUrl>https://github.com/tgstation/tgstation-server/blob/master/LICENSE</PackageLicenseUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>tgs.ico</PackageIcon>
<PackageTags>json web api tgstation-server tgstation ss13 byond client</PackageTags>
<PackageReleaseNotes>Added the ability to change the Token of IServerClient</PackageReleaseNotes>
<Copyright>2018</Copyright>
@@ -40,7 +41,7 @@
<IncludeAssets>compile; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-beta.61">
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
@@ -52,5 +53,7 @@
<ItemGroup>
<AdditionalFiles Include="../../build/stylecop.json" />
<None Include="$(SolutionDir)/LICENSE" Pack="true" PackagePath=""/>
<None Include="$(SolutionDir)/build/tgs.ico" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>
@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<DebugType>Full</DebugType>
<Version>4.0.1.4</Version>
<Version>$(TgsCoreVersion)</Version>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<LangVersion>latest</LangVersion>
</PropertyGroup>
@@ -1,11 +1,3 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("Tgstation.Server.Host.Service")]
[assembly: ComVisible(false)]
[assembly: Guid("29927416-3b78-49a7-a560-5ccaa638b6b4")]
[assembly: InternalsVisibleTo("Tgstation.Server.Host.Service.Tests")]
[assembly: AssemblyVersion("4.0.1.4")]
[assembly: AssemblyFileVersion("4.0.1.4")]
[assembly:InternalsVisibleTo("Tgstation.Server.Host.Service.Tests")]
@@ -1,116 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{29927416-3B78-49A7-A560-5CCAA638B6B4}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Tgstation.Server.Host.Service</RootNamespace>
<AssemblyName>Tgstation.Server.Host.Service</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<LangVersion>latest</LangVersion>
<WarningLevel>4</WarningLevel>
<OutputType>Exe</OutputType>
<TargetFramework>net471</TargetFramework>
<RuntimeIdentifier>win</RuntimeIdentifier>
<DebugType>Full</DebugType>
<Version>$(TgsCoreVersion)</Version>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet />
<LangVersion>latest</LangVersion>
<DocumentationFile>bin\Debug\Tgstation.Server.Host.Console.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DocumentationFile>bin\Debug\Tgstation.Server.Host.Service.xml</DocumentationFile>
<NoWarn>SA1101;SA1121;SA1200;SA1202;SA1208;SA1400;SA1413;SA1501;SA1503;SA1519;SA1520;SA1623;SA1629;SA1633;SA1642</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>bin\Release\Tgstation.Server.Host.Service.xml</DocumentationFile>
<NoWarn>SA1101;SA1121;SA1200;SA1202;SA1208;SA1400;SA1413;SA1501;SA1503;SA1519;SA1520;SA1623;SA1629;SA1633;SA1642</NoWarn>
<WarningsAsErrors />
</PropertyGroup>
<PropertyGroup>
<StartupObject>Tgstation.Server.Host.Service.Program</StartupObject>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<ApplicationIcon>../../build/tgs.ico</ApplicationIcon>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;SA1652</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServerService.cs">
<SubType>Component</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.1 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Tgstation.Server.Host.Watchdog\Tgstation.Server.Host.Watchdog.csproj">
<Project>{5d2d682c-6bf0-439c-850b-6ab945bbeaea}</Project>
<Name>Tgstation.Server.Host.Watchdog</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils">
<Version>2.2.5</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.EventLog">
<Version>2.1.1</Version>
</PackageReference>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.2.5" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="2.1.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.1-beta.61">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="..\..\build\stylecop.json">
<Link>stylecop.json</Link>
</AdditionalFiles>
<ProjectReference Include="..\Tgstation.Server.Host.Watchdog\Tgstation.Server.Host.Watchdog.csproj" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
<ItemGroup>
<AdditionalFiles Include="../../build/stylecop.json" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
</Project>
@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../build/Version.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<DebugType>Full</DebugType>
<AddSyntheticProjectReferencesForSolutionDependencies>false</AddSyntheticProjectReferencesForSolutionDependencies>
<Version>4.0.1.4</Version>
<Version>$(TgsCoreVersion)</Version>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
<LangVersion>latest</LangVersion>
</PropertyGroup>
+28 -24
View File
@@ -29,6 +29,32 @@ namespace Tgstation.Server.Host.Watchdog
this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
}
string GetDotnetPath(bool isWindows)
{
var enviromentPath = Environment.GetEnvironmentVariable("PATH");
var paths = enviromentPath.Split(';');
var exeName = "dotnet";
IEnumerable<string> enumerator;
if (isWindows)
{
exeName += ".exe";
enumerator = paths;
}
else
enumerator = paths.Select(x => x.Split(':')).SelectMany(x => x);
enumerator = enumerator.Select(x => Path.Combine(x, exeName));
return enumerator
.Where(x =>
{
logger.LogTrace("Checking for dotnet at {0}", x);
return File.Exists(x);
})
.FirstOrDefault();
}
/// <inheritdoc />
#pragma warning disable CA1502 // TODO: Decomplexify
public async Task RunAsync(bool runConfigure, string[] args, CancellationToken cancellationToken)
@@ -38,30 +64,8 @@ namespace Tgstation.Server.Host.Watchdog
string updateDirectory = null;
try
{
var enviromentPath = Environment.GetEnvironmentVariable("PATH");
var paths = enviromentPath.Split(';');
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
var exeName = "dotnet";
IEnumerable<string> enumerator;
if (isWindows)
{
exeName += ".exe";
enumerator = paths;
}
else
enumerator = paths.Select(x => x.Split(':')).SelectMany(x => x);
enumerator = enumerator.Select(x => Path.Combine(x, exeName));
var dotnetPath = enumerator
.Where(x =>
{
logger.LogTrace("Checking for dotnet at {0}", x);
return File.Exists(x);
})
.FirstOrDefault();
var dotnetPath = GetDotnetPath(isWindows);
if (dotnetPath == default)
{
logger.LogCritical("Unable to locate dotnet executable in PATH! Please ensure the .NET Core runtime is installed and is in your PATH!");
@@ -126,7 +130,7 @@ namespace Tgstation.Server.Host.Watchdog
'"' + updateDirectory + '"'
};
if (Environment.GetCommandLineArgs().Any(x => x == "--attach-host-debugger"))
if (Environment.GetCommandLineArgs().Any(x => x.Equals("--attach-host-debugger", StringComparison.OrdinalIgnoreCase)))
arguments.Add("--attach-debugger");
if (runConfigure)
@@ -5,7 +5,7 @@
"tgstation-server-control-panel": "0.1.6"
},
"scripts": {
"build": "npm run clean && tslint -p tsconfig.json && react-scripts build && cp-cli node_modules/tgstation-server-control-panel/build/public/ build/ && cp-cli ../../../build/tgs.ico build/favicon.ico && minify-json build && rimraf ../wwwroot && move-cli build ../wwwroot",
"msbuild": "npm run clean && tslint -p tsconfig.json && react-scripts build && cp-cli node_modules/tgstation-server-control-panel/build/public/ build/ && cp-cli ../../../build/tgs.ico build/favicon.ico && minify-json build && rimraf ../wwwroot && move-cli build ../wwwroot",
"clean": "rimraf build"
},
"devDependencies": {
@@ -98,6 +98,58 @@ namespace Tgstation.Server.Host.Controllers
return StatusCode(429);
}
/// <summary>
/// Try to download and apply an update with a given <paramref name="newVersion"/>.
/// </summary>
/// <param name="newVersion">The version of the server to update to.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation.</param>
/// <returns>A <see cref="Task{TResult}"/> resulting in the <see cref="IActionResult"/> of the operation.</returns>
async Task<IActionResult> CheckReleasesAndApplyUpdate(Version newVersion, CancellationToken cancellationToken)
{
Logger.LogDebug("Looking for GitHub releases version {0}...", newVersion);
IEnumerable<Release> releases;
try
{
var gitHubClient = GetGitHubClient();
releases = await gitHubClient
.Repository
.Release
.GetAll(updatesConfiguration.GitHubRepositoryId)
.WithToken(cancellationToken)
.ConfigureAwait(false);
}
catch (RateLimitExceededException e)
{
return RateLimit(e);
}
catch (ApiException e)
{
Logger.LogWarning(OctokitException, e);
return StatusCode((int)HttpStatusCode.FailedDependency);
}
releases = releases.Where(x => x.TagName.StartsWith(updatesConfiguration.GitTagPrefix, StringComparison.InvariantCulture));
Logger.LogTrace("Release query complete!");
foreach (var release in releases)
if (Version.TryParse(release.TagName.Replace(updatesConfiguration.GitTagPrefix, String.Empty, StringComparison.Ordinal), out var version) && version == newVersion)
{
var asset = release.Assets.Where(x => x.Name.Equals(updatesConfiguration.UpdatePackageAssetName, StringComparison.Ordinal)).FirstOrDefault();
if (asset == default)
continue;
if (!serverUpdater.ApplyUpdate(version, new Uri(asset.BrowserDownloadUrl), ioManager))
return Conflict(new ErrorMessage
{
Message = "An update operation is already in progress!"
});
return Accepted(); // gtfo of here before all the cancellation tokens fire
}
return StatusCode((int)HttpStatusCode.Gone);
}
IGitHubClient GetGitHubClient() => String.IsNullOrEmpty(generalConfiguration.GitHubAccessToken) ? gitHubClientFactory.CreateClient() : gitHubClientFactory.CreateClient(generalConfiguration.GitHubAccessToken);
/// <inheritdoc />
@@ -163,41 +215,7 @@ namespace Tgstation.Server.Host.Controllers
Message = RestartNotSupportedException
});
Logger.LogDebug("Looking for GitHub releases version {0}...", model.NewVersion);
IEnumerable<Release> releases;
try
{
var gitHubClient = GetGitHubClient();
releases = (await gitHubClient.Repository.Release.GetAll(updatesConfiguration.GitHubRepositoryId).ConfigureAwait(false)).Where(x => x.TagName.StartsWith(updatesConfiguration.GitTagPrefix, StringComparison.InvariantCulture));
cancellationToken.ThrowIfCancellationRequested();
}
catch (RateLimitExceededException e)
{
return RateLimit(e);
}
catch (ApiException e)
{
Logger.LogWarning(OctokitException, e);
return StatusCode((int)HttpStatusCode.FailedDependency);
}
Logger.LogTrace("Release query complete!");
foreach (var release in releases)
if (Version.TryParse(release.TagName.Replace(updatesConfiguration.GitTagPrefix, String.Empty, StringComparison.Ordinal), out var version) && version == model.NewVersion)
{
var asset = release.Assets.Where(x => x.Name == updatesConfiguration.UpdatePackageAssetName).FirstOrDefault();
if (asset == default)
continue;
if (!serverUpdater.ApplyUpdate(version, new Uri(asset.BrowserDownloadUrl), ioManager))
return Conflict(new ErrorMessage
{
Message = "An update operation is already in progress!"
});
return Accepted(); // gtfo of here before all the cancellation tokens fire
}
return StatusCode((int)HttpStatusCode.Gone);
return await CheckReleasesAndApplyUpdate(model.NewVersion, cancellationToken).ConfigureAwait(false);
}
/// <summary>
@@ -0,0 +1,52 @@
using System;
using System.Threading;
using System.Threading.Tasks;
namespace Tgstation.Server.Host.Core
{
/// <summary>
/// Extensions for the <see cref="Task"/> <see langword="class"/>.
/// </summary>
static class TaskExtensions
{
/// <summary>
/// Create a <see cref="Task"/> that can be awaited while respecting a given <paramref name="cancellationToken"/>.
/// </summary>
/// <param name="task">The <see cref="Task"/> to add cancel support to.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation.</param>
/// <returns>A <see cref="Task"/> representing the running operation.</returns>
public static Task WithToken(this Task task, CancellationToken cancellationToken)
{
if (task == null)
throw new ArgumentNullException(nameof(task));
async Task<object> Wrap()
{
await task.ConfigureAwait(false);
return null;
}
return Wrap().WithToken(cancellationToken);
}
/// <summary>
/// Create a <see cref="Task{TResult}"/> that can be awaited while respecting a given <paramref name="cancellationToken"/>.
/// </summary>
/// <typeparam name="T">The result <see cref="Type"/> of the <paramref name="task"/>.</typeparam>
/// <param name="task">The <see cref="Task{TResult}"/> to add cancel support to.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> for the operation.</param>
/// <returns>A <see cref="Task{TResult}"/> resulting in the result of <paramref name="task"/>.</returns>
public static async Task<T> WithToken<T>(this Task<T> task, CancellationToken cancellationToken)
{
if (task == null)
throw new ArgumentNullException(nameof(task));
var cancelTcs = new TaskCompletionSource<object>();
using (cancellationToken.Register(() => cancelTcs.SetCanceled()))
await Task.WhenAny(task, cancelTcs.Task).ConfigureAwait(false);
cancellationToken.ThrowIfCancellationRequested();
return await task.ConfigureAwait(false);
}
}
}
@@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="../../build/Version.props" />
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<DebugType>Full</DebugType>
<Version>4.0.1.4</Version>
<Version>$(TgsCoreVersion)</Version>
<LangVersion>latest</LangVersion>
<CodeAnalysisRuleSet>../../build/analyzers.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
@@ -15,7 +16,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<NoWarn>1701;1702;SA1652</NoWarn>
<NoWarn>1701;1702;SA1652;CA1063</NoWarn>
<DocumentationFile>bin\Debug\netcoreapp2.1\Tgstation.Server.Host.xml</DocumentationFile>
</PropertyGroup>
@@ -36,11 +37,11 @@
<Content Remove="ClientApp\public\manifest.json" />
<Content Remove="ClientApp\tsconfig.json" />
<Content Remove="ClientApp\tslint.json" />
<ClientApp Include="ClientApp\src;ClientApp\public;ClientApp\tsconfig.json;ClientApp\tslint.json;ClientApp\package-lock.json" />
<ClientApp Include="ClientApp\src\**\*;ClientApp\public\**\*;ClientApp\tsconfig.json;ClientApp\tslint.json;ClientApp\package.json;ClientApp\package-lock.json" />
</ItemGroup>
<Target Name="NpmBuild" BeforeTargets="BeforeBuild" DependsOnTargets="NpmInstall" Inputs="@(ClientApp)" Outputs="wwwroot\index.html">
<Exec WorkingDirectory="ClientApp" Command="npm run build" />
<Exec WorkingDirectory="ClientApp" Command="npm run msbuild" />
</Target>
<ItemGroup>
@@ -97,7 +98,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
<Folder Include="wwwroot\" />
</ItemGroup>
@@ -1,11 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Tgstation.Server.Host.Service.Tests")]
[assembly: ComVisible(false)]
[assembly: Guid("aa80a190-52e2-4be3-bfeb-1f148d9e9007")]
[assembly: AssemblyVersion("4.0.0.0")]
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.0.0.0")]
@@ -1,81 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{AA80A190-52E2-4BE3-BFEB-1F148D9E9007}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Tgstation.Server.Host.Service.Tests</RootNamespace>
<AssemblyName>Tgstation.Server.Host.Service.Tests</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<TargetFramework>net471</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<WarningsAsErrors />
<DocumentationFile></DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Data.OracleClient" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net" />
<Reference Include="System.Numerics" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Transactions" />
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="2.1.1" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
</ItemGroup>
<ItemGroup>
<Compile Include="TestServerService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<ProjectReference Include="..\..\src\Tgstation.Server.Host.Service\Tgstation.Server.Host.Service.csproj" />
<ProjectReference Include="..\..\src\Tgstation.Server.Host.Watchdog\Tgstation.Server.Host.Watchdog.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Tgstation.Server.Host.Service\Tgstation.Server.Host.Service.csproj">
<Project>{29927416-3b78-49a7-a560-5ccaa638b6b4}</Project>
<Name>Tgstation.Server.Host.Service</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Tgstation.Server.Host.Watchdog\Tgstation.Server.Host.Watchdog.csproj">
<Project>{5d2d682c-6bf0-439c-850b-6ab945bbeaea}</Project>
<Name>Tgstation.Server.Host.Watchdog</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.EventLog">
<Version>2.1.1</Version>
</PackageReference>
<PackageReference Include="Moq">
<Version>4.10.0</Version>
</PackageReference>
<PackageReference Include="MSTest.TestAdapter">
<Version>1.3.2</Version>
</PackageReference>
<PackageReference Include="MSTest.TestFramework">
<Version>1.3.2</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
+3 -2
View File
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2036
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DA32568D-1D8D-4A4C-9943-BFD3CE796B3F}"
ProjectSection(SolutionItems) = preProject
@@ -31,6 +31,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{6FF654E6
build\tgs.docker.sh = build\tgs.docker.sh
build\tgs.ico = build\tgs.ico
build\UploadCoverage.ps1 = build\UploadCoverage.ps1
build\Version.props = build\Version.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tgstation.Server.Host", "src\Tgstation.Server.Host\Tgstation.Server.Host.csproj", "{2B69AD6D-2B5A-4023-8EAD-0BD1B18E028A}"