Use pre-built serialization assembly to avoid launching CS compiler,

which was triggering some anti-virus software.
This commit is contained in:
Grigory Chudov
2018-02-10 17:34:30 -05:00
parent 8cedc982a6
commit 6231a6f770
2 changed files with 8 additions and 1 deletions

View File

@@ -42,6 +42,7 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<GenerateSerializationAssemblies>On</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -51,8 +52,13 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<GenerateSerializationAssemblies>On</GenerateSerializationAssemblies>
</PropertyGroup>
<ItemGroup>
<Reference Include="CUETools.CTDB.XmlSerializers, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\bin\Release\interop\EAC\CUETools.CTDB.XmlSerializers.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Management" />

View File

@@ -98,7 +98,8 @@ namespace CUETools.CTDB
this.QueryExceptionMessage = resp.StatusDescription;
if (this.QueryResponseStatus == HttpStatusCode.OK)
{
XmlSerializer serializer = new XmlSerializer(typeof(CTDBResponse));
// XmlSerializer serializer = new XmlSerializer(typeof(CTDBResponse));
XmlSerializer serializer = new Microsoft.Xml.Serialization.GeneratedAssembly.CTDBResponseSerializer();
this.total = 0;
using (Stream responseStream = resp.GetResponseStream())
{