Merge rel/1.0.0 into master.

This commit is contained in:
Eric Erhardt 2017-02-01 14:32:59 -06:00
commit 9f0bb778a1
168 changed files with 4217 additions and 1184 deletions

View file

@ -13,7 +13,7 @@ The current official release of the csproj-enabled CLI tools is **CLI Preview 4*
There are a couple of things to keep in mind:
* Preview 4 CLI bits are still **in development** so some rough edges are to be expected.
* Preview 4 bits **do not support** project.json so you will have to either keep Preview 2 tools around or migrate your project. You can find more information on this using the [project.json to csproj instructions](https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/ProjectJsonToCSProj.md).
* Preview 4 bits **do not support** project.json so you will have to either keep Preview 2 tools around or migrate your project or add a global.json file to your project to target preview2. You can find more information on this using the [project.json to csproj instructions](https://github.com/dotnet/cli/blob/rel/1.0.0/Documentation/ProjectJsonToCSProj.md).
* Preview 4 refers to the **CLI tools only** and does not cover Visual Studio, VS Code or Visual Studio for Mac.
* We welcome any and all issues that relate to MSBuild-based tools, so feel free to try them out and leave comments and file any bugs/problems.

View file

@ -11,6 +11,23 @@ bring it to our attention. Post an issue or email us:
The attached notices are provided for information only.
License notice for Nuget.Client
-------------------------------
Copyright (c) .NET Foundation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
these files except in compliance with the License. You may obtain a copy of the
License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
License notice for LZMA SDK
---------------------------

View file

@ -0,0 +1,39 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26006.2
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.xproj", "{D65E5A1F-719F-4F95-8835-88BDD67AD457}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FAACC4BE-31AE-4EB7-A4C8-5BB4617EB4AF}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|x64.ActiveCfg = Debug|x64
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|x64.Build.0 = Debug|x64
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|x86.ActiveCfg = Debug|x86
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|x86.Build.0 = Debug|x86
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|Any CPU.Build.0 = Release|Any CPU
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|x64.ActiveCfg = Release|x64
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|x64.Build.0 = Release|x64
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|x86.ActiveCfg = Release|x86
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,40 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26006.2
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestApp", "TestApp\TestApp.xproj", "{D65E5A1F-719F-4F95-8835-88BDD67AD457}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FAACC4BE-31AE-4EB7-A4C8-5BB4617EB4AF}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
readme.txt = readme.txt
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|x64.ActiveCfg = Debug|x64
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|x64.Build.0 = Debug|x64
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|x86.ActiveCfg = Debug|x86
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Debug|x86.Build.0 = Debug|x86
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|Any CPU.Build.0 = Release|Any CPU
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|x64.ActiveCfg = Release|x64
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|x64.Build.0 = Release|x64
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|x86.ActiveCfg = Release|x86
{D65E5A1F-719F-4F95-8835-88BDD67AD457}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -2,14 +2,14 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
namespace TestLibrary
namespace TestApp
{
public static class Helper
public class Program
{
public static void SayHi()
public static int Main(string[] args)
{
Console.WriteLine("Hello there!");
Console.WriteLine("Hello World!");
return 0;
}
}
}

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.23107" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.23107</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>0138cb8f-4aa9-4029-a21e-c07c30f425ba</ProjectGuid>
<RootNamespace>TestAppWithContents</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\..\artifacts\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

View file

@ -0,0 +1,26 @@
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"dependencies": {
"Microsoft.NETCore.App": "1.0.1"
},
"frameworks": {
"netcoreapp1.0": {}
},
"runtimes": {
"win7-x64": {},
"win7-x86": {},
"osx.10.10-x64": {},
"osx.10.11-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {},
"centos.7-x64": {},
"rhel.7.2-x64": {},
"debian.8-x64": {},
"fedora.23-x64": {},
"opensuse.13.2-x64": {}
}
}

View file

@ -0,0 +1,3 @@
{
"projects": [ "." ]
}

View file

@ -0,0 +1 @@
This is just for our test to verify that we do not remove the readme.txt link from the solution.

View file

@ -8,12 +8,6 @@
<ProjectGuid>F8F96F4A-F10C-4C54-867C-A9EFF55494C8</ProjectGuid>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="**\*.resx" Exclude="@(EmbeddedResource)" />
<EmbeddedResource Include="compiler\resources\**\*" Exclude="@(EmbeddedResource)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NETStandard.Library">
<Version>1.6.0</Version>

View file

@ -2,9 +2,9 @@ using System;
namespace App.Tests
{
public class Program
public class TestAssetProgram
{
public static void Main(string[] args)
public static void TestAssetMain(string[] args)
{
Console.WriteLine("Hello World!");
}

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View file

@ -0,0 +1,20 @@
{
"version": "1.0.0-*",
"compilerName": "csc",
"compilationOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class Helper1
{
public static string GetMessage()
{
return "Hello from Helper1 class!";
}
}
}

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class Helper2
{
public static string GetMessage()
{
return "Hello from Helper2 class!";
}
}
}

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class IncludeThis
{
public static string GetMessage()
{
return "Hello from IncludeThis class!";
}
}
}

View file

@ -0,0 +1,14 @@
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine(IncludeThis.GetMessage());
Console.WriteLine(Helper1.GetMessage());
Console.WriteLine(Helper2.GetMessage());
}
}
}

View file

@ -0,0 +1,21 @@
{
"version": "1.0.0-*",
"compile": "../Helper1.cs",
"compileFiles": "../Helper2.cs",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class HelperBuiltIn1
{
public static string GetMessage()
{
return "Hello from HelperBuiltIn1 class!";
}
}
}

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class HelperBuiltIn2
{
public static string GetMessage()
{
return "Hello from HelperBuiltIn2 class!";
}
}
}

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class IncludeThis
{
public static string GetMessage()
{
return "Hello from IncludeThis class!";
}
}
}

View file

@ -0,0 +1,14 @@
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine(IncludeThis.GetMessage());
Console.WriteLine(HelperBuiltIn1.GetMessage());
Console.WriteLine(HelperBuiltIn2.GetMessage());
}
}
}

View file

@ -0,0 +1,20 @@
{
"version": "1.0.0-*",
"compileBuiltIn": [ "Program.cs", "IncludeThis.cs", "../HelperBuiltIn1.cs", "../HelperBuiltIn2.cs" ],
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -0,0 +1 @@
This does not compile but is used to test compile exclusion.

View file

@ -0,0 +1 @@
This does not compile but is used to test compile exclusion.

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View file

@ -0,0 +1,21 @@
{
"version": "1.0.0-*",
"compileExclude": "ExcludeThis1.cs",
"exclude": [ "ExcludeThis2.cs" ],
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -0,0 +1 @@
Test content file that should be included.

View file

@ -0,0 +1 @@
Test content file that should be included.

View file

@ -0,0 +1 @@
Test content file that should be included.

View file

@ -0,0 +1 @@
Test content file that should be included.

View file

@ -0,0 +1 @@
Test content file that should be excluded.

View file

@ -0,0 +1 @@
Test content file that should be excluded.

View file

@ -0,0 +1 @@
Test content file that should be included.

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View file

@ -0,0 +1,24 @@
{
"version": "1.0.0-*",
"content": "*.txt",
"contentExclude": "ExcludeThis1.txt",
"contentFiles": [ "../ContentFile1.txt", "../ContentFile2.txt" ],
"contentBuiltIn": [ "../ContentFileBuiltIn1.txt", "../ContentFileBuiltIn2.txt" ],
"publishExclude": "ExcludeThis2.txt",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -0,0 +1,19 @@
using System;
using System.Linq;
using System.Reflection;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var thisAssembly = typeof(Program).GetTypeInfo().Assembly;
var resources = from resourceName in thisAssembly.GetManifestResourceNames()
select resourceName;
var resourceNames = string.Join(",", resources);
Console.WriteLine($"{resources.Count()} Resources Found: {resourceNames}");
}
}
}

View file

@ -0,0 +1,20 @@
{
"version": "1.0.0-*",
"namedResource": [ "My.Alias", "Strings.resx" ],
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -0,0 +1 @@
Test pack content file.

View file

@ -0,0 +1 @@
Test pack content file.

View file

@ -0,0 +1,12 @@
using System;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

View file

@ -0,0 +1,32 @@
{
"version": "1.0.0-*",
"projectUrl": "http://projecturl/",
"licenseUrl": "http://licenseurl/",
"iconUrl": "http://iconurl/",
"owners": [ "owner1", "owner2" ],
"tags": [ "tag1", "tag2" ],
"releaseNotes": "releaseNotes",
"requireLicenseAcceptance": true,
"summary": "summary",
"repository": {
"type": "git",
"url": "http://url/"
},
"packInclude": [ "Content1.txt", "Content2.txt" ],
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="hello" xml:space="preserve">
<value>Hello World!</value>
</data>
</root>

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="hello" xml:space="preserve">
<value>Hello World!</value>
</data>
</root>

View file

@ -0,0 +1,19 @@
using System;
using System.Linq;
using System.Reflection;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var thisAssembly = typeof(Program).GetTypeInfo().Assembly;
var resources = from resourceName in thisAssembly.GetManifestResourceNames()
select resourceName;
var resourceNames = string.Join(",", resources);
Console.WriteLine($"{resources.Count()} Resources Found: {resourceNames}");
}
}
}

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="hello" xml:space="preserve">
<value>Hello World!</value>
</data>
</root>

View file

@ -0,0 +1,21 @@
{
"version": "1.0.0-*",
"resource": "../Strings1.resx",
"resourceFiles": [ "../Strings2.resx" ],
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="hello" xml:space="preserve">
<value>Hello World!</value>
</data>
</root>

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="hello" xml:space="preserve">
<value>Hello World!</value>
</data>
</root>

View file

@ -0,0 +1,19 @@
using System;
using System.Linq;
using System.Reflection;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var thisAssembly = typeof(Program).GetTypeInfo().Assembly;
var resources = from resourceName in thisAssembly.GetManifestResourceNames()
select resourceName;
var resourceNames = string.Join(",", resources);
Console.WriteLine($"{resources.Count()} Resources Found: {resourceNames}");
}
}
}

View file

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="hello" xml:space="preserve">
<value>Hello World!</value>
</data>
</root>

View file

@ -0,0 +1,20 @@
{
"version": "1.0.0-*",
"resourceBuiltIn": [ "../Strings1.resx", "../Strings2.resx" ],
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -0,0 +1 @@
This is not a resource file but is used to test resource exclusion.

View file

@ -0,0 +1 @@
This is not a resource file but is used to test resource exclusion.

View file

@ -0,0 +1,19 @@
using System;
using System.Linq;
using System.Reflection;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var thisAssembly = typeof(Program).GetTypeInfo().Assembly;
var resources = from resourceName in thisAssembly.GetManifestResourceNames()
select resourceName;
var resourceNames = string.Join(",", resources);
Console.WriteLine($"{resources.Count()} Resources Found: {resourceNames}");
}
}
}

View file

@ -0,0 +1,21 @@
{
"version": "1.0.0-*",
"exclude": "Exclude1.resx",
"resourceExclude": [ "Exclude2.resx" ],
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<VersionPrefix>1.0.0-rc</VersionPrefix>
<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>
<AssemblyName>dotnet-desktop-and-portable</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64;osx.10.10-x64;rhel.7-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win7-x64;win7-x86</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
@ -19,12 +19,14 @@
</PackageReference>
</ItemGroup>
<!--The below package ref is added as a workaround to issue : https://github.com/NuGet/Home/issues/4416
This should be removed when the issue is fixed-->
<ItemGroup>
<PackageReference Include="NewtonSoft.Json" Version="9.0.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
</Project>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp1.1</TargetFramework>
<AssemblyName>dotnet-hello</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers>
@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
<Version>1.1.0</Version>
</PackageReference>
</ItemGroup>

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VersionPrefix>2.0.0</VersionPrefix>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp1.1</TargetFramework>
<AssemblyName>dotnet-hello</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;win7-x86;osx.10.10-x64;osx.10.11-x64;ubuntu.14.04-x64;ubuntu.16.04-x64;centos.7-x64;rhel.7.2-x64;debian.8-x64;fedora.23-x64;opensuse.13.2-x64</RuntimeIdentifiers>
@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
<Version>1.1.0</Version>
</PackageReference>
</ItemGroup>

View file

@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<TargetFramework>netcoreapp1.1</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
<Version>1.1.0</Version>
</PackageReference>
<PackageReference Include="dotnet-hello">
<Version>1.0.0</Version>

View file

@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VersionPrefix>1.0.0</VersionPrefix>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1</TargetFrameworks>
<AssemblyName>AppWithDirectDep</AssemblyName>
<OutputType>Exe</OutputType>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.3</Version>
<Version>1.1.0</Version>
</PackageReference>
<PackageReference Include="dotnet-hello">
<Version>1.0.0</Version>

View file

@ -18,6 +18,11 @@
<Version>1.0.0-*</Version>
</DotNetCliToolReference>
</ItemGroup>
<!--The below package ref is added as a workaround to issue : https://github.com/NuGet/Home/issues/4416
This should be removed when the issue is fixed-->
<ItemGroup>
<PackageReference Include="NewtonSoft.Json" Version="9.0.1" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE;TRACE</DefineConstants>
<Optimize>true</Optimize>

View file

@ -0,0 +1,9 @@
using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}

View file

@ -0,0 +1,24 @@
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true,
"compile": {
"include": [
"Program.cs"
]
}
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -0,0 +1,9 @@
using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}

View file

@ -0,0 +1,24 @@
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true,
"compile": {
"include": [
"**/*.cs"
]
}
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"imports": "dnxcore50"
}
}
}

View file

@ -1,13 +0,0 @@
{
"version": "1.0.0-*",
"compilationOptions": {
"xmlDoc": true
},
"packInclude": {},
"dependencies": {
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.5": {}
}
}

View file

@ -1,316 +1,319 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="compile/Microsoft.DotNet.Cli.LzmaArchive.targets" />
<Import Project="crossgen/Microsoft.DotNet.Cli.Crossgen.targets" />
<PropertyGroup>
<BinaryToCorehostifyRelDir>runtimes/any/native</BinaryToCorehostifyRelDir>
<MSBuildImportsDir>$(RepoRoot)/resources/MSBuildImports</MSBuildImportsDir>
</PropertyGroup>
<ItemGroup>
<PublishOutputExtensions Include="$(ExeExtension);.dll;.pdb;.deps.json;.runtimeconfig.json" />
<BundledTools Include="MSBuild;NuGet.CommandLine.XPlat;dotnet" />
<MSBuildImportsContent Include="$(MSBuildImportsDir)/**/*" />
</ItemGroup>
<Target Name="Compile" DependsOnTargets="Prepare;
SetupStage;
CompileStage;
PublishSdks;
PublishTemplates;
BuildProjectsForNuGetPackages;
GetNuGetPackagesArchive;" />
<Target Name="SetupStage"
DependsOnTargets="Prepare">
<PropertyGroup>
<SrcDirectory>$(RepoRoot)/src</SrcDirectory>
</PropertyGroup>
<ItemGroup>
<CompileStageInputs Include="$(SrcDirectory)/**/*.cs" Exclude="$(SrcDirectory)/**/obj/**/*.cs" />
<CompileStageInputs Include="$(SrcDirectory)/**/*.csproj;$(SrcDirectory)/**/project.assets.json" />
<Stage Include="Stage1">
<Inputs>@(CompileStageInputs)</Inputs>
<StageDirectory>$(Stage1Directory)</StageDirectory>
<StageSymbolsDirectory>$(Stage1SymbolsDirectory)</StageSymbolsDirectory>
<DotnetDir>$(Stage0Directory)</DotnetDir>
</Stage>
<Stage Include="Stage2">
<Inputs>@(CompileStageInputs)</Inputs>
<StageDirectory>$(Stage2Directory)</StageDirectory>
<StageSymbolsDirectory>$(Stage2SymbolsDirectory)</StageSymbolsDirectory>
<DotnetDir>$(Stage0Directory)</DotnetDir>
</Stage>
</ItemGroup>
</Target>
<Target Name="CompileStage"
DependsOnTargets="SetupStage;
InitCrossgenProps;"
Inputs="%(Stage.Inputs)"
Outputs="%(StageDirectory)/sdk/$(SdkVersion)/dotnet.dll">
<PropertyGroup>
<DynamicLibPrefix Condition=" '$(OSName)' == 'win' "></DynamicLibPrefix>
<DynamicLibPrefix Condition=" '$(OSName)' != 'win' ">lib</DynamicLibPrefix>
<DynamicLibSuffix Condition=" '$(OSName)' == 'win' ">.dll</DynamicLibSuffix>
<DynamicLibSuffix Condition=" '$(OSName)' == 'osx' ">.dylib</DynamicLibSuffix>
<DynamicLibSuffix Condition=" '$(DynamicLibSuffix)' == '' ">.so</DynamicLibSuffix>
<DotnetHostBaseName>dotnet$(ExeExtension)</DotnetHostBaseName>
<DotnetHostFxrBaseName>$(DynamicLibPrefix)hostfxr$(DynamicLibSuffix)</DotnetHostFxrBaseName>
<HostPolicyBaseName>$(DynamicLibPrefix)hostpolicy$(DynamicLibSuffix)</HostPolicyBaseName>
<StageDirectory>%(Stage.StageDirectory)</StageDirectory>
<StageSymbolsDirectory>%(Stage.StageSymbolsDirectory)</StageSymbolsDirectory>
<SdkOutputDirectory>$(StageDirectory)/sdk/$(SdkVersion)</SdkOutputDirectory>
<BinaryToCorehostifyOutDir>$(SdkOutputDirectory)/$(BinaryToCorehostifyRelDir)</BinaryToCorehostifyOutDir>
<MSBuildTargetsDirectory>$(SdkOutputDirectory)/runtimes/any/native</MSBuildTargetsDirectory>
<SharedFrameworkNameVersionPath>$(StageDirectory)/shared/$(SharedFrameworkName)/$(SharedFrameworkVersion)</SharedFrameworkNameVersionPath>
</PropertyGroup>
<ItemGroup>
<BinObj Remove="*" />
<BinObj Include="$(SrcDirectory)/**/bin/**/*" />
<BinObj Include="$(SrcDirectory)/**/obj/**/*" Exclude="$(SrcDirectory)/**/obj/project.assets.json;$(SrcDirectory)/**/obj/*.csproj.nuget.g.props;$(SrcDirectory)/**/obj/*.csproj.nuget.g.targets" />
<SharedFramework Remove="*" />
<SharedFramework Include="$(SharedFrameworkPublishDirectory)/**/*" />
<RuntimeTargetsAssetsToRemoveFromDeps Remove="*" />
<RuntimeTargetsAssetsToRemoveFromDeps Include="MSBuild" />
<RuntimeAssetsToRemoveFromDeps Remove="*" />
<RuntimeAssetsToRemoveFromDeps Include="redist" />
<RuntimeAssetsToRemoveFromDeps Include="tool_msbuild" />
<RuntimeAssetsToRemoveFromDeps Include="tool_nuget" />
</ItemGroup>
<Delete Files="@(BinObj)" />
<RemoveDir Directories="$(StageDirectory)" />
<MakeDir Directories="$(StageDirectory)"/>
<!-- CopySharedFramework -->
<Copy SourceFiles="@(SharedFramework)"
DestinationFiles="@(SharedFramework->'$(StageDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
<!-- Workaround for https://github.com/dotnet/sdk/issues/115 -->
<ItemGroup>
<HackFilesToCopy Include="$(NuGetPackagesDir)\microsoft.build.runtime\$(CLI_MSBuild_Version)\contentFiles\any\netcoreapp1.0\**;$(NuGetPackagesDir)\microsoft.codeanalysis.build.tasks\2.0.0-beta6-60922-08\contentFiles\any\any\**;$(NuGetPackagesDir)\microsoft.testplatform.cli\$(CLI_TestPlatform_Version)\contentFiles\any\any\**" />
</ItemGroup>
<Copy SourceFiles="@(HackFilesToCopy)"
DestinationFiles="@(HackFilesToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
<!-- Publish DotNet -->
<DotNetPublish ToolPath="%(Stage.DotnetDir)"
Output="$(SdkOutputDirectory)"
Configuration="$(Configuration)"
VersionSuffix="$(CommitCount)"
ProjectPath="$(SrcDirectory)/redist/redist.csproj"
MSBuildArgs="/p:GenerateRuntimeConfigurationFiles=true" />
<!-- Publish DotNet -->
<DotNetPublish ToolPath="%(Stage.DotnetDir)"
Output="$(SdkOutputDirectory)/Roslyn"
Configuration="$(Configuration)"
VersionSuffix="$(CommitCount)"
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
<!-- Corehostify Binaries -->
<ItemGroup Condition=" '$(OSName)' != 'win' ">
<SdkOutputChmodTargets Remove="*" />
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.exe;
$(SdkOutputDirectory)/**/*.dll" >
<!-- Managed assemblies do not need execute -->
<Mode>u=rw,g=r,o=r</Mode>
</SdkOutputChmodTargets>
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.dylib;
$(SdkOutputDirectory)/**/*.so" >
<!-- Generally, dylibs and sos have 'x' -->
<Mode>u=rwx,g=rx,o=rx</Mode>
</SdkOutputChmodTargets>
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*"
Exclude="$(SdkOutputDirectory)/**/*.*" >
<!-- Executables need x -->
<Mode>u=rwx,g=rx,o=rx</Mode>
</SdkOutputChmodTargets>
</ItemGroup>
<Chmod Condition=" '$(OSName)' != 'win' "
File="%(SdkOutputChModTargets.FullPath)"
Mode="%(SdkOutputChModTargets.Mode)" />
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
SectionName="runtimeTargets"
AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" />
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
SectionName="runtime"
AssetPath="%(RuntimeAssetsToRemoveFromDeps.Identity).dll" />
<Copy SourceFiles="$(SdkOutputDirectory)/redist.deps.json"
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json" />
<Copy SourceFiles="$(SdkOutputDirectory)/redist.runtimeconfig.json"
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).runtimeconfig.json" />
<ChangeEntryPointLibraryName
DepsFile="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json"
NewName="%(BundledTools.Identity).deps.json" />
<!-- cleanup project output we don't need -->
<Delete Files="$(SdkOutputDirectory)/redist%(PublishOutputExtensions.Identity)" />
<Delete Files="$(SdkOutputDirectory)/tool_msbuild%(PublishOutputExtensions.Identity)" />
<Delete Files="$(SdkOutputDirectory)/tool_nuget%(PublishOutputExtensions.Identity)" />
<!-- Copy Host to SDK Directory -->
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostBaseName)"
DestinationFiles="$(SdkOutputDirectory)/corehost$(ExeExtension)" />
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostFxrBaseName)"
DestinationFiles="$(SdkOutputDirectory)/$(DotnetHostFxrBaseName)" />
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(HostPolicyBaseName)"
DestinationFiles="$(SdkOutputDirectory)/$(HostPolicyBaseName)" />
<!-- copy core sdk -->
<Copy SourceFiles="@(MSBuildImportsContent)"
DestinationFolder="$(SdkOutputDirectory)/%(RecursiveDir)" />
<ItemGroup>
<NETCore10Assemblies Include="$(SdkOutputDirectory)/System.ComponentModel.Primitives.dll;
$(SdkOutputDirectory)/System.Collections.Specialized.dll;
$(SdkOutputDirectory)/System.Collections.NonGeneric.dll" />
</ItemGroup>
<!-- Move these "1.0" assemblies that TestPlatform lays down out of the way so crossgen doesn't pick them up.
We need https://github.com/dotnet/cli/issues/5464 fixed, so test platform is in a separate directory -->
<Move SourceFiles="@(NETCore10Assemblies)"
DestinationFiles="@(NETCore10Assemblies->'$(SdkOutputDirectory)/%(Filename)%(Extension).bak')" />
<!-- Crossgen the CLI -->
<ItemGroup>
<SdkFiles Remove="*" />
<!-- Removing Full CLR built TestHost assemblies from getting Crossgen as it is throwing error -->
<SdkFilesExclude Include="$(SdkOutputDirectory)/TestHost*/**/*" />
<!-- Remove NuGet.LibraryModel due to https://github.com/dotnet/coreclr/issues/9118 -->
<SdkFilesExclude Include="$(SdkOutputDirectory)/NuGet.LibraryModel.dll" />
<SdkFiles Include="$(SdkOutputDirectory)/**/*" Exclude="@(SdkFilesExclude)" />
<SdkFilesWithPEMarker Remove="*" />
</ItemGroup>
<AddMetadataIsPE Items="@(SdkFiles)">
<Output TaskParameter="ResultItems" ItemName="SdkFilesWithPEMarker" />
</AddMetadataIsPE>
<ItemGroup>
<CrossgenTargets Remove="*" />
<CrossgenTargets Include="%(SdkFilesWithPEMarker.FullPath)" Condition=" '%(SdkFilesWithPEMarker.IsPE)' == 'True' " />
<CompileStageSdkDirectories Remove="*" />
</ItemGroup>
<RemoveDuplicates Inputs="@(SdkFiles->'%(RootDir)%(Directory)')">
<Output TaskParameter="Filtered" ItemName="CompileStageSdkDirectories" />
</RemoveDuplicates>
<!-- Ensure crossgen tool is executable. See https://github.com/NuGet/Home/issues/4424 -->
<Chmod Condition=" '$(OSName)' != 'win' "
File="$(CrossgenPath)"
Mode="u+x" />
<Crossgen Condition=" '$(DISABLE_CROSSGEN)' != '1' "
SourceAssembly="%(CrossgenTargets.FullPath)"
DestinationPath="%(CrossgenTargets.FullPath)"
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
PlatformAssemblyPaths="@(PlatformAssemblies);
@(CompileStageSdkDirectories);
$(SharedFrameworkNameVersionPath)" />
<!-- Move the "1.0" assemblies back -->
<Move SourceFiles="@(NETCore10Assemblies->'$(SdkOutputDirectory)/%(Filename)%(Extension).bak')"
DestinationFiles="@(NETCore10Assemblies)" />
<!-- Generate .version file -->
<WriteLinesToFile File="$(SdkOutputDirectory)/.version"
Lines="$(CommitHash);$(SdkVersion);$(Rid)"
Overwrite="true" />
<ItemGroup>
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.targets" />
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.Targets" />
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.props" />
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.overridetasks" />
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.tasks" />
</ItemGroup>
<Copy SourceFiles="@(MSBuildTargetsToCopy)"
DestinationFiles="@(MSBuildTargetsToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
<ItemGroup>
<FilesToClean Include="$(StageDirectory)/sdk/**/vbc.exe" />
</ItemGroup>
<Delete Files="@(FilesToClean)" />
<ItemGroup>
<FilesToCopy Include="$(StageDirectory)/**/*" />
<PdbsToClean Include="$(StageDirectory)/sdk/**/*.pdb" />
</ItemGroup>
<Copy SourceFiles="@(FilesToCopy)"
DestinationFiles="@(FilesToCopy->'$(StageSymbolsDirectory)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Delete Files="@(PdbsToClean)" />
</Target>
<Target Name="PublishSdks"
DependsOnTargets="Prepare">
<ItemGroup>
<SdksToBundle Include="build/Microsoft.DotNet.Cli.BundledSdks.proj">
<Properties>
CLIBuildDll=$(CLIBuildDll);
NuGetPackagesDir=$(NuGetPackagesDir);
SdkLayoutDirectory=$(SdkOutputDirectory)/Sdks/%(BundledSdk.Identity);
SdkPackageName=%(BundledSdk.Identity);
SdkPackageVersion=%(BundledSdk.Version);
Stage0Directory=$(Stage0Directory)
</Properties>
</SdksToBundle>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(SdksToBundle)">
</MSBuild>
</Target>
<Target Name="PublishTemplates"
DependsOnTargets="Prepare">
<ItemGroup>
<TemplatesToBundle Include="build/Microsoft.DotNet.Cli.BundledTemplates.proj">
<Properties>
TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates;
TemplatePackageName=%(BundledTemplate.Identity);
TemplatePackageVersion=%(BundledTemplate.Version);
Stage0Directory=$(Stage0Directory)
</Properties>
</TemplatesToBundle>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(TemplatesToBundle)">
</MSBuild>
</Target>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="compile/Microsoft.DotNet.Cli.LzmaArchive.targets" />
<Import Project="crossgen/Microsoft.DotNet.Cli.Crossgen.targets" />
<PropertyGroup>
<BinaryToCorehostifyRelDir>runtimes/any/native</BinaryToCorehostifyRelDir>
<MSBuildImportsDir>$(RepoRoot)/resources/MSBuildImports</MSBuildImportsDir>
</PropertyGroup>
<ItemGroup>
<PublishOutputExtensions Include="$(ExeExtension);.dll;.pdb;.deps.json;.runtimeconfig.json" />
<BundledTools Include="MSBuild;NuGet.CommandLine.XPlat;dotnet" />
<MSBuildImportsContent Include="$(MSBuildImportsDir)/**/*" />
</ItemGroup>
<Target Name="Compile" DependsOnTargets="Prepare;
SetupStage;
CompileStage;
PublishSdks;
PublishTemplates;
BuildProjectsForNuGetPackages;
GetNuGetPackagesArchive;" />
<Target Name="SetupStage"
DependsOnTargets="Prepare">
<PropertyGroup>
<SrcDirectory>$(RepoRoot)/src</SrcDirectory>
</PropertyGroup>
<ItemGroup>
<CompileStageInputs Include="$(SrcDirectory)/**/*.cs" Exclude="$(SrcDirectory)/**/obj/**/*.cs" />
<CompileStageInputs Include="$(SrcDirectory)/**/*.csproj;$(SrcDirectory)/**/project.assets.json" />
<Stage Include="Stage1">
<Inputs>@(CompileStageInputs)</Inputs>
<StageDirectory>$(Stage1Directory)</StageDirectory>
<StageSymbolsDirectory>$(Stage1SymbolsDirectory)</StageSymbolsDirectory>
<DotnetDir>$(Stage0Directory)</DotnetDir>
</Stage>
<Stage Include="Stage2">
<Inputs>@(CompileStageInputs)</Inputs>
<StageDirectory>$(Stage2Directory)</StageDirectory>
<StageSymbolsDirectory>$(Stage2SymbolsDirectory)</StageSymbolsDirectory>
<DotnetDir>$(Stage0Directory)</DotnetDir>
</Stage>
</ItemGroup>
</Target>
<Target Name="CompileStage"
DependsOnTargets="SetupStage;
InitCrossgenProps;"
Inputs="%(Stage.Inputs)"
Outputs="%(StageDirectory)/sdk/$(SdkVersion)/dotnet.dll">
<PropertyGroup>
<DynamicLibPrefix Condition=" '$(OSName)' == 'win' "></DynamicLibPrefix>
<DynamicLibPrefix Condition=" '$(OSName)' != 'win' ">lib</DynamicLibPrefix>
<DynamicLibSuffix Condition=" '$(OSName)' == 'win' ">.dll</DynamicLibSuffix>
<DynamicLibSuffix Condition=" '$(OSName)' == 'osx' ">.dylib</DynamicLibSuffix>
<DynamicLibSuffix Condition=" '$(DynamicLibSuffix)' == '' ">.so</DynamicLibSuffix>
<DotnetHostBaseName>dotnet$(ExeExtension)</DotnetHostBaseName>
<DotnetHostFxrBaseName>$(DynamicLibPrefix)hostfxr$(DynamicLibSuffix)</DotnetHostFxrBaseName>
<HostPolicyBaseName>$(DynamicLibPrefix)hostpolicy$(DynamicLibSuffix)</HostPolicyBaseName>
<StageDirectory>%(Stage.StageDirectory)</StageDirectory>
<StageSymbolsDirectory>%(Stage.StageSymbolsDirectory)</StageSymbolsDirectory>
<SdkOutputDirectory>$(StageDirectory)/sdk/$(SdkVersion)</SdkOutputDirectory>
<BinaryToCorehostifyOutDir>$(SdkOutputDirectory)/$(BinaryToCorehostifyRelDir)</BinaryToCorehostifyOutDir>
<MSBuildTargetsDirectory>$(SdkOutputDirectory)/runtimes/any/native</MSBuildTargetsDirectory>
<SharedFrameworkNameVersionPath>$(StageDirectory)/shared/$(SharedFrameworkName)/$(SharedFrameworkVersion)</SharedFrameworkNameVersionPath>
</PropertyGroup>
<ItemGroup>
<BinObj Remove="*" />
<BinObj Include="$(SrcDirectory)/**/bin/**/*" />
<BinObj Include="$(SrcDirectory)/**/obj/**/*" Exclude="$(SrcDirectory)/**/obj/project.assets.json;$(SrcDirectory)/**/obj/*.csproj.nuget.g.props;$(SrcDirectory)/**/obj/*.csproj.nuget.g.targets" />
<SharedFramework Remove="*" />
<SharedFramework Include="$(SharedFrameworkPublishDirectory)/**/*" />
<RuntimeTargetsAssetsToRemoveFromDeps Remove="*" />
<RuntimeTargetsAssetsToRemoveFromDeps Include="MSBuild" />
<RuntimeAssetsToRemoveFromDeps Remove="*" />
<RuntimeAssetsToRemoveFromDeps Include="redist" />
<RuntimeAssetsToRemoveFromDeps Include="tool_msbuild" />
<RuntimeAssetsToRemoveFromDeps Include="tool_nuget" />
</ItemGroup>
<Delete Files="@(BinObj)" />
<RemoveDir Directories="$(StageDirectory)" />
<MakeDir Directories="$(StageDirectory)"/>
<!-- CopySharedFramework -->
<Copy SourceFiles="@(SharedFramework)"
DestinationFiles="@(SharedFramework->'$(StageDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
<!-- Workaround for https://github.com/dotnet/sdk/issues/115 -->
<ItemGroup>
<HackFilesToCopy Include="$(NuGetPackagesDir)\microsoft.build.runtime\$(CLI_MSBuild_Version)\contentFiles\any\netcoreapp1.0\**;
$(NuGetPackagesDir)\microsoft.build.runtime\$(CLI_MSBuild_Version)\contentFiles\any\netcoreapp1.1\**;
$(NuGetPackagesDir)\microsoft.codeanalysis.build.tasks\$(CLI_Roslyn_Version)\contentFiles\any\any\**;
$(NuGetPackagesDir)\microsoft.testplatform.cli\$(CLI_TestPlatform_Version)\contentFiles\any\any\**" />
</ItemGroup>
<Copy SourceFiles="@(HackFilesToCopy)"
DestinationFiles="@(HackFilesToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
<!-- Publish DotNet -->
<DotNetPublish ToolPath="%(Stage.DotnetDir)"
Output="$(SdkOutputDirectory)"
Configuration="$(Configuration)"
VersionSuffix="$(CommitCount)"
ProjectPath="$(SrcDirectory)/redist/redist.csproj"
MSBuildArgs="/p:GenerateRuntimeConfigurationFiles=true" />
<!-- Publish DotNet -->
<DotNetPublish ToolPath="%(Stage.DotnetDir)"
Output="$(SdkOutputDirectory)/Roslyn"
Configuration="$(Configuration)"
VersionSuffix="$(CommitCount)"
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
<!-- Corehostify Binaries -->
<ItemGroup Condition=" '$(OSName)' != 'win' ">
<SdkOutputChmodTargets Remove="*" />
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.exe;
$(SdkOutputDirectory)/**/*.dll" >
<!-- Managed assemblies do not need execute -->
<Mode>u=rw,g=r,o=r</Mode>
</SdkOutputChmodTargets>
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*.dylib;
$(SdkOutputDirectory)/**/*.so" >
<!-- Generally, dylibs and sos have 'x' -->
<Mode>u=rwx,g=rx,o=rx</Mode>
</SdkOutputChmodTargets>
<SdkOutputChmodTargets Include="$(SdkOutputDirectory)/**/*"
Exclude="$(SdkOutputDirectory)/**/*.*" >
<!-- Executables need x -->
<Mode>u=rwx,g=rx,o=rx</Mode>
</SdkOutputChmodTargets>
</ItemGroup>
<Chmod Condition=" '$(OSName)' != 'win' "
File="%(SdkOutputChModTargets.FullPath)"
Mode="%(SdkOutputChModTargets.Mode)" />
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
SectionName="runtimeTargets"
AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" />
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
SectionName="runtime"
AssetPath="%(RuntimeAssetsToRemoveFromDeps.Identity).dll" />
<Copy SourceFiles="$(SdkOutputDirectory)/redist.deps.json"
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json" />
<Copy SourceFiles="$(SdkOutputDirectory)/redist.runtimeconfig.json"
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).runtimeconfig.json" />
<ChangeEntryPointLibraryName
DepsFile="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json"
NewName="%(BundledTools.Identity).deps.json" />
<!-- cleanup project output we don't need -->
<Delete Files="$(SdkOutputDirectory)/redist%(PublishOutputExtensions.Identity)" />
<Delete Files="$(SdkOutputDirectory)/tool_msbuild%(PublishOutputExtensions.Identity)" />
<Delete Files="$(SdkOutputDirectory)/tool_nuget%(PublishOutputExtensions.Identity)" />
<!-- Copy Host to SDK Directory -->
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostBaseName)"
DestinationFiles="$(SdkOutputDirectory)/corehost$(ExeExtension)" />
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostFxrBaseName)"
DestinationFiles="$(SdkOutputDirectory)/$(DotnetHostFxrBaseName)" />
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(HostPolicyBaseName)"
DestinationFiles="$(SdkOutputDirectory)/$(HostPolicyBaseName)" />
<!-- copy core sdk -->
<Copy SourceFiles="@(MSBuildImportsContent)"
DestinationFolder="$(SdkOutputDirectory)/%(RecursiveDir)" />
<ItemGroup>
<NETCore10Assemblies Include="$(SdkOutputDirectory)/System.ComponentModel.Primitives.dll;
$(SdkOutputDirectory)/System.Collections.Specialized.dll;
$(SdkOutputDirectory)/System.Collections.NonGeneric.dll" />
</ItemGroup>
<!-- Move these "1.0" assemblies that TestPlatform lays down out of the way so crossgen doesn't pick them up.
We need https://github.com/dotnet/cli/issues/5464 fixed, so test platform is in a separate directory -->
<Move SourceFiles="@(NETCore10Assemblies)"
DestinationFiles="@(NETCore10Assemblies->'$(SdkOutputDirectory)/%(Filename)%(Extension).bak')" />
<!-- Crossgen the CLI -->
<ItemGroup>
<SdkFiles Remove="*" />
<!-- Removing Full CLR built TestHost assemblies from getting Crossgen as it is throwing error -->
<SdkFilesExclude Include="$(SdkOutputDirectory)/TestHost*/**/*" />
<!-- Remove NuGet.LibraryModel due to https://github.com/dotnet/coreclr/issues/9118 -->
<SdkFilesExclude Include="$(SdkOutputDirectory)/NuGet.LibraryModel.dll" />
<SdkFiles Include="$(SdkOutputDirectory)/**/*" Exclude="@(SdkFilesExclude)" />
<SdkFilesWithPEMarker Remove="*" />
</ItemGroup>
<AddMetadataIsPE Items="@(SdkFiles)">
<Output TaskParameter="ResultItems" ItemName="SdkFilesWithPEMarker" />
</AddMetadataIsPE>
<ItemGroup>
<CrossgenTargets Remove="*" />
<CrossgenTargets Include="%(SdkFilesWithPEMarker.FullPath)" Condition=" '%(SdkFilesWithPEMarker.IsPE)' == 'True' " />
<CompileStageSdkDirectories Remove="*" />
</ItemGroup>
<RemoveDuplicates Inputs="@(SdkFiles->'%(RootDir)%(Directory)')">
<Output TaskParameter="Filtered" ItemName="CompileStageSdkDirectories" />
</RemoveDuplicates>
<!-- Ensure crossgen tool is executable. See https://github.com/NuGet/Home/issues/4424 -->
<Chmod Condition=" '$(OSName)' != 'win' "
File="$(CrossgenPath)"
Mode="u+x" />
<Crossgen Condition=" '$(DISABLE_CROSSGEN)' != '1' "
SourceAssembly="%(CrossgenTargets.FullPath)"
DestinationPath="%(CrossgenTargets.FullPath)"
JITPath="$(LibCLRJitPath)"
CrossgenPath="$(CrossgenPath)"
ReadyToRun="True"
PlatformAssemblyPaths="@(PlatformAssemblies);
@(CompileStageSdkDirectories);
$(SharedFrameworkNameVersionPath)" />
<!-- Move the "1.0" assemblies back -->
<Move SourceFiles="@(NETCore10Assemblies->'$(SdkOutputDirectory)/%(Filename)%(Extension).bak')"
DestinationFiles="@(NETCore10Assemblies)" />
<!-- Generate .version file -->
<WriteLinesToFile File="$(SdkOutputDirectory)/.version"
Lines="$(CommitHash);$(SdkVersion);$(Rid)"
Overwrite="true" />
<ItemGroup>
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.targets" />
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.Targets" />
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.props" />
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.overridetasks" />
<MSBuildTargetsToCopy Include="$(MSBuildTargetsDirectory)/**/*.tasks" />
</ItemGroup>
<Copy SourceFiles="@(MSBuildTargetsToCopy)"
DestinationFiles="@(MSBuildTargetsToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
<ItemGroup>
<FilesToClean Include="$(StageDirectory)/sdk/**/vbc.exe" />
</ItemGroup>
<Delete Files="@(FilesToClean)" />
<ItemGroup>
<FilesToCopy Include="$(StageDirectory)/**/*" />
<PdbsToClean Include="$(StageDirectory)/sdk/**/*.pdb" />
</ItemGroup>
<Copy SourceFiles="@(FilesToCopy)"
DestinationFiles="@(FilesToCopy->'$(StageSymbolsDirectory)\%(RecursiveDir)%(Filename)%(Extension)')" />
<Delete Files="@(PdbsToClean)" />
</Target>
<Target Name="PublishSdks"
DependsOnTargets="Prepare">
<ItemGroup>
<SdksToBundle Include="build/Microsoft.DotNet.Cli.BundledSdks.proj">
<Properties>
CLIBuildDll=$(CLIBuildDll);
NuGetPackagesDir=$(NuGetPackagesDir);
SdkLayoutDirectory=$(SdkOutputDirectory)/Sdks/%(BundledSdk.Identity);
SdkPackageName=%(BundledSdk.Identity);
SdkPackageVersion=%(BundledSdk.Version);
Stage0Directory=$(Stage0Directory)
</Properties>
</SdksToBundle>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(SdksToBundle)">
</MSBuild>
</Target>
<Target Name="PublishTemplates"
DependsOnTargets="Prepare">
<ItemGroup>
<TemplatesToBundle Include="build/Microsoft.DotNet.Cli.BundledTemplates.proj">
<Properties>
TemplateLayoutDirectory=$(SdkOutputDirectory)/Templates;
TemplatePackageName=%(BundledTemplate.Identity);
TemplatePackageVersion=%(BundledTemplate.Version);
Stage0Directory=$(Stage0Directory)
</Properties>
</TemplatesToBundle>
</ItemGroup>
<MSBuild
BuildInParallel="False"
Projects="@(TemplatesToBundle)">
</MSBuild>
</Target>
</Project>

View file

@ -3,13 +3,13 @@
<PropertyGroup>
<CLI_SharedFrameworkVersion>2.0.0-beta-001386-00</CLI_SharedFrameworkVersion>
<CLI_CoreCLRVersion>1.2.0-beta-24904-03</CLI_CoreCLRVersion>
<CLI_MSBuild_Version>15.1.0-preview-000523-01</CLI_MSBuild_Version>
<CLI_Roslyn_Version>2.0.0-rc3-61212-03</CLI_Roslyn_Version>
<CLI_NETSDK_Version>1.0.0-alpha-20170117-4</CLI_NETSDK_Version>
<CLI_MSBuild_Version>15.1.0-preview-000539-01</CLI_MSBuild_Version>
<CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version>
<CLI_NETSDK_Version>1.0.0-alpha-20170125-1</CLI_NETSDK_Version>
<!-- non-official NuGet build taken from https://github.com/nuget/nuget.client/tree/release-4.0.0-rc3-netstandard2.0 to contain "2.0" TFMs -->
<CLI_NuGet_Version>4.0.0-rc3-2193</CLI_NuGet_Version>
<CLI_WEBSDK_Version>1.0.0-alpha-20170120-3-249</CLI_WEBSDK_Version>
<CLI_TestPlatform_Version>15.0.0-preview-20170106-08</CLI_TestPlatform_Version>
<TemplateEngineVersion>1.0.0-beta1-20170108-83</TemplateEngineVersion>
<CLI_TestPlatform_Version>15.0.0-preview-20170125-04</CLI_TestPlatform_Version>
<TemplateEngineVersion>1.0.0-beta1-20170126-102</TemplateEngineVersion>
</PropertyGroup>
</Project>

View file

@ -3,8 +3,8 @@
<PropertyGroup>
<SdkBrandName>Microsoft .NET Core 1.0.3 - SDK RC 4</SdkBrandName>
<SharedFrameworkBrandName>Microsoft .NET Core 1.0.3 - Runtime</SharedFrameworkBrandName>
<SharedHostBrandName>Microsoft .NET Core 1.0.1 - Host</SharedHostBrandName>
<HostFxrBrandName>Microsoft .NET Core 1.0.1 - Host FX Resolver</HostFxrBrandName>
<SharedHostBrandName>Microsoft .NET Core 1.1.0 - Host</SharedHostBrandName>
<HostFxrBrandName>Microsoft .NET Core 1.1.0 - Host FX Resolver</HostFxrBrandName>
<AdditionalSharedFrameworkBrandName>Microsoft .NET Core 1.1.0 - Runtime</AdditionalSharedFrameworkBrandName>
<AdditionalSharedHostBrandName>Microsoft .NET Core 1.1.0 - Host</AdditionalSharedHostBrandName>

View file

@ -43,6 +43,10 @@
<IntermediateDirectory>$(BaseOutputDirectory)/intermediate</IntermediateDirectory>
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
<SharedFrameworkPublishDirectory>$(IntermediateDirectory)/sharedFrameworkPublish</SharedFrameworkPublishDirectory>
<CoreCLRRid>$(Rid)</CoreCLRRid>
<CoreCLRRid Condition=" '$(OSName)' == 'win' ">win7-$(Architecture)</CoreCLRRid>
<CoreCLRRid Condition=" '$(OSName)' == 'osx' ">osx.10.10-x64</CoreCLRRid>
<CoreCLRRid Condition=" '$(OSName)' == 'centos' OR '$(OSName)' == 'rhel' ">rhel.7-x64</CoreCLRRid>
</PropertyGroup>
<GetCommitHash RepoRoot="$(RepoRoot)">
@ -54,10 +58,7 @@
VersionMinor="$(VersionMinor)"
VersionPatch="$(VersionPatch)"
ReleaseSuffix="$(ReleaseSuffix)">
<Output TaskParameter="CommitCount" PropertyName="CommitCount" />
<Output TaskParameter="VersionSuffix" PropertyName="VersionSuffix" />
<Output TaskParameter="SimpleVersion" PropertyName="SimpleVersion" />
<Output TaskParameter="NugetVersion" PropertyName="NugetVersion" />
<Output TaskParameter="CommitCount" PropertyName="DefaultCommitCount" />
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
<Output TaskParameter="VersionBadgeMoniker" PropertyName="VersionBadgeMoniker" />
</GenerateBuildVersionInfo>
@ -68,6 +69,12 @@
</GenerateNuGetPackagesArchiveVersion>
<PropertyGroup>
<CommitCount Condition=" '$(CommitCount)' == '' ">$(DefaultCommitCount)</CommitCount>
<SimpleVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch).$(CommitCount)</SimpleVersion>
<VersionSuffix>$(ReleaseSuffix)-$(CommitCount)</VersionSuffix>
<NugetVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)-$(VersionSuffix)</NugetVersion>
<VersionBadge>$(BaseOutputDirectory)/$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
<SdkVersion>$(NugetVersion)</SdkVersion>

View file

@ -11,7 +11,8 @@
<Target Name="Test"
Condition=" '$(CLIBUILD_SKIP_TESTS)' != 'true' "
DependsOnTargets="BuildTests;">
DependsOnTargets="EnsureStageSeparation;
BuildTests;">
<PropertyGroup>
<PathListSeparator>:</PathListSeparator>
@ -81,37 +82,29 @@
<Target Name="BuildTests"
DependsOnTargets="RestoreTests;">
<DotNetBuild ToolPath="$(Stage0Directory)"
MaxCpuCount="1"
ProjectPath="&quot;$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln&quot;" />
ProjectPath="&quot;$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln&quot;"
MaxCpuCount="1" />
</Target>
<Target Name="CreateTestAssetPackageNuPkgs"
DependsOnTargets="SetupTestPackageProjectData;"
Inputs="%(TestPackageProject.PackInputs)"
Outputs="%(TestPackageProject.PackOutputs)">
<PropertyGroup>
<Framework>%(TestPackageProject.Framework)</Framework>
<DoPackRuntime Condition=" '$(Framework)' == 'net45' Or '$(Framework)' == 'net451' ">true</DoPackRuntime>
<DotNetPackMsbuildArgs>/p:TargetFramework=$(Framework)</DotNetPackMsbuildArgs>
<DotNetPackMsbuildArgs Condition=" '$(IsDesktopAvailable)' == 'True' And '%(TestPackageProject.PackRuntime)' != '' And '$(DoPackRuntime)' != '' ">/p:RuntimeIdentifier=%(TestPackageProject.PackRuntime)</DotNetPackMsbuildArgs>
</PropertyGroup>
Outputs="%(TestPackageProject.Identity)">
<DotNetRestore ToolPath="$(Stage2Directory)"
ConfigFile="$(RepoRoot)\NuGet.Config"
ProjectPath="%(TestPackageProject.ProjectPath)" />
<DotNetBuild Framework="$(Framework)"
Runtime="%(TestPackageProject.Runtime)"
ProjectPath="%(TestPackageProject.ProjectPath)"
ToolPath="$(Stage0Directory)" />
<!-- https://github.com/NuGet/Home/issues/4063 -->
<DotNetPack NoBuild="True"
Output="$(TestPackagesDir)"
<DotNetPack Output="$(TestPackagesDir)"
ProjectPath="%(TestPackageProject.ProjectPath)"
ToolPath="$(Stage0Directory)"
VersionSuffix="%(TestPackageProject.VersionSuffix)"
MsbuildArgs="$(DotNetPackMsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion)" />
MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion)" />
</Target>
<Target Name="EnsureStageSeparation">
<DotNetMSBuild Arguments="/v:diag $(RepoRoot)/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj /p:Stage2Directory=&quot;$(Stage2Directory)&quot;"
ToolPath="$(Stage0Directory)" />
</Target>
</Project>

View file

@ -9,6 +9,7 @@
<UsingTask TaskName="Crossgen" AssemblyFile="$(CLIBuildDll)" />
<UsingTask TaskName="DotNetBuild" AssemblyFile="$(CLIBuildDll)" />
<UsingTask TaskName="DotNetBuildPJ" AssemblyFile="$(CLIBuildDll)" />
<UsingTask TaskName="DotNetMSBuild" AssemblyFile="$(CLIBuildDll)" />
<UsingTask TaskName="DotNetNew" AssemblyFile="$(CLIBuildDll)" />
<UsingTask TaskName="DotNetPack" AssemblyFile="$(CLIBuildDll)" />
<UsingTask TaskName="DotNetPublish" AssemblyFile="$(CLIBuildDll)" />

View file

@ -66,10 +66,25 @@
<NuGetPackagesArchiveDirectory Include="$(NuGetPackagesArchiveFolder)" />
</ItemGroup>
<PropertyGroup>
<NuGetConfigContent>
&lt;configuration&gt;
&lt;packageSources&gt;
&lt;add key="configurable.source" value="%CLI_LZMA_PACKAGE_SOURCE%" /&gt;
&lt;/packageSources&gt;
&lt;/configuration&gt;
</NuGetConfigContent>
<LZMANuGetConfigFilePath>$(NuGetPackagesArchiveProject)/Nuget.config</LZMANuGetConfigFilePath>
</PropertyGroup>
<Delete Files="@(FilesToClean)" />
<RemoveDir Directories="@(NuGetPackagesArchiveDirectory)" />
<MakeDir Directories="@(NuGetPackagesArchiveDirectory)"/>
<WriteLinesToFile Condition=" 'CLI_LZMA_PACKAGE_SOURCE' != '' "
File="$(LZMANuGetConfigFilePath)"
Lines="$(NuGetConfigContent)" />
<DotNetNew ToolPath="$(Stage2Directory)"
TemplateType="Console"
WorkingDirectory="$(NuGetPackagesArchiveProject)/Console" />

View file

@ -3,14 +3,9 @@
<Target Name="InitCrossgenProps"
DependsOnTargets="Init">
<PropertyGroup>
<CoreCLRRid>$(Rid)</CoreCLRRid>
<CoreCLRRid Condition=" '$(OSName)' == 'win' ">win7-$(Architecture)</CoreCLRRid>
<CoreCLRRid Condition=" '$(OSName)' == 'osx' ">osx.10.10-x64</CoreCLRRid>
<CoreCLRRid Condition=" '$(OSName)' == 'centos' OR '$(OSName)' == 'rhel' ">rhel.7-x64</CoreCLRRid>
<CoreCLRPackageName>runtime.$(CoreCLRRid).microsoft.netcore.runtime.coreclr</CoreCLRPackageName>
<CrossGenPackageName>runtime.$(CoreCLRRid).microsoft.netcore.runtime.coreclr</CrossGenPackageName>
<LibCLRJitPackageName>runtime.$(CoreCLRRid).microsoft.netcore.jit</LibCLRJitPackageName>
<CoreCLRPackageName>runtime.$(CoreCLRRid).microsoft.netcore.runtime.coreclr</CoreCLRPackageName>
<CoreCLRLibsDir>$(NuGetPackagesDir)/$(CoreCLRPackageName)/$(CLI_CoreCLRVersion)/runtimes/$(CoreCLRRid)/lib/netstandard1.0</CoreCLRLibsDir>
<CrossgenPath>$(NuGetPackagesDir)/$(CrossGenPackageName)/$(CLI_CoreCLRVersion)/tools/crossgen$(ExeExtension)</CrossgenPath>

View file

@ -90,14 +90,14 @@
Outputs="$(DebianTestResultsXmlFile)" >
<!-- Install Dependencies and SDK Packages -->
<Exec Command="sudo dpkg -i $(DownloadedSharedHostInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedHostFxrInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedSharedFrameworkInstallerFile)" />
<Exec Command="sudo dpkg -i $(AdditionalDownloadedSharedHostInstallerFile)" />
<Exec Command="sudo dpkg -i $(AdditionalDownloadedHostFxrInstallerFile)" />
<Exec Command="sudo dpkg -i $(AdditionalDownloadedSharedFrameworkInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedSharedHostInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedHostFxrInstallerFile)" />
<Exec Command="sudo dpkg -i $(DownloadedSharedFrameworkInstallerFile)" />
<Exec Command="sudo dpkg -i $(SdkInstallerFile)" />
<!-- Run E2E -->

View file

@ -15,7 +15,7 @@
<DotnetDebToolProjectJsonLines Include="{" />
<DotnetDebToolProjectJsonLines Include="%20%20%20%20&quot;version&quot;: &quot;1.0.0-*&quot;," />
<DotnetDebToolProjectJsonLines Include="%20%20%20%20&quot;name&quot;: &quot;$(DotnetDebToolConsumerProjectName)&quot;," />
<DotnetDebToolProjectJsonLines Include="%20%20%20%20&quot;frameworks&quot;: { &quot;netcoreapp1.0&quot;: {} }," />
<DotnetDebToolProjectJsonLines Include="%20%20%20%20&quot;frameworks&quot;: { &quot;netcoreapp1.0&quot;: {}, &quot;netcoreapp1.1&quot;: {} }," />
<DotnetDebToolProjectJsonLines Include="%20%20%20%20&quot;tools&quot;: {&quot;$(DotnetDebToolPackageId)&quot;: &quot;$(DotnetDebToolVersion)&quot; }" />
<DotnetDebToolProjectJsonLines Include="}" />
</ItemGroup>

View file

@ -108,12 +108,12 @@
<Exec Command="powershell -NoProfile -NoLogo $(SdkGenerateBundlePowershellScript)
'$(SdkInstallerFile)'
'$(DownloadedSharedFrameworkInstallerFile)'
'$(DownloadedHostFxrInstallerFile)'
'$(DownloadedSharedHostInstallerFile)'
'$(AdditionalDownloadedSharedFrameworkInstallerFile)'
'$(AdditionalDownloadedHostFxrInstallerFile)'
'$(AdditionalDownloadedSharedHostInstallerFile)'
'$(DownloadedSharedFrameworkInstallerFile)'
'$(DownloadedHostFxrInstallerFile)'
'$(DownloadedSharedHostInstallerFile)'
'$(CombinedFrameworkSdkHostInstallerFile)'
'$(WixRoot)'
'$(SdkBrandName)'

View file

@ -1,76 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="SetupTestPackageProjectData"
DependsOnTargets="AssociateSourceFilesWithProjects;
AssociateOutputsWithProjects;">
DependsOnTargets="SetupTestPackageProjectFrameworks">
<ItemGroup>
<TestPackageProject>
<NuPkgName Condition=" '%(NuPkgName)' == '' ">%(Name)</NuPkgName>
</TestPackageProject>
<TestPackageProject>
<PackInputs>%(BuildOutputs)</PackInputs>
<PackOutputs>$(TestPackagesDir)%(NuPkgName).%(VersionPrefix)%(VersionSuffix).nupkg</PackOutputs>
</TestPackageProject>
</ItemGroup>
</Target>
<Target Name="AssociateOutputsWithProjects"
DependsOnTargets="SetupTestPackageProjectFrameworks"
Outputs="%(TestPackageProject.ProjectPath)">
<ItemGroup>
<TestPackageProject>
<BuildOutputs>%(TestPackageProject.OutputPath)%(TestPackageProject.Name).dll</BuildOutputs>
</TestPackageProject>
</ItemGroup>
</Target>
<Target Name="SetupTestPackageProjectFrameworks"
DependsOnTargets="SetupTestPackageProjectBaseData;
AssociateSourceFilesWithProjects;"
Outputs="%(TestPackageProjectFrameworks.Identity)">
<PropertyGroup>
<CurrentBuildFramework>%(TestPackageProjectFrameworks.Identity)</CurrentBuildFramework>
</PropertyGroup>
DependsOnTargets="SetupTestPackageProjectBaseData">
<ItemGroup>
<TestPackageProject Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Frameworks)', '(^|;)$(CurrentBuildFramework)($|;)'))"
Include="@(BaseTestPackageProject)">
<Framework>$(CurrentBuildFramework)</Framework>
<Runtime Condition=" '$(CurrentBuildFramework)' == 'net45' Or '$(CurrentBuildFramework)' == 'net451' ">$(CoreCLRRid)</Runtime>
<OutputPath>%(OutputPath)$(CurrentBuildFramework)/</OutputPath>
<TestPackageProject Include="@(BaseTestPackageProject)">
</TestPackageProject>
</ItemGroup>
</Target>
<Target Name="AssociateSourceFilesWithProjects"
DependsOnTargets="FindSourceFiles"
Outputs="%(BaseTestPackageProject.ProjectPath)">
<PropertyGroup>
<CurrentProject>%(BaseTestPackageProject.ProjectPath)</CurrentProject>
</PropertyGroup>
<ItemGroup>
<BaseTestPackageProject Condition=" '%(ProjectPath)' == '$(CurrentProject)' ">
<BuildInputs>@(__TestPackageProjectInputs)</BuildInputs>
</BaseTestPackageProject>
</ItemGroup>
</Target>
<Target Name="FindSourceFiles"
DependsOnTargets="SetupTestPackageProjectBaseData;"
Outputs="%(BaseTestPackageProject.Identity)">
<ItemGroup>
<__TestPackageProjectInputs Include="%(BaseTestPackageProject.BuildInputIncludeFilter)"
Exclude="%(BaseTestPackageProject.BuildInputExcludeFilter)">
<ProjectPath>%(BaseTestPackageProject.ProjectPath)</ProjectPath>
</__TestPackageProjectInputs>
</ItemGroup>
</Target>
<Target Name="SetupTestPackageProjectBaseData">
<ItemGroup>
<BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils">
<BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils"
Condition=" '$(IsDesktopAvailable)' == 'True' " >
<Name>Microsoft.DotNet.Cli.Utils</Name>
<ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName>
<IsTool>True</IsTool>
<IsApplicable>True</IsApplicable>
<VersionPrefix>$(CliVersionPrefix)-</VersionPrefix>
<VersionSuffix>rc4-$(TestPackageBuildVersionSuffix)</VersionSuffix>
<Clean>False</Clean>
</BaseTestPackageProject>
<BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils"
Condition=" '$(IsDesktopAvailable)' == 'False' " >
<Name>Microsoft.DotNet.Cli.Utils</Name>
<ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName>
<IsTool>True</IsTool>
@ -78,7 +35,7 @@
<VersionPrefix>$(CliVersionPrefix)-</VersionPrefix>
<VersionSuffix>$(ReleaseSuffix)-$(TestPackageBuildVersionSuffix)</VersionSuffix>
<Clean>False</Clean>
<Frameworks>netstandard1.5</Frameworks>
<MsbuildArgs>/p:TargetFramework=netstandard1.5</MsbuildArgs>
</BaseTestPackageProject>
<BaseTestPackageProject Include="src/Microsoft.DotNet.InternalAbstractions">
<Name>Microsoft.DotNet.InternalAbstractions</Name>
@ -88,9 +45,9 @@
<VersionPrefix>2.0.0-beta-</VersionPrefix>
<VersionSuffix>beta-$(TestPackageBuildVersionSuffix)</VersionSuffix>
<Clean>False</Clean>
<Frameworks>netstandard1.3</Frameworks>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/PackageWithFakeNativeDep">
<BaseTestPackageProject Include="TestAssets/TestPackages/PackageWithFakeNativeDep"
Condition=" '$(IsDesktopAvailable)' == 'True' " >
<Name>PackageWithFakeNativeDep</Name>
<ProjectName>PackageWithFakeNativeDep.csproj</ProjectName>
<IsTool>False</IsTool>
@ -98,8 +55,7 @@
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Clean>True</Clean>
<Frameworks>net45</Frameworks>
<PackRuntime>$(CoreCLRRid)</PackRuntime>
<MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-context-test">
<Name>dotnet-dependency-context-test</Name>
@ -109,7 +65,6 @@
<VersionPrefix>1.0.0-rc-</VersionPrefix>
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
<Clean>True</Clean>
<Frameworks>netcoreapp1.0</Frameworks>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-tool-invoker">
<Name>dotnet-dependency-tool-invoker</Name>
@ -119,9 +74,9 @@
<VersionPrefix>1.0.0-rc-</VersionPrefix>
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
<Clean>True</Clean>
<Frameworks>netcoreapp1.0</Frameworks>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-desktop-and-portable">
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-desktop-and-portable"
Condition=" '$(IsDesktopAvailable)' == 'True' " >
<Name>dotnet-desktop-and-portable</Name>
<ProjectName>dotnet-desktop-and-portable.csproj</ProjectName>
<IsTool>True</IsTool>
@ -129,11 +84,10 @@
<VersionPrefix>1.0.0-rc-</VersionPrefix>
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
<Clean>True</Clean>
<Frameworks>net451;netcoreapp1.0</Frameworks>
<PackRuntime>$(CoreCLRRid)</PackRuntime>
<MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-desktop-binding-redirects"
Condition=" '$(IsDesktopAvailable)' == 'True' ">
Condition=" '$(IsDesktopAvailable)' == 'True' ">
<Name>dotnet-desktop-binding-redirects</Name>
<ProjectName>dotnet-desktop-binding-redirects.csproj</ProjectName>
<IsTool>True</IsTool>
@ -142,8 +96,7 @@
<VersionPrefix>1.0.0-rc-</VersionPrefix>
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
<Clean>True</Clean>
<Frameworks>net451</Frameworks>
<PackRuntime>$(CoreCLRRid)</PackRuntime>
<MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello">
<Name>dotnet-hello</Name>
@ -153,7 +106,6 @@
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Clean>True</Clean>
<Frameworks>netcoreapp1.0</Frameworks>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello">
<Name>dotnet-hello</Name>
@ -163,7 +115,6 @@
<VersionPrefix>2.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Clean>True</Clean>
<Frameworks>netcoreapp1.0</Frameworks>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-portable">
<Name>dotnet-portable</Name>
@ -173,7 +124,6 @@
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Clean>True</Clean>
<Frameworks>netcoreapp1.0</Frameworks>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-prefercliruntime">
<Name>dotnet-prefercliruntime</Name>
@ -183,7 +133,6 @@
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Clean>True</Clean>
<Frameworks>netcoreapp1.0</Frameworks>
</BaseTestPackageProject>
<BaseTestPackageProject Include="TestAssets/TestPackages/ToolWithOutputName">
<Name>dotnet-tool-with-output-name</Name>
@ -194,13 +143,8 @@
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Clean>True</Clean>
<Frameworks>netcoreapp1.0</Frameworks>
</BaseTestPackageProject>
<TestPackageProjectFrameworksExcludes Condition=" '$(IsDesktopAvailable)' != 'True' " Include="net45" />
<TestPackageProjectFrameworksExcludes Condition=" '$(IsDesktopAvailable)' != 'True' " Include="net451" />
<TestPackageProjectFrameworks Include="%(BaseTestPackageProject.Frameworks)" Exclude="@(TestPackageProjectFrameworksExcludes)" />
<BaseTestPackageProject>
<ProjectDir>$(RepoRoot)%(Identity)/</ProjectDir>
<OutputPath>$(TestPackagesBuildDir)%(Identity)/bin/$(Configuration)/</OutputPath>
@ -208,8 +152,6 @@
<BaseTestPackageProject>
<ProjectPath>%(ProjectDir)%(ProjectName)</ProjectPath>
<BuildInputIncludeFilter>%(ProjectDir)**/*.*</BuildInputIncludeFilter>
<BuildInputExcludeFilter>%(ProjectDir)bin/**/*.*;%(ProjectDir)obj/**/*.*</BuildInputExcludeFilter>
</BaseTestPackageProject>
</ItemGroup>
</Target>
@ -219,4 +161,4 @@
<NuPkgName>%(Name)</NuPkgName>
</BaseTestPackageProject>
</ItemDefinitionGroup>
</Project>
</Project>

View file

@ -0,0 +1,9 @@
<Project DefaultTargets="RunValidation">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Import Project="$(RepoRoot)/build/Microsoft.DotNet.Cli.tasks" />
<Target Name="RunValidation">
<DotNetMSBuild Arguments=" /v:diag $(MSBuildThisFileDirectory)/InvokeWithStage2.proj /p:ToolPath=&quot;$(Stage2Directory)&quot;"
ToolPath="$(Stage2Directory)" />
</Target>
</Project>

View file

@ -0,0 +1,29 @@
<Project DefaultTargets="RunValidation">
<PropertyGroup>
<NormalizedToolPath>$([System.IO.Path]::GetDirectoryName($(ToolPath)/))</NormalizedToolPath>
</PropertyGroup>
<PropertyGroup>
<MSBuildExtensionsPathInToolPath>false</MSBuildExtensionsPathInToolPath>
<MSBuildExtensionsPathInToolPath Condition="$(MSBuildExtensionsPath.StartsWith('$(NormalizedToolPath)'))">true</MSBuildExtensionsPathInToolPath>
<CscToolExeInToolPath>false</CscToolExeInToolPath>
<CscToolExeInToolPath Condition="$(CscToolExe.StartsWith('$(NormalizedToolPath)'))">true</CscToolExeInToolPath>
<MSBuildSDKsPathInToolPath>false</MSBuildSDKsPathInToolPath>
<MSBuildSDKsPathInToolPath Condition="$(MSBuildSDKsPath.StartsWith('$(NormalizedToolPath)'))">true</MSBuildSDKsPathInToolPath>
</PropertyGroup>
<Target Name="RunValidation">
<Error Condition=" '$(ToolPath)' == '' "
Text="ToolPath not set" />
<Error Condition=" '$(MSBuildExtensionsPathInToolPath)' == 'false' "
Text="MSBuildExtensionsPath '$(MSBuildExtensionsPath)' not in ToolPath '$(NormalizedToolPath)'" />
<Error Condition=" '$(CscToolExeInToolPath)' == 'false' "
Text="CscToolExe '$(CscToolExe)' not in ToolPath '$(NormalizedToolPath)'" />
<Error Condition=" '$(MSBuildSDKsPathInToolPath)' == 'false' "
Text="MSBuildSDKsPath '$(MSBuildSDKsPath)' not in ToolPath '$(NormalizedToolPath)'" />
</Target>
</Project>

View file

@ -3,7 +3,7 @@
namespace Microsoft.DotNet.Cli.Build
{
public class DotNetBuild : DotNetTool
public class DotNetBuild : DotNetMSBuildTool
{
protected override string Command
{
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
protected override string Args
{
get { return $"{GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {GetOutputPath()} {GetMaxCpuCount()}"; }
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {GetOutputPath()}"; }
}
public string BuildBasePath { get; set; }
@ -26,9 +26,7 @@ namespace Microsoft.DotNet.Cli.Build
public string ProjectPath { get; set; }
public string OutputPath { get; set; }
public string MaxCpuCount { get; set; }
private string GetOutputPath()
{
if (!string.IsNullOrEmpty(OutputPath))
@ -78,15 +76,5 @@ namespace Microsoft.DotNet.Cli.Build
return null;
}
private string GetMaxCpuCount()
{
if (!string.IsNullOrEmpty(MaxCpuCount))
{
return $"/maxcpucount:{MaxCpuCount}";
}
return null;
}
}
}

View file

@ -0,0 +1,30 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Microsoft.DotNet.Cli.Build
{
public class DotNetMSBuild : DotNetMSBuildTool
{
protected override string Command
{
get { return "msbuild"; }
}
protected override string Args
{
get { return $"{base.Args} {GetArguments()}"; }
}
public string Arguments { get; set; }
private string GetArguments()
{
if (!string.IsNullOrEmpty(Arguments))
{
return $"{Arguments}";
}
return null;
}
}
}

View file

@ -0,0 +1,32 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Microsoft.DotNet.Cli.Build.Framework;
namespace Microsoft.DotNet.Cli.Build
{
public abstract class DotNetMSBuildTool : DotNetTool
{
public int MaxCpuCount {get; set;} = 0;
protected override string Args
{
get
{
return $"{GetMaxCpuCountArg()}";
}
}
private string GetMaxCpuCountArg()
{
if (MaxCpuCount > 0)
{
return $"/m:{MaxCpuCount}";
}
return null;
}
}
}

View file

@ -3,7 +3,7 @@
namespace Microsoft.DotNet.Cli.Build
{
public class DotNetPack : DotNetTool
public class DotNetPack : DotNetMSBuildTool
{
protected override string Command
{
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
protected override string Args
{
get { return $"{GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {MsbuildArgs}"; }
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {MsbuildArgs}"; }
}
public string Configuration { get; set; }

View file

@ -3,7 +3,7 @@
namespace Microsoft.DotNet.Cli.Build
{
public class DotNetPublish : DotNetTool
public class DotNetPublish : DotNetMSBuildTool
{
protected override string Command
{
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
protected override string Args
{
get { return $"{GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetNativeSubdirectory()} {GetBuildBasePath()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetMSBuildArgs()}"; }
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetNativeSubdirectory()} {GetBuildBasePath()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetMSBuildArgs()}"; }
}
public string BuildBasePath { get; set; }

View file

@ -3,7 +3,7 @@
namespace Microsoft.DotNet.Cli.Build
{
public class DotNetRestore : DotNetTool
public class DotNetRestore : DotNetMSBuildTool
{
protected override string Command
{
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
protected override string Args
{
get { return $"{GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; }
get { return $"{base.Args} {GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; }
}
public string ConfigFile { get; set; }

View file

@ -3,7 +3,7 @@
namespace Microsoft.DotNet.Cli.Build
{
public class DotNetTest : DotNetTool
public class DotNetTest : DotNetMSBuildTool
{
protected override string Command
{
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
protected override string Args
{
get { return $"{GetProjectPath()} {GetConfiguration()} {GetLogger()} {GetNoBuild()}"; }
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetLogger()} {GetNoBuild()}"; }
}
public string Configuration { get; set; }

View file

@ -1,5 +1,6 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Diagnostics;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
@ -18,6 +19,24 @@ namespace Microsoft.DotNet.Cli.Build
protected abstract string Args { get; }
protected override ProcessStartInfo GetProcessStartInfo(
string pathToTool,
string commandLineCommands,
string responseFileSwitch)
{
var psi = base.GetProcessStartInfo(
pathToTool,
commandLineCommands,
responseFileSwitch);
foreach (var environmentVariableName in new EnvironmentFilter().GetEnvironmentVariableNamesToRemove())
{
psi.Environment.Remove(environmentVariableName);
}
return psi;
}
public string WorkingDirectory { get; set; }
protected override string ToolName

View file

@ -0,0 +1,57 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.DotNet.Cli.Build
{
public class EnvironmentFilter
{
private const string _MSBuildEnvironmentVariablePrefix = "MSBuild";
private const string _DotNetEnvironmentVariablePrefix = "DOTNET";
private const string _NugetEnvironmentVariablePrefix = "NUGET";
private IEnumerable<string> _prefixesOfEnvironmentVariablesToRemove = new string []
{
_MSBuildEnvironmentVariablePrefix,
_DotNetEnvironmentVariablePrefix,
_NugetEnvironmentVariablePrefix
};
private IEnumerable<string> _environmentVariablesToRemove = new string []
{
"CscToolExe"
};
private IEnumerable<string> _environmentVariablesToKeep = new string []
{
"DOTNET_CLI_TELEMETRY_SESSIONID",
"DOTNET_RUNTIME_ID",
"DOTNET_SKIP_FIRST_TIME_EXPERIENCE",
"NUGET_PACKAGES"
};
public IEnumerable<string> GetEnvironmentVariableNamesToRemove()
{
var allEnvironmentVariableNames = (IEnumerable<string>)Environment
.GetEnvironmentVariables()
.Keys
.Cast<string>();
var environmentVariablesToRemoveByPrefix = allEnvironmentVariableNames
.Where(e => _prefixesOfEnvironmentVariablesToRemove.Any(p => e.StartsWith(p)));
var environmentVariablesToRemoveByName = allEnvironmentVariableNames
.Where(e => _environmentVariablesToRemove.Contains(e));
var environmentVariablesToRemove = environmentVariablesToRemoveByName
.Concat(environmentVariablesToRemoveByPrefix)
.Distinct()
.Except(_environmentVariablesToKeep);
return environmentVariablesToRemove;
}
}
}

View file

@ -3,10 +3,10 @@
<PropertyGroup>
<Description>Build scripts for dotnet-cli</Description>
<VersionPrefix>1.0.0</VersionPrefix>
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>bin\$(Configuration)</OutputPath>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);portable-net45+win8+wp8+wpa81</PackageTargetFallback>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);portable-net45+win8+wp8+wpa81</PackageTargetFallback>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\shared-build-targets-utils\shared-build-targets-utils.csproj" />
@ -17,7 +17,7 @@
<Version>1.6.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR">
<Version>1.0.4</Version>
<Version>1.1.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.Build">
<Version>$(CLI_MSBuild_Version)</Version>

0
run-build.sh Executable file → Normal file
View file

View file

@ -6,6 +6,10 @@
# Dockerfile that creates a container suitable to build dotnet-cli
FROM centos:7.1.1503
# Swap the "fakesystemd" package with the real "systemd" package, because fakesystemd conflicts with openssl-devel.
# The CentOS Docker image uses fakesystemd instead of systemd to reduce disk space.
RUN yum -q -y swap -- remove fakesystemd -- install systemd systemd-libs
RUN yum -q -y install deltarpm
RUN yum -q -y install epel-release
# RUN yum -y update

View file

@ -133,5 +133,6 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \
-e CHECKSUM_STORAGE_ACCOUNT \
-e CHECKSUM_STORAGE_CONTAINER \
-e CLIBUILD_SKIP_TESTS \
-e CommitCount \
$DOTNET_BUILD_CONTAINER_TAG \
$BUILD_COMMAND "$@"

View file

@ -4,10 +4,6 @@ namespace Microsoft.DotNet.Cli.Utils
{
public class CommandUnknownException : GracefulException
{
public CommandUnknownException()
{
}
public CommandUnknownException(string commandName) : base(string.Format(
LocalizableStrings.NoExecutableFoundMatchingCommand,
commandName))

View file

@ -3,7 +3,7 @@
using System;
namespace Microsoft.DotNet.Cli.Utils.ExceptionExtensions
namespace Microsoft.DotNet.Cli.Utils
{
internal static class ExceptionExtensions
{
@ -11,5 +11,10 @@ namespace Microsoft.DotNet.Cli.Utils.ExceptionExtensions
{
Reporter.Verbose.WriteLine($"Warning: Ignoring exception: {e.ToString().Yellow()}");
}
public static bool ShouldBeDisplayedAsError(this Exception e) =>
e.Data.Contains(CLI_User_Displayed_Exception);
internal const string CLI_User_Displayed_Exception = "CLI_User_Displayed_Exception";
}
}

View file

@ -4,12 +4,9 @@ namespace Microsoft.DotNet.Cli.Utils
{
public class GracefulException : Exception
{
public GracefulException()
{
}
public GracefulException(string message) : base(message)
{
Data.Add(ExceptionExtensions.CLI_User_Displayed_Exception, true);
}
public GracefulException(string format, params string[] args) : this(string.Format(format, args))
@ -18,6 +15,7 @@ namespace Microsoft.DotNet.Cli.Utils
public GracefulException(string message, Exception innerException) : base(message, innerException)
{
Data.Add(ExceptionExtensions.CLI_User_Displayed_Exception, true);
}
}
}

View file

@ -15,7 +15,7 @@
<Version>1.0.1-beta-000933</Version>
</PackageReference>
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
<Version>1.0.1-beta-000933</Version>
<Version>1.1.0</Version>
</PackageReference>
<PackageReference Include="NuGet.Versioning">
<Version>$(CLI_NuGet_Version)</Version>

View file

@ -165,7 +165,8 @@ namespace Microsoft.DotNet.Internal.ProjectModel
// Project files
project.Files = new ProjectFilesCollection(rawProject, project.ProjectDirectory, project.ProjectFilePath);
AddProjectFilesCollectionDiagnostics(rawProject, project);
AddProjectFilesDeprecationDiagnostics(rawProject, project);
ConvertDeprecatedToSupportedFormat(rawProject);
var commands = rawProject.Value<JToken>("commands") as JObject;
if (commands != null)
@ -758,10 +759,14 @@ namespace Microsoft.DotNet.Internal.ProjectModel
if (rawPackOptions != null)
{
var packOptionValue = rawPackOptions.Value<T>(option);
if (packOptionValue != null)
var hasOption = rawPackOptions.Value<JToken>(option) != null;
if (hasOption)
{
return packOptionValue;
var packOptionValue = rawPackOptions.Value<T>(option);
if (packOptionValue != null)
{
return packOptionValue;
}
}
}
@ -807,37 +812,45 @@ namespace Microsoft.DotNet.Internal.ProjectModel
return File.Exists(projectPath);
}
private static void AddProjectFilesCollectionDiagnostics(JObject rawProject, Project project)
private static void AddProjectFilesDeprecationDiagnostics(JObject rawProject, Project project)
{
var compileWarning = "'compile' in 'buildOptions'";
AddDiagnosticMesage(rawProject, project, "compile", compileWarning);
AddDiagnosticMesage(rawProject, project, "compileExclude", compileWarning);
AddDiagnosticMesage(rawProject, project, "compileFiles", compileWarning);
AddDiagnosticMesage(rawProject, project, "compileBuiltIn", compileWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "compile", compileWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "compileExclude", compileWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "compileFiles", compileWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "compileBuiltIn", compileWarning);
var resourceWarning = "'embed' in 'buildOptions'";
AddDiagnosticMesage(rawProject, project, "resource", resourceWarning);
AddDiagnosticMesage(rawProject, project, "resourceExclude", resourceWarning);
AddDiagnosticMesage(rawProject, project, "resourceFiles", resourceWarning);
AddDiagnosticMesage(rawProject, project, "resourceBuiltIn", resourceWarning);
AddDiagnosticMesage(rawProject, project, "namedResource", resourceWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "resource", resourceWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "resourceExclude", resourceWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "resourceFiles", resourceWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "resourceBuiltIn", resourceWarning);
// Issue: https://github.com/dotnet/cli/issues/5471
// This is why we mark it as an error which will fail migration.
AddDeprecatedDiagnosticMessage(
rawProject,
project,
"namedResource",
resourceWarning,
DiagnosticMessageSeverity.Error);
var contentWarning = "'publishOptions' to publish or 'copyToOutput' in 'buildOptions' to copy to build output";
AddDiagnosticMesage(rawProject, project, "content", contentWarning);
AddDiagnosticMesage(rawProject, project, "contentExclude", contentWarning);
AddDiagnosticMesage(rawProject, project, "contentFiles", contentWarning);
AddDiagnosticMesage(rawProject, project, "contentBuiltIn", contentWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "content", contentWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "contentExclude", contentWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "contentFiles", contentWarning);
AddDeprecatedDiagnosticMessage(rawProject, project, "contentBuiltIn", contentWarning);
AddDiagnosticMesage(rawProject, project, "packInclude", "'files' in 'packOptions'");
AddDiagnosticMesage(rawProject, project, "publishExclude", "'publishOptions'");
AddDiagnosticMesage(rawProject, project, "exclude", "'exclude' within 'compile' or 'embed'");
AddDeprecatedDiagnosticMessage(rawProject, project, "packInclude", "'files' in 'packOptions'");
AddDeprecatedDiagnosticMessage(rawProject, project, "publishExclude", "'publishOptions'");
AddDeprecatedDiagnosticMessage(rawProject, project, "exclude", "'exclude' within 'compile' or 'embed'");
}
private static void AddDiagnosticMesage(
private static void AddDeprecatedDiagnosticMessage(
JObject rawProject,
Project project,
string option,
string message)
string message,
DiagnosticMessageSeverity severity = DiagnosticMessageSeverity.Warning)
{
var lineInfo = rawProject.Value<IJsonLineInfo>(option);
if (lineInfo == null)
@ -850,11 +863,132 @@ namespace Microsoft.DotNet.Internal.ProjectModel
ErrorCodes.DOTNET1015,
$"The '{option}' option is deprecated. Use {message} instead.",
project.ProjectFilePath,
DiagnosticMessageSeverity.Warning,
severity,
lineInfo.LineNumber,
lineInfo.LinePosition));
}
private static void ConvertDeprecatedToSupportedFormat(JObject rawProject)
{
ConvertToBuildOptionsCompile(rawProject);
ConvertToBuildOptionsEmbed(rawProject);
ConvertToBuildOptionsCopyToOutput(rawProject);
ConvertToPackOptions(rawProject);
ConvertToPublishOptions(rawProject);
}
private static void ConvertToBuildOptionsCompile(JObject rawProject)
{
var jpath = "buildOptions.compile";
if (AreDeprecatedOptionsIgnored(rawProject, jpath))
{
return;
}
ConvertFromDeprecatedFormat(rawProject, jpath, "compile", "include");
ConvertFromDeprecatedFormat(rawProject, jpath, "exclude", "exclude");
ConvertFromDeprecatedFormat(rawProject, jpath, "compileExclude", "excludeFiles");
ConvertFromDeprecatedFormat(rawProject, jpath, "compileFiles", "includeFiles");
ConvertFromDeprecatedFormat(rawProject, $"{jpath}.builtIns", "compileBuiltIn", "include");
}
private static void ConvertToBuildOptionsEmbed(JObject rawProject)
{
var jpath = "buildOptions.embed";
if (AreDeprecatedOptionsIgnored(rawProject, jpath))
{
return;
}
ConvertFromDeprecatedFormat(rawProject, jpath, "resource", "include");
ConvertFromDeprecatedFormat(rawProject, jpath, "exclude", "exclude");
ConvertFromDeprecatedFormat(rawProject, jpath, "resourceExclude", "excludeFiles");
ConvertFromDeprecatedFormat(rawProject, jpath, "resourceFiles", "includeFiles");
ConvertFromDeprecatedFormat(rawProject, $"{jpath}.builtIns", "resourceBuiltIn", "include");
}
private static void ConvertToBuildOptionsCopyToOutput(JObject rawProject)
{
var jpath = "buildOptions.copyToOutput";
if (AreDeprecatedOptionsIgnored(rawProject, jpath))
{
return;
}
ConvertFromDeprecatedFormat(rawProject, jpath, "content", "include");
ConvertFromDeprecatedFormat(rawProject, jpath, "contentExclude", "excludeFiles");
ConvertFromDeprecatedFormat(rawProject, jpath, "contentFiles", "includeFiles");
ConvertFromDeprecatedFormat(rawProject, $"{jpath}.builtIns", "contentBuiltIn", "include");
}
private static void ConvertToPackOptions(JObject rawProject)
{
var jpath = "packOptions";
if (AreDeprecatedOptionsIgnored(rawProject, jpath))
{
return;
}
ConvertFromDeprecatedFormat(rawProject, $"{jpath}.files", "packInclude", "include");
}
private static void ConvertToPublishOptions(JObject rawProject)
{
var jpath = "publishOptions";
if (AreDeprecatedOptionsIgnored(rawProject, jpath))
{
return;
}
ConvertFromDeprecatedFormat(rawProject, jpath, "content", "include");
ConvertFromDeprecatedFormat(rawProject, jpath, "publishExclude", "exclude");
ConvertFromDeprecatedFormat(rawProject, jpath, "contentExclude", "excludeFiles");
ConvertFromDeprecatedFormat(rawProject, jpath, "contentFiles", "includeFiles");
ConvertFromDeprecatedFormat(rawProject, $"{jpath}.builtIns", "contentBuiltIn", "include");
}
private static bool AreDeprecatedOptionsIgnored(JObject rawProject, string jpathToNewFormatObject)
{
// If the node already exists this means that the project.json file contained both the old and
// new format. In these cases the project.json build ignores the deprecated format and just uses
// the new format.
return (rawProject.SelectToken(jpathToNewFormatObject) != null);
}
private static void ConvertFromDeprecatedFormat(
JObject rawProject,
string jpathToObject,
string deprecatedKey,
string newKey
)
{
var deprecatedValue = rawProject.Value<JToken>(deprecatedKey);
if (deprecatedValue != null)
{
var objectNode = GetOrCreateObjectHierarchy(rawProject, jpathToObject);
objectNode[newKey] = deprecatedValue.DeepClone();
}
}
private static JObject GetOrCreateObjectHierarchy(JObject rawProject, string jpath)
{
var currentObject = rawProject as JObject;
var objectHierarchy = jpath.Split('.');
foreach (var name in objectHierarchy)
{
var childObject = currentObject.Value<JObject>(name);
if (childObject == null)
{
childObject = new JObject();
currentObject[name] = childObject;
}
currentObject = childObject;
}
return currentObject;
}
private static bool TryGetStringEnumerable(JToken token, out IEnumerable<string> result)
{
IEnumerable<string> values;

Some files were not shown because too many files have changed in this diff Show more