New: Treat compile warnings as errors

pull/6/head
ta264 5 years ago
parent cdf8b1cb5d
commit b0adb2035e

@ -1,6 +1,8 @@
<Project> <Project>
<!-- Common to all Lidarr Projects --> <!-- Common to all Lidarr Projects -->
<PropertyGroup> <PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LidarrRootDir>$(MSBuildThisFileDirectory)..\</LidarrRootDir> <LidarrRootDir>$(MSBuildThisFileDirectory)..\</LidarrRootDir>
<!-- Specifies the type of output --> <!-- Specifies the type of output -->
@ -63,6 +65,7 @@
<Deterministic Condition="$(AssemblyVersion.EndsWith('*'))">False</Deterministic> <Deterministic Condition="$(AssemblyVersion.EndsWith('*'))">False</Deterministic>
</PropertyGroup> </PropertyGroup>
<!-- Set the AssemblyConfiguration attribute for projects --> <!-- Set the AssemblyConfiguration attribute for projects -->
<ItemGroup Condition="'$(LidarrProject)'=='true'"> <ItemGroup Condition="'$(LidarrProject)'=='true'">
<AssemblyAttribute Include="System.Reflection.AssemblyConfigurationAttribute"> <AssemblyAttribute Include="System.Reflection.AssemblyConfigurationAttribute">

@ -51,7 +51,10 @@ namespace NzbDrone.Core.Notifications.Email
private void Send(MailMessage email, string server, int port, bool ssl, NetworkCredential credentials) private void Send(MailMessage email, string server, int port, bool ssl, NetworkCredential credentials)
{ {
//TODO: This is marked obsolete in mono, will not be necessary once we build with net core instead
#pragma warning disable CS0618
var smtp = new SmtpClient(server, port); var smtp = new SmtpClient(server, port);
#pragma warning restore CS0618
smtp.EnableSsl = ssl; smtp.EnableSsl = ssl;
smtp.Credentials = credentials; smtp.Credentials = credentials;

Loading…
Cancel
Save