Welcome to mirror list, hosted at ThFree Co, Russian Federation.

packages.targets « packaging « src - github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f362e52cd8ac5041a6cbd2c39ab42a5d8ff4a132 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <Target Name="BuildNuGetPackages" AfterTargets="Build">
        <!-- Property needed for creating nupkgs -->
        <PropertyGroup>
            <ToolchainMilestone Condition="'$(ToolchainMilestone)'==''">prerelease</ToolchainMilestone>
            <ToolchainVersion>1.0.6-$(ToolchainMilestone)-00003</ToolchainVersion>
            <RuntimeSdkVersion>$(ToolchainVersion)</RuntimeSdkVersion>

            <ToolchainPackageName>Microsoft.DotNet.ILCompiler</ToolchainPackageName>

            <RuntimeSdkPackageNameSuffix Condition="'$(Configuration)'=='Debug'">.Debug</RuntimeSdkPackageNameSuffix>
            <RuntimeSdkPackageName>Microsoft.DotNet.ILCompiler.SDK$(RuntimeSdkPackageNameSuffix)</RuntimeSdkPackageName>

            <!-- Uniqify package name per machine-local DNX cache for development purposes -->
            <BuildUid>$([System.Guid]::NewGuid().ToString().Replace('-', '').Substring(0, 8))</BuildUid>

            <ToolchainPackageName Condition="'$(ToolchainMilestone)'=='testing'">$(ToolchainPackageName).$(BuildUid)</ToolchainPackageName>
            <RuntimeSdkPackageName Condition="'$(ToolchainMilestone)'=='testing'">$(RuntimeSdkPackageName).$(BuildUid)</RuntimeSdkPackageName>

            <LibPrefix Condition="'$(OsEnvironment)'!='Windows_NT'">lib</LibPrefix>
            <StaticLibExt Condition="'$(OsEnvironment)'=='Windows_NT'">lib</StaticLibExt>
            <StaticLibExt Condition="'$(OsEnvironment)'!='Windows_NT'">a</StaticLibExt>

            <CoreFxPackageVersion>4.4.0-beta-24913-02</CoreFxPackageVersion>
            <NetCoreAppPackageVersion>2.0.0-beta-001368-00</NetCoreAppPackageVersion>

            <JitPackageVersion>1.2.0-beta-24911-02</JitPackageVersion>

            <ObjectWriterPackageVersion>1.0.13-prerelease-00001</ObjectWriterPackageVersion>
            <ObjectWriterNuPkgRid Condition="'$(OSGroup)'=='Linux'">ubuntu.14.04-x64</ObjectWriterNuPkgRid>
            <ObjectWriterNuPkgRid Condition="'$(ObjectWriterNuPkgRid)'==''">$(NuPkgRid)</ObjectWriterNuPkgRid>
        </PropertyGroup>
        <ItemGroup>
            <!-- IL.Compiler target files -->
            <ILCompilerFiles Include="ilc.exe" />
            <ILCompilerFiles Include="ILCompiler.Compiler.dll" />
            <ILCompilerFiles Include="ILCompiler.DependencyAnalysisFramework.dll" />
            <ILCompilerFiles Include="ILCompiler.MetadataTransform.dll" />
            <ILCompilerFiles Include="ILCompiler.MetadataWriter.dll" />
            <ILCompilerFiles Include="ILCompiler.TypeSystem.dll" />
            <ILCompilerBinPlace Include="@(ILCompilerFiles)">
                <Text><![CDATA[        <file src="$(RelativeProductBinDir)/ILCompiler/%(Identity)" target="runtimes/any/lib/dotnet/%(Identity)" /> ]]></Text>
            </ILCompilerBinPlace>

            <ILCompilerNativeFiles Include="jitinterface.dll" Condition="'$(OSGroup)'=='Windows_NT'" />
            <ILCompilerNativeFiles Include="jitinterface.so" Condition="'$(OSGroup)'=='Linux'" />
            <ILCompilerNativeFiles Include="jitinterface.dylib" Condition="'$(OSGroup)'=='OSX'" />
            <ILCompilerBinPlace Include="@(ILCompilerNativeFiles)">
                <Text><![CDATA[        <file src="$(RelativeProductBinDir)/%(Identity)" target="runtimes/$(NuPkgRid)/native/%(Identity)" /> ]]></Text>
            </ILCompilerBinPlace>

            <!-- Repackage the JIT dynamic library used for AOT compilation with ilc suffix to avoid colliding with the one used to run the toolchain -->
            <!-- TODO: Publish the JIT dynamic library in a sub-directory under the original name instead? -->
            <ILCompilerRepackageJitFiles Include="clrjit.dll" Condition="'$(OSGroup)'=='Windows_NT'" />
            <ILCompilerRepackageJitFiles Include="libclrjit.so" Condition="'$(OSGroup)'=='Linux'" />
            <ILCompilerRepackageJitFiles Include="libclrjit.dylib" Condition="'$(OSGroup)'=='OSX'" />
            <ILCompilerBinPlace Include="@(ILCompilerRepackageJitFiles)">
                <Text><![CDATA[        <file src="packages/runtime.$(NuPkgRid).Microsoft.NETCore.Jit/$(JitPackageVersion)/runtimes/$(NuPkgRid)/native/%(Identity)" target="runtimes/$(NuPkgRid)/native/%(Filename)ilc%(Extension)" /> ]]></Text>
            </ILCompilerBinPlace>

            <!-- Repackage the ObjectWriter dynamic library to workaround missing Ubuntu 16.04 build -->
            <!-- TODO: Publish the Ubuntu 16.04 build -->
            <ILCompilerRepackageObjectWriterFiles Include="objwriter.dll" Condition="'$(OSGroup)'=='Windows_NT'" />
            <ILCompilerRepackageObjectWriterFiles Include="libobjwriter.so" Condition="'$(OSGroup)'=='Linux'" />
            <ILCompilerRepackageObjectWriterFiles Include="libobjwriter.dylib" Condition="'$(OSGroup)'=='OSX'" />
            <ILCompilerBinPlace Include="@(ILCompilerRepackageObjectWriterFiles)">
              <Text><![CDATA[        <file src="packages/toolchain.$(ObjectWriterNuPkgRid).Microsoft.DotNet.ObjectWriter/$(ObjectWriterPackageVersion)/runtimes/$(ObjectWriterNuPkgRid)/native/%(Identity)" target="runtimes/$(NuPkgRid)/native/%(Identity)" /> ]]></Text>
            </ILCompilerBinPlace>

            <ILCompilerContentFiles Include="BuildIntegration/Microsoft.NETCore.Native.targets" />
            <ILCompilerContentFiles Include="BuildIntegration/Microsoft.NETCore.Native.Windows.props" />
            <ILCompilerContentFiles Include="BuildIntegration/Microsoft.NETCore.Native.Unix.props" />
            <ILCompilerBinPlace Include="@(ILCompilerContentFiles)">
                <Text><![CDATA[        <file src="src/%(Identity)" target="runtimes/$(NuPkgRid)/native/%(Filename)%(Extension)" /> ]]></Text>
            </ILCompilerBinPlace>

            <!-- IL.Compiler.SDK target files -->
            <ILCompilerSdkFiles Include="Runtime" />
            <ILCompilerSdkFiles Include="PortableRuntime" />
            <ILCompilerSdkFiles Include="bootstrapper" />
            <ILCompilerSdkFiles Include="bootstrappercpp" />
            <ILCompilerSdkFiles Include="System.Private.CoreLib.Native" Condition="'$(OsEnvironment)'!='Windows_NT'" />

            <!-- ILCompiler.SDK Cpp Codegen support files -->
            <ILCompilerSdkCppCodegenFiles Include="Native/Bootstrap/common.h" />
            <ILCompilerSdkCppCodegenFiles Include="Native/Bootstrap/CppCodeGen.h" />

            <ILCompilerSdkFilesManaged Include="System.Private.CoreLib" />
            <ILCompilerSdkFilesManaged Include="System.Private.DeveloperExperience.Console" />
            <ILCompilerSdkFilesManaged Include="System.Private.Interop" />
            <ILCompilerSdkFilesManaged Include="System.Private.Reflection" />
            <ILCompilerSdkFilesManaged Include="System.Private.Reflection.Core" />
            <ILCompilerSdkFilesManaged Include="System.Private.Reflection.Execution" />
            <ILCompilerSdkFilesManaged Include="System.Private.Reflection.Metadata" />
            <ILCompilerSdkFilesManaged Include="System.Private.StackTraceGenerator" />
            <ILCompilerSdkFilesManaged Include="System.Private.Threading" />
            <ILCompilerSdkFilesManaged Include="System.Private.TypeLoader" />

            <ILCompilerSdkBinPlace Include="@(ILCompilerSdkFiles)">
                <Text><![CDATA[        <file src="$(RelativeProductBinDir)/lib/$(LibPrefix)%(Identity).$(StaticLibExt)" target="runtimes/$(NuPkgRid)/native/sdk/$(LibPrefix)%(Identity).$(StaticLibExt)" /> ]]></Text>
            </ILCompilerSdkBinPlace>
            <ILCompilerSdkBinPlace Include="@(ILCompilerSdkFiles)" Condition="'$(OsEnvironment)'=='Windows_NT'">
                <Text><![CDATA[        <file src="$(RelativeProductBinDir)/lib/$(LibPrefix)%(Identity).pdb" target="runtimes/$(NuPkgRid)/native/sdk/$(LibPrefix)%(Identity).pdb" /> ]]></Text>
            </ILCompilerSdkBinPlace>

            <ILCompilerSdkBinPlace Include="@(ILCompilerSdkFilesManaged)">
                <Text><![CDATA[        <file src="$(RelativeProductBinDir)/%(Identity)/%(Identity).dll" target="runtimes/$(NuPkgRid)/native/sdk/%(Identity).dll" /> ]]></Text>
            </ILCompilerSdkBinPlace>
            <ILCompilerSdkBinPlace Include="@(ILCompilerSdkCppCodegenFiles)">
                <Text><![CDATA[        <file src="src/%(Identity)" target="runtimes/$(NuPkgRid)/native/inc/%(Filename)%(Extension)" /> ]]></Text>
            </ILCompilerSdkBinPlace>

            <!-- Repackage the CoreCLR framework -->
            <!-- TODO: Obtain this via nuget once the framework is properly packaged -->
            <ILCompilerAnyFrameworkFiles Include="Microsoft.Win32.Primitives" />
            <ILCompilerAnyFrameworkFiles Include="mscorlib" />
            <ILCompilerAnyFrameworkFiles Include="System.Buffers" />
            <ILCompilerAnyFrameworkFiles Include="System.Collections.Concurrent" />
            <ILCompilerAnyFrameworkFiles Include="System.Collections.NonGeneric" />
            <ILCompilerAnyFrameworkFiles Include="System.Console" />
            <ILCompilerAnyFrameworkFiles Include="System.Diagnostics.Tools" />
            <ILCompilerAnyFrameworkFiles Include="System.Globalization" />
            <ILCompilerAnyFrameworkFiles Include="System.Globalization.Calendars" />
            <ILCompilerAnyFrameworkFiles Include="System.IO" />
            <ILCompilerAnyFrameworkFiles Include="System.IO.FileSystem" />
            <ILCompilerAnyFrameworkFiles Include="System.IO.FileSystem.Primitives" />
            <ILCompilerAnyFrameworkFiles Include="System.Reflection" />
            <ILCompilerAnyFrameworkFiles Include="System.Reflection.Extensions" />
            <ILCompilerAnyFrameworkFiles Include="System.Reflection.TypeExtensions" />
            <ILCompilerAnyFrameworkFiles Include="System.Resources.ResourceManager" />
            <ILCompilerAnyFrameworkFiles Include="System.Runtime.Handles" />
            <ILCompilerAnyFrameworkFiles Include="System.Runtime.InteropServices.RuntimeInformation" />
            <ILCompilerAnyFrameworkFiles Include="System.Runtime.Numerics" />
            <ILCompilerAnyFrameworkFiles Include="System.Security.Principal" />
            <ILCompilerAnyFrameworkFiles Include="System.Text.Encoding" />
            <ILCompilerAnyFrameworkFiles Include="System.Text.Encoding.Extensions" />
            <ILCompilerAnyFrameworkFiles Include="System.Threading.Overlapped" />
            <ILCompilerAnyFrameworkFiles Include="System.Threading.Thread" />
            <ILCompilerAnyFrameworkFiles Include="System.Threading.Timer" />
            <ILCompilerSdkBinPlace Include="@(ILCompilerAnyFrameworkFiles)">
              <Text><![CDATA[        <file src="packages/runtime.$(NuPkgRid).Microsoft.NETCore.App/$(NetCoreAppPackageVersion)/runtimes/$(NuPkgRid)/lib/netcoreapp2.0/%(Identity).dll" target="runtimes/$(NuPkgRid)/native/framework/%(Identity).dll" /> ]]></Text>
            </ILCompilerSdkBinPlace>

            <!-- Libraries with netcoreapp1.2corert configuration -->
            <ILCompilerFrameworkFiles Include="runtime.win7.System.Private.Uri/$(CoreFxPackageVersion)/runtimes/win-corert/lib/netcoreapp1.2/System.Private.Uri.dll" Condition="'$(OsEnvironment)'=='Windows_NT'" />
            <ILCompilerFrameworkFiles Include="runtime.unix.System.Private.Uri/$(CoreFxPackageVersion)/runtimes/unix-corert/lib/netcoreapp1.2/System.Private.Uri.dll" Condition="'$(OsEnvironment)'!='Windows_NT'" />
            <ILCompilerFrameworkFiles Include="runtime.any.System.Runtime/$(CoreFxPackageVersion)/runtimes/corert/lib/netcoreapp1.2/System.Runtime.dll" />
            <ILCompilerFrameworkFiles Include="runtime.win.System.Runtime.Extensions/$(CoreFxPackageVersion)/runtimes/win-corert/lib/netcoreapp1.2/System.Runtime.Extensions.dll" Condition="'$(OsEnvironment)'=='Windows_NT'" />
            <ILCompilerFrameworkFiles Include="runtime.unix.System.Runtime.Extensions/$(CoreFxPackageVersion)/runtimes/unix-corert/lib/netcoreapp1.2/System.Runtime.Extensions.dll" Condition="'$(OsEnvironment)'!='Windows_NT'" />
            <ILCompilerFrameworkFiles Include="runtime.any.System.Reflection.Primitives/$(CoreFxPackageVersion)/runtimes/corert/lib/netcoreapp1.2/System.Reflection.Primitives.dll" />
            <ILCompilerFrameworkFiles Include="runtime.any.System.Runtime.InteropServices/$(CoreFxPackageVersion)/runtimes/corert/lib/netcoreapp1.2/System.Runtime.InteropServices.dll" />
            <ILCompilerFrameworkFiles Include="runtime.any.System.Threading.Tasks/$(CoreFxPackageVersion)/runtimes/corert/lib/netcoreapp1.2/System.Threading.Tasks.dll" />
            <ILCompilerFrameworkFiles Include="runtime.any.System.Collections/$(CoreFxPackageVersion)/runtimes/corert/lib/netcoreapp1.2/System.Collections.dll" />
            <ILCompilerFrameworkFiles Include="runtime.win.System.Diagnostics.Debug/$(CoreFxPackageVersion)/runtimes/win-corert/lib/netcoreapp1.2/System.Diagnostics.Debug.dll" Condition="'$(OsEnvironment)'=='Windows_NT'" />
            <ILCompilerFrameworkFiles Include="runtime.unix.System.Diagnostics.Debug/$(CoreFxPackageVersion)/runtimes/unix-corert/lib/netcoreapp1.2/System.Diagnostics.Debug.dll" Condition="'$(OsEnvironment)'!='Windows_NT'"/>

            <!-- End: Libraries with netcoreapp1.2corert configuration -->

            <ILCompilerFrameworkFiles Include="runtime.aot.System.Diagnostics.Tracing/$(CoreFxPackageVersion)/runtimes/aot/lib/netcore50/System.Diagnostics.Tracing.dll" />

            <ILCompilerFrameworkFiles Include="System.Threading/$(CoreFxPackageVersion)/lib/netstandard1.7/System.Threading.dll" />

            <ILCompilerFrameworkFiles Include="System.Linq/$(CoreFxPackageVersion)/lib/netcore50/System.Linq.dll" />

            <ILCompilerFrameworkFiles Include="System.Runtime.CompilerServices.Unsafe/$(CoreFxPackageVersion)/lib/netstandard1.0/System.Runtime.CompilerServices.Unsafe.dll" />

            <ILCompilerFrameworkFiles Include="runtime.$(NuPkgRid).runtime.native.System/$(CoreFxPackageVersion)/runtimes/$(NuPkgRid)/native/System.Native.a" Condition="'$(OsEnvironment)'!='Windows_NT'" />

            <ILCompilerSdkBinPlace Include="@(ILCompilerFrameworkFiles)">
                <Text><![CDATA[        <file src="packages/%(Identity)" target="runtimes/$(NuPkgRid)/native/framework/%(Filename)%(Extension)" /> ]]></Text>
            </ILCompilerSdkBinPlace>

            <!-- ILCompiler nuspec file -->
            <NuSpecFile Include="$(ToolchainPackageName)">
                <Stage>1</Stage>
                <Version>$(ToolchainVersion)</Version>
                <Title>Microsoft .NET Native Toolchain</Title>
                <Description>Provides the toolchain to compile managed code to native.</Description>
                <Files>@(ILCompilerBinPlace -> '%(Text)', '')</Files>
                <!-- TODO: Obtain this from project.lock.json -->
                <Dependencies><![CDATA[
        <dependency id="NETStandard.Library" version="1.6.0" />
        <dependency id="System.Collections.Immutable" version="1.2.0" />
        <dependency id="System.IO.MemoryMappedFiles" version="4.0.0" />
        <dependency id="System.Reflection.Metadata" version="1.4.1-beta-24227-04" />
        <dependency id="System.Runtime.CompilerServices.Unsafe" version="4.0.0" />
        <dependency id="System.Xml.ReaderWriter" version="4.0.11" />
        <dependency id="Microsoft.DiaSymReader" version="1.0.8" />
        <dependency id="System.CommandLine" version="0.1.0-e160909-1" />
                    ]]></Dependencies>
            </NuSpecFile>
            
            <!-- ILCompiler.SDK nuspec file -->
            <NuSpecFile Include="$(RuntimeSdkPackageName)">
                <Stage>1</Stage>
                <Version>$(RuntimeSdkVersion)</Version>
                <Title>Microsoft .NET Native Runtime SDK</Title>
                <Description>Provides the runtime and link libraries to compile managed code to native.</Description>
                <Files>@(ILCompilerSdkBinPlace -> '%(Text)', '')</Files>
                <Dependencies><![CDATA[
        <dependency id="$(ToolchainPackageName)" version="$(ToolchainVersion)"/>]]>
                </Dependencies>
            </NuSpecFile>
       
            <!-- A pair of platform and runtime package info per nuspec file -->
            <NuSpecFileGroup Include="@(NuSpecFile)">
                <Stage>%(Stage)</Stage>
                <RedirPackage>%(Identity)</RedirPackage>
                <Version>%(Version)</Version>
                <PlatformPackage>toolchain.$(NuPkgRid).%(Identity)</PlatformPackage>
                <NuSpecPackageMetadata><![CDATA[
    <version>%(Version)</version>
    <title>%(Title)</title>
    <authors>Microsoft</authors>
    <owners>Microsoft</owners>
    <licenseUrl>http://go.microsoft.com/fwlink/?LinkId=329770</licenseUrl>
    <projectUrl>https://github.com/dotnet/corert</projectUrl>
    <iconUrl>http://go.microsoft.com/fwlink/?LinkID=288859</iconUrl>
    <requireLicenseAcceptance>true</requireLicenseAcceptance>
    <description>%(Description)</description>
    <releaseNotes>Initial release</releaseNotes>
    <copyright>Copyright &#169%3B Microsoft Corporation</copyright>
    <dependencies>
        %(Dependencies)
    </dependencies>]]>
                </NuSpecPackageMetadata>
                <PlatformPkgFiles>%(Files)</PlatformPkgFiles>
            </NuSpecFileGroup>

            <!-- NuSpecCollection: A collection of NuSpecFileGroup -->
            <NuSpecCollection Include="@(NuSpecFileGroup)">
                <Stage>%(Stage)</Stage>
                <RuntimeJsonFile>$(ProductPackageDir)/%(RedirPackage).runtime.json</RuntimeJsonFile>
                <RuntimeJsonLines><![CDATA[
{
  "runtimes": {
    "win7-x64": {
      "%(RedirPackage)": {
        "toolchain.win7-x64.%(RedirPackage)": "%(Version)"
      }
    },
    "osx.10.10-x64": {
      "%(RedirPackage)": {
        "toolchain.osx.10.10-x64.%(RedirPackage)": "%(Version)"
      }
    },
    "ubuntu.14.04-x64": {
      "%(RedirPackage)": {
        "toolchain.ubuntu.14.04-x64.%(RedirPackage)": "%(Version)"
      }
    },
    "ubuntu.16.04-x64": {
      "%(RedirPackage)": {
        "toolchain.ubuntu.16.04-x64.%(RedirPackage)": "%(Version)"
      }
    }
  }
}]]>
                </RuntimeJsonLines>
                <RedirFile>$(ProductPackageDir)/%(RedirPackage).nuspec</RedirFile>
                <RedirLines><![CDATA[<?xml version="1.0"?>
<package>
  <metadata>
    <id>%(RedirPackage)</id>
    %(NuSpecPackageMetadata)
  </metadata>
  <files>
      <file src="$(RelativeProductBinDir)/packaging/%(RedirPackage).runtime.json" target="runtime.json"></file>
  </files>
</package>
]]>
                </RedirLines>
                <PlatformFile>$(ProductPackageDir)/%(PlatformPackage).nuspec</PlatformFile>
                <PlatformLines><![CDATA[<?xml version="1.0"?>
<package>
  <metadata>
    <id>%(PlatformPackage)</id>
    %(NuSpecPackageMetadata)
  </metadata>
  <files>
    %(PlatformPkgFiles)
  </files>
</package>
]]>
                </PlatformLines>
            </NuSpecCollection>
        </ItemGroup>

        <!-- Recreate the package dir -->
        <RemoveDir Directories="$(ProductPackageDir)" />
        <MakeDir Directories="$(ProductPackageDir)" Condition="!Exists('$(ProductPackageDir)')" />

        <!-- =================== stage1 ==================== -->
        <!-- Write the runtime.json redirection package and the runtime platform file -->
        <WriteLinesToFile File="%(NuSpecCollection.RuntimeJsonFile)" Lines="%(NuSpecCollection.RuntimeJsonLines)" Overwrite="true" Condition="'%(NuSpecCollection.Stage)'=='1'" />
        <WriteLinesToFile File="%(NuSpecCollection.PlatformFile)" Lines="%(NuSpecCollection.PlatformLines)" Overwrite="true" Condition="'%(NuSpecCollection.Stage)'=='1'" />
        <WriteLinesToFile File="%(NuSpecCollection.RedirFile)" Lines="%(NuSpecCollection.RedirLines)" Overwrite="true" Condition="'%(NuSpecCollection.Stage)'=='1'" />

        <ItemGroup>
            <Stage1NuSpecs Include="%(NuSpecCollection.PlatformFile)" Condition="'%(NuSpecCollection.Stage)'=='1'"  />
            <Stage1NuSpecs Include="%(NuSpecCollection.RedirFile)" Condition="'%(NuSpecCollection.Stage)'=='1'" />
        </ItemGroup>

        <NugetPack Nuspecs="%(Stage1NuSpecs.Identity)" OutputDirectory="$(ProductPackageDir)" BaseDirectory="$(RepoPath)" />

        <PropertyGroup>
            <Stage1ProjectDir>$(ProductPackageDir)stage1/</Stage1ProjectDir>
            <Stage1PublishDir>$(ProductPackageDir)publish1/</Stage1PublishDir>
            <Stage1ProjectJsonFile>$(Stage1ProjectDir)project.json</Stage1ProjectJsonFile>
            <Stage1ProjectJsonLines><![CDATA[
{
    "version": "1.0.0-*",

    "dependencies": {
        "NETStandard.Library": "1.6.0",
        "Microsoft.NETCore.Runtime.CoreCLR": "1.0.4",
        "Microsoft.NETCore.TestHost": "1.0.0",
        "toolchain.$(NuPkgRid).$(RuntimeSdkPackageName)": "$(RuntimeSdkVersion)",
    },

    "frameworks": {
        "dnxcore50": {
            "imports": [
                "netstandard1.6",
                "portable-net45+win8"
            ]
        }
    },

    "runtimes": {
        "$(NuPkgRid)": {},
    }
}]]>
            </Stage1ProjectJsonLines>
        </PropertyGroup>
        <MakeDir Directories="$(Stage1ProjectDir)" Condition="!Exists('$(Stage1ProjectDir)')" />
        <WriteLinesToFile File="$(Stage1ProjectJsonFile)" Lines="$(Stage1ProjectJsonLines)" Overwrite="true" />
        <WriteLinesToFile File="$(Stage1ProjectDir)/Program.cs" Lines="class Program { public static void Main() { } }" Overwrite="true" />
        <Exec Command="&quot;$(DnuToolPath)&quot; restore -s &quot;$(ProductPackageDir)&quot; $(DnuRestoreSource) &quot;$(Stage1ProjectDir)&quot;" />
        <Exec Command="&quot;$(DnuToolPath)&quot; publish &quot;$(Stage1ProjectDir)&quot; --native-subdirectory -o &quot;$(Stage1PublishDir)&quot; -f &quot;dnxcore50&quot; --runtime &quot;$(NuPkgRid)&quot;" />

    </Target>
</Project>