Skip to content

Commit 8fc0664

Browse files
committed
Modify Csc & Vbc in XamlPreCompile
These are the adjustments to the standard Csc invocation that we want to apply to this precompilation process. Most important are the OutputAssembly adjustment (to avoid overwriting final output) and SkipAnalyzers=true (for performance and warning deduplication).
1 parent 18671e8 commit 8fc0664

File tree

2 files changed

+17
-21
lines changed

2 files changed

+17
-21
lines changed

src/Tasks/Microsoft.CSharp.CurrentVersion.targets

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ Copyright (C) Microsoft Corporation. All rights reserved.
247247
ChecksumAlgorithm="$(ChecksumAlgorithm)"
248248
CodeAnalysisRuleSet="$(ResolvedCodeAnalysisRuleSet)"
249249
CodePage="$(CodePage)"
250-
DebugType="$(DebugType)"
250+
DebugType="none"
251251
DefineConstants="$(DefineConstants)"
252252
DelaySign="$(DelaySign)"
253253
DisabledWarnings="$(NoWarn)"
254254
DisableSdkPath="$(DisableSdkPath)"
255255
DocumentationFile="@(DocFileItem)"
256-
EmbedAllSources="$(EmbedAllSources)"
256+
EmbedAllSources="false"
257257
EmbeddedFiles="@(EmbeddedFiles)"
258258
EmitDebugInformation="$(DebugSymbols)"
259259
EnvironmentVariables="$(CscEnvironment)"
@@ -281,23 +281,23 @@ Copyright (C) Microsoft Corporation. All rights reserved.
281281
Optimize="$(Optimize)"
282282
Deterministic="$(Deterministic)"
283283
PublicSign="$(PublicSign)"
284-
OutputAssembly="@(IntermediateAssembly)"
285-
OutputRefAssembly="@(IntermediateRefAssembly)"
286-
PdbFile="$(PdbFile)"
284+
OutputAssembly="@(XamlIntermediateAssembly)"
285+
OutputRefAssembly=""
286+
PdbFile=""
287287
Platform="$(PlatformTarget)"
288288
Prefer32Bit="$(Prefer32Bit)"
289289
PreferredUILang="$(PreferredUILang)"
290290
ProjectName="$(MSBuildProjectName)"
291291
ProvideCommandLineArgs="$(ProvideCommandLineArgs)"
292-
References="@(ReferencePathWithRefAssemblies)"
293-
RefOnly="$(ProduceOnlyReferenceAssembly)"
292+
References="@(ReferencePath)"
293+
RefOnly="false"
294294
ReportAnalyzer="$(ReportAnalyzer)"
295295
ReportIVTs="$(ReportIVTs)"
296296
Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)"
297297
ResponseFiles="$(CompilerResponseFile)"
298298
RuntimeMetadataVersion="$(RuntimeMetadataVersion)"
299299
SharedCompilationId="$(SharedCompilationId)"
300-
SkipAnalyzers="$(_SkipAnalyzers)"
300+
SkipAnalyzers="true"
301301
SkipCompilerExecution="$(SkipCompilerExecution)"
302302
Sources="@(Compile)"
303303
SubsystemVersion="$(SubsystemVersion)"
@@ -317,9 +317,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
317317
Win32Manifest="$(Win32Manifest)"
318318
Win32Resource="$(Win32Resource)"
319319
PathMap="$(PathMap)"
320-
SourceLink="$(SourceLink)">
321-
<Output TaskParameter="CommandLineArgs" ItemName="CscCommandLineArgs" />
322-
</Csc>
320+
SourceLink="$(SourceLink)" />
323321

324322
<!-- Only Applicable to the regular CoreCompile:
325323
<ItemGroup>

src/Tasks/Microsoft.VisualBasic.CurrentVersion.targets

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,13 @@ Copyright (C) Microsoft Corporation. All rights reserved.
237237
ChecksumAlgorithm="$(ChecksumAlgorithm)"
238238
CodeAnalysisRuleSet="$(ResolvedCodeAnalysisRuleSet)"
239239
CodePage="$(CodePage)"
240-
DebugType="$(DebugType)"
240+
DebugType="none"
241241
DefineConstants="$(FinalDefineConstants)"
242242
DelaySign="$(DelaySign)"
243243
DisableSdkPath="$(DisableSdkPath)"
244244
DisabledWarnings="$(NoWarn)"
245245
DocumentationFile="@(DocFileItem)"
246-
EmbedAllSources="$(EmbedAllSources)"
246+
EmbedAllSources="false"
247247
EmbeddedFiles="@(EmbeddedFiles)"
248248
EmitDebugInformation="$(DebugSymbols)"
249249
EnvironmentVariables="$(VbcEnvironment)"
@@ -275,16 +275,16 @@ Copyright (C) Microsoft Corporation. All rights reserved.
275275
OptionInfer="$(OptionInfer)"
276276
OptionStrict="$(OptionStrict)"
277277
OptionStrictType="$(OptionStrictType)"
278-
OutputAssembly="@(IntermediateAssembly)"
279-
OutputRefAssembly="@(IntermediateRefAssembly)"
280-
PdbFile="$(PdbFile)"
278+
OutputAssembly="@(XamlIntermediateAssembly)"
279+
OutputRefAssembly=""
280+
PdbFile=""
281281
Platform="$(PlatformTarget)"
282282
Prefer32Bit="$(Prefer32Bit)"
283283
PreferredUILang="$(PreferredUILang)"
284284
ProjectName="$(MSBuildProjectName)"
285285
ProvideCommandLineArgs="$(ProvideCommandLineArgs)"
286-
References="@(ReferencePathWithRefAssemblies)"
287-
RefOnly="$(ProduceOnlyReferenceAssembly)"
286+
References="@(ReferencePath)"
287+
RefOnly="false"
288288
RemoveIntegerChecks="$(RemoveIntegerChecks)"
289289
ReportAnalyzer="$(ReportAnalyzer)"
290290
ReportIVTs="$(ReportIVTs)"
@@ -317,9 +317,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
317317
Win32Resource="$(Win32Resource)"
318318
VBRuntime="$(VBRuntime)"
319319
PathMap="$(PathMap)"
320-
SourceLink="$(SourceLink)">
321-
<Output TaskParameter="CommandLineArgs" ItemName="VbcCommandLineArgs" />
322-
</Vbc>
320+
SourceLink="$(SourceLink)" />
323321

324322
<!-- Only Applicable to the regular CoreCompile:
325323
<ItemGroup>

0 commit comments

Comments
 (0)