Ei kuvausta
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Microsoft.VisualBasic.Core.targets 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
  3. <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  4. <Target Name="ShimReferencePathsWhenCommonTargetsDoesNotUnderstandReferenceAssemblies"
  5. BeforeTargets="CoreCompile"
  6. Condition="'@(ReferencePathWithRefAssemblies)' == ''">
  7. <!-- Common targets should populate this item from dev15.3, but this file
  8. may be used (via NuGet package) on earlier MSBuilds. If the
  9. adjusted-for-reference-assemblies item is not populated, just use
  10. the older item's contents. -->
  11. <ItemGroup>
  12. <ReferencePathWithRefAssemblies Include="@(ReferencePath)" />
  13. </ItemGroup>
  14. </Target>
  15. <Target Name="CoreCompile"
  16. Inputs="$(MSBuildAllProjects);
  17. @(Compile);
  18. @(_CoreCompileResourceInputs);
  19. $(ApplicationIcon);
  20. $(AssemblyOriginatorKeyFile);
  21. @(ReferencePathWithRefAssemblies);
  22. @(CompiledLicenseFile);
  23. @(LinkResource);
  24. @(EmbeddedDocumentation);
  25. $(Win32Resource);
  26. $(Win32Manifest);
  27. @(CustomAdditionalCompileInputs);
  28. $(ResolvedCodeAnalysisRuleSet);
  29. @(AdditionalFiles);
  30. @(EmbeddedFiles)"
  31. Outputs="@(DocFileItem);
  32. @(IntermediateAssembly);
  33. @(IntermediateRefAssembly);
  34. @(_DebugSymbolsIntermediatePath);
  35. $(NonExistentFile);
  36. @(CustomAdditionalCompileOutputs)"
  37. Returns="@(VbcCommandLineArgs)"
  38. DependsOnTargets="$(CoreCompileDependsOn)">
  39. <PropertyGroup>
  40. <_NoWarnings Condition="'$(WarningLevel)' == '0'">true</_NoWarnings>
  41. <_NoWarnings Condition="'$(WarningLevel)' == '1'">false</_NoWarnings>
  42. </PropertyGroup>
  43. <PropertyGroup>
  44. <!-- If we are targeting winmdobj we want to specifically the pdbFile property since we do not want it to collide with the output of winmdexp-->
  45. <PdbFile Condition="'$(PdbFile)' == '' AND '$(OutputType)' == 'winmdobj' AND '$(DebugSymbols)' == 'true'">$(IntermediateOutputPath)$(TargetName).compile.pdb</PdbFile>
  46. </PropertyGroup>
  47. <ItemGroup Condition="'$(TargetingClr2Framework)' == 'true'">
  48. <ReferencePathWithRefAssemblies>
  49. <EmbedInteropTypes />
  50. </ReferencePathWithRefAssemblies>
  51. </ItemGroup>
  52. <!-- Prefer32Bit was introduced in .NET 4.5. Set it to false if we are targeting 4.0 -->
  53. <PropertyGroup Condition="('$(TargetFrameworkVersion)' == 'v4.0')">
  54. <Prefer32Bit>false</Prefer32Bit>
  55. </PropertyGroup>
  56. <!-- TODO: Remove this ItemGroup once it has been moved to "_GenerateCompileInputs" target in Microsoft.Common.CurrentVersion.targets.
  57. https://github.com/dotnet/roslyn/issues/12223 -->
  58. <ItemGroup Condition="('$(AdditionalFileItemNames)' != '')">
  59. <AdditionalFileItems Include="$(AdditionalFileItemNames)" />
  60. <AdditionalFiles Include="@(%(AdditionalFileItems.Identity))" />
  61. </ItemGroup>
  62. <PropertyGroup Condition="'$(UseSharedCompilation)' == ''">
  63. <UseSharedCompilation>true</UseSharedCompilation>
  64. </PropertyGroup>
  65. <!-- Condition is to filter out the _CoreCompileResourceInputs so that it doesn't pass in culture resources to the compiler -->
  66. <Vbc Condition="'%(_CoreCompileResourceInputs.WithCulture)' != 'true'"
  67. AdditionalLibPaths="$(AdditionalLibPaths)"
  68. AddModules="@(AddModules)"
  69. AdditionalFiles="@(AdditionalFiles)"
  70. Analyzers="@(Analyzer)"
  71. BaseAddress="$(BaseAddress)"
  72. ChecksumAlgorithm="$(ChecksumAlgorithm)"
  73. CodeAnalysisRuleSet="$(ResolvedCodeAnalysisRuleSet)"
  74. CodePage="$(CodePage)"
  75. DebugType="$(DebugType)"
  76. DefineConstants="$(FinalDefineConstants)"
  77. DelaySign="$(DelaySign)"
  78. DisabledWarnings="$(NoWarn)"
  79. DocumentationFile="@(DocFileItem)"
  80. EmbeddedFiles="@(EmbeddedFiles)"
  81. EmitDebugInformation="$(DebugSymbols)"
  82. EnvironmentVariables="$(VbcEnvironment)"
  83. ErrorLog="$(ErrorLog)"
  84. ErrorReport="$(ErrorReport)"
  85. Features="$(Features)"
  86. FileAlignment="$(FileAlignment)"
  87. GenerateDocumentation="$(GenerateDocumentation)"
  88. HighEntropyVA="$(HighEntropyVA)"
  89. Imports="@(Import)"
  90. Instrument="$(Instrument)"
  91. KeyContainer="$(KeyContainerName)"
  92. KeyFile="$(KeyOriginatorFile)"
  93. LangVersion="$(LangVersion)"
  94. LinkResources="@(LinkResource)"
  95. MainEntryPoint="$(StartupObject)"
  96. ModuleAssemblyName="$(ModuleAssemblyName)"
  97. NoConfig="true"
  98. NoStandardLib="$(NoCompilerStandardLib)"
  99. NoVBRuntimeReference="$(NoVBRuntimeReference)"
  100. NoWarnings="$(_NoWarnings)"
  101. NoWin32Manifest="$(NoWin32Manifest)"
  102. Optimize="$(Optimize)"
  103. Deterministic="$(Deterministic)"
  104. PublicSign="$(PublicSign)"
  105. OptionCompare="$(OptionCompare)"
  106. OptionExplicit="$(OptionExplicit)"
  107. OptionInfer="$(OptionInfer)"
  108. OptionStrict="$(OptionStrict)"
  109. OptionStrictType="$(OptionStrictType)"
  110. OutputAssembly="@(IntermediateAssembly)"
  111. OutputRefAssembly="@(IntermediateRefAssembly)"
  112. PdbFile="$(PdbFile)"
  113. Platform="$(PlatformTarget)"
  114. Prefer32Bit="$(Prefer32Bit)"
  115. PreferredUILang="$(PreferredUILang)"
  116. ProvideCommandLineArgs="$(ProvideCommandLineArgs)"
  117. References="@(ReferencePathWithRefAssemblies)"
  118. RemoveIntegerChecks="$(RemoveIntegerChecks)"
  119. ReportAnalyzer="$(ReportAnalyzer)"
  120. Resources="@(_CoreCompileResourceInputs);@(CompiledLicenseFile)"
  121. ResponseFiles="$(CompilerResponseFile)"
  122. RootNamespace="$(RootNamespace)"
  123. RuntimeMetadataVersion="$(RuntimeMetadataVersion)"
  124. SdkPath="$(FrameworkPathOverride)"
  125. SkipCompilerExecution="$(SkipCompilerExecution)"
  126. Sources="@(Compile)"
  127. SubsystemVersion="$(SubsystemVersion)"
  128. TargetCompactFramework="$(TargetCompactFramework)"
  129. TargetType="$(OutputType)"
  130. ToolExe="$(VbcToolExe)"
  131. ToolPath="$(VbcToolPath)"
  132. TreatWarningsAsErrors="$(TreatWarningsAsErrors)"
  133. UseHostCompilerIfAvailable="$(UseHostCompilerIfAvailable)"
  134. UseSharedCompilation="$(UseSharedCompilation)"
  135. Utf8Output="$(Utf8Output)"
  136. VBRuntimePath="$(VBRuntimePath)"
  137. Verbosity="$(VbcVerbosity)"
  138. VsSessionGuid="$(VsSessionGuid)"
  139. WarningsAsErrors="$(WarningsAsErrors)"
  140. WarningsNotAsErrors="$(WarningsNotAsErrors)"
  141. Win32Icon="$(ApplicationIcon)"
  142. Win32Manifest="$(Win32Manifest)"
  143. Win32Resource="$(Win32Resource)"
  144. VBRuntime="$(VBRuntime)"
  145. PathMap="$(PathMap)"
  146. SourceLink="$(SourceLink)">
  147. <Output TaskParameter="CommandLineArgs" ItemName="VbcCommandLineArgs" />
  148. </Vbc>
  149. <ItemGroup>
  150. <_CoreCompileResourceInputs Remove="@(_CoreCompileResourceInputs)" />
  151. </ItemGroup>
  152. <CallTarget Targets="$(TargetsTriggeredByCompilation)" Condition="'$(TargetsTriggeredByCompilation)' != ''" />
  153. </Target>
  154. </Project>