summaryrefslogtreecommitdiff
path: root/src/System.Private.CoreLib/GenerateCompilerResponseFile.targets
blob: 3801c76c0d24a136743734f566f7200ab1c0e4ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  
  <PropertyGroup>
    <CompileDependsOn>GenerateCompilerResponseFile;$(CompileDependsOn)</CompileDependsOn>
  </PropertyGroup>

  <Target Name="GenerateCompilerResponseFile">
    <PropertyGroup>
      <GeneratedCompilerResponseFile>$(IntermediateOutputPath)/moduleName.$(AssemblyName).rsp</GeneratedCompilerResponseFile>
    </PropertyGroup>

    <Message Text="Generating module name response file: $(GeneratedCompilerResponseFile)" />

    <!-- We need to set the runtimemetadataversion -->
    <WriteLinesToFile File="$(GeneratedCompilerResponseFile)"
                      Lines="/runtimemetadataversion:v4.0.30319"
                      Overwrite="true" />

    <ItemGroup>
      <Clean Include="$(GeneratedCompilerResponseFile)" />
    </ItemGroup>
    <PropertyGroup>
      <CompilerResponseFile>$(GeneratedCompilerResponseFile);$(CompilerResponseFile)</CompilerResponseFile>
    </PropertyGroup>
  </Target>
</Project>