Merge branch 'rel/1.0.0' into PortChange
This commit is contained in:
commit
bbf14163a4
148 changed files with 3078 additions and 750 deletions
|
@ -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:
|
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 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.
|
* 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.
|
* 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.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ConsoleApplication
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Hello World!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ConsoleApplication
|
||||||
|
{
|
||||||
|
public class HelperBuiltIn1
|
||||||
|
{
|
||||||
|
public static string GetMessage()
|
||||||
|
{
|
||||||
|
return "Hello from HelperBuiltIn1 class!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ConsoleApplication
|
||||||
|
{
|
||||||
|
public class HelperBuiltIn2
|
||||||
|
{
|
||||||
|
public static string GetMessage()
|
||||||
|
{
|
||||||
|
return "Hello from HelperBuiltIn2 class!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ConsoleApplication
|
||||||
|
{
|
||||||
|
public class IncludeThis
|
||||||
|
{
|
||||||
|
public static string GetMessage()
|
||||||
|
{
|
||||||
|
return "Hello from IncludeThis class!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
This does not compile but is used to test compile exclusion.
|
|
@ -0,0 +1 @@
|
||||||
|
This does not compile but is used to test compile exclusion.
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ConsoleApplication
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Hello World!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ConsoleApplication
|
||||||
|
{
|
||||||
|
public class Helper1
|
||||||
|
{
|
||||||
|
public static string GetMessage()
|
||||||
|
{
|
||||||
|
return "Hello from Helper1 class!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ConsoleApplication
|
||||||
|
{
|
||||||
|
public class Helper2
|
||||||
|
{
|
||||||
|
public static string GetMessage()
|
||||||
|
{
|
||||||
|
return "Hello from Helper2 class!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ConsoleApplication
|
||||||
|
{
|
||||||
|
public class IncludeThis
|
||||||
|
{
|
||||||
|
public static string GetMessage()
|
||||||
|
{
|
||||||
|
return "Hello from IncludeThis class!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
Test content file that should be included.
|
|
@ -0,0 +1 @@
|
||||||
|
Test content file that should be included.
|
|
@ -0,0 +1 @@
|
||||||
|
Test content file that should be included.
|
|
@ -0,0 +1 @@
|
||||||
|
Test content file that should be included.
|
|
@ -0,0 +1 @@
|
||||||
|
Test content file that should be excluded.
|
|
@ -0,0 +1 @@
|
||||||
|
Test content file that should be excluded.
|
|
@ -0,0 +1 @@
|
||||||
|
Test content file that should be included.
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ConsoleApplication
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Hello World!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
Test pack content file.
|
|
@ -0,0 +1 @@
|
||||||
|
Test pack content file.
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace ConsoleApplication
|
||||||
|
{
|
||||||
|
public class Program
|
||||||
|
{
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Hello World!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -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>
|
|
@ -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}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
This is not a resource file but is used to test resource exclusion.
|
|
@ -0,0 +1 @@
|
||||||
|
This is not a resource file but is used to test resource exclusion.
|
|
@ -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}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -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>
|
|
@ -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}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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>
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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
|
|
@ -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
|
|
@ -2,14 +2,14 @@
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
namespace TestApp
|
||||||
namespace TestLibrary
|
|
||||||
{
|
{
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -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>
|
|
@ -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": {}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"projects": [ "." ]
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
This is just for our test to verify that we do not remove the readme.txt link from the solution.
|
|
@ -8,12 +8,6 @@
|
||||||
<ProjectGuid>F8F96F4A-F10C-4C54-867C-A9EFF55494C8</ProjectGuid>
|
<ProjectGuid>F8F96F4A-F10C-4C54-867C-A9EFF55494C8</ProjectGuid>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="**\*.cs" />
|
|
||||||
<EmbeddedResource Include="**\*.resx" Exclude="@(EmbeddedResource)" />
|
|
||||||
<EmbeddedResource Include="compiler\resources\**\*" Exclude="@(EmbeddedResource)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="NETStandard.Library">
|
<PackageReference Include="NETStandard.Library">
|
||||||
<Version>1.6.0</Version>
|
<Version>1.6.0</Version>
|
||||||
|
|
|
@ -2,9 +2,9 @@ using System;
|
||||||
|
|
||||||
namespace App.Tests
|
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!");
|
Console.WriteLine("Hello World!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0-rc</VersionPrefix>
|
<VersionPrefix>1.0.0-rc</VersionPrefix>
|
||||||
<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>
|
<TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>
|
||||||
<AssemblyName>dotnet-desktop-and-portable</AssemblyName>
|
<AssemblyName>dotnet-desktop-and-portable</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<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>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
|
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
|
||||||
|
@ -23,8 +23,4 @@
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
|
||||||
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
<AssemblyName>dotnet-hello</AssemblyName>
|
<AssemblyName>dotnet-hello</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<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>
|
<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>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>2.0.0</VersionPrefix>
|
<VersionPrefix>2.0.0</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
<AssemblyName>dotnet-hello</AssemblyName>
|
<AssemblyName>dotnet-hello</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<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>
|
<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>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="dotnet-hello">
|
<PackageReference Include="dotnet-hello">
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.0</Version>
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.0</VersionPrefix>
|
||||||
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
|
<TargetFrameworks>netcoreapp1.1</TargetFrameworks>
|
||||||
<AssemblyName>AppWithDirectDep</AssemblyName>
|
<AssemblyName>AppWithDirectDep</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="dotnet-hello">
|
<PackageReference Include="dotnet-hello">
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.0</Version>
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Hello World!");
|
||||||
|
}
|
||||||
|
}
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
"version": "1.0.0-*",
|
|
||||||
"compilationOptions": {
|
|
||||||
"xmlDoc": true
|
|
||||||
},
|
|
||||||
"packInclude": {},
|
|
||||||
"dependencies": {
|
|
||||||
"NETStandard.Library": "1.6.0"
|
|
||||||
},
|
|
||||||
"frameworks": {
|
|
||||||
"netstandard1.5": {}
|
|
||||||
}
|
|
||||||
}
|
|
14
build.proj
14
build.proj
|
@ -17,14 +17,14 @@
|
||||||
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
|
||||||
<CoreSetupChannel>preview</CoreSetupChannel>
|
<CoreSetupChannel>release/1.1.0</CoreSetupChannel>
|
||||||
<SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
|
<SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
|
||||||
<SharedFrameworkVersion>1.0.3</SharedFrameworkVersion>
|
<SharedFrameworkVersion>1.1.0</SharedFrameworkVersion>
|
||||||
<SharedHostVersion>1.0.1</SharedHostVersion>
|
<SharedHostVersion>1.1.0</SharedHostVersion>
|
||||||
<HostFxrVersion>1.0.1</HostFxrVersion>
|
<HostFxrVersion>1.1.0</HostFxrVersion>
|
||||||
|
|
||||||
<CoreCLRVersion>1.0.5</CoreCLRVersion>
|
<CoreCLRVersion>1.1.0</CoreCLRVersion>
|
||||||
<JitVersion>1.0.5</JitVersion>
|
<JitVersion>1.1.0</JitVersion>
|
||||||
|
|
||||||
<ExeExtension>.exe</ExeExtension>
|
<ExeExtension>.exe</ExeExtension>
|
||||||
<ExeExtension Condition=" '$(OS)' != 'Windows_NT' "></ExeExtension>
|
<ExeExtension Condition=" '$(OS)' != 'Windows_NT' "></ExeExtension>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
DependsOnTargets="MSBuildWorkaroundTarget;
|
DependsOnTargets="MSBuildWorkaroundTarget;
|
||||||
RestoreDotnetCliBuildFramework">
|
RestoreDotnetCliBuildFramework">
|
||||||
|
|
||||||
<Exec Command="$(DotnetStage0) publish -o $(DotnetCliBuildDirectory)/bin --framework netcoreapp1.0"
|
<Exec Command="$(DotnetStage0) publish -o $(DotnetCliBuildDirectory)/bin --framework netcoreapp1.1"
|
||||||
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
WorkingDirectory="$(DotnetCliBuildDirectory)"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
@ -81,10 +81,15 @@
|
||||||
<SharedFramework Remove="*" />
|
<SharedFramework Remove="*" />
|
||||||
<SharedFramework Include="$(SharedFrameworkPublishDirectory)/**/*" />
|
<SharedFramework Include="$(SharedFrameworkPublishDirectory)/**/*" />
|
||||||
|
|
||||||
<AssetsToRemoveFromDeps Remove="*" />
|
<RuntimeTargetsAssetsToRemoveFromDeps Remove="*" />
|
||||||
<AssetsToRemoveFromDeps Include="csc" />
|
<RuntimeTargetsAssetsToRemoveFromDeps Include="csc" />
|
||||||
<AssetsToRemoveFromDeps Include="vbc" />
|
<RuntimeTargetsAssetsToRemoveFromDeps Include="vbc" />
|
||||||
<AssetsToRemoveFromDeps Include="MSBuild" />
|
<RuntimeTargetsAssetsToRemoveFromDeps Include="MSBuild" />
|
||||||
|
|
||||||
|
<RuntimeAssetsToRemoveFromDeps Remove="*" />
|
||||||
|
<RuntimeAssetsToRemoveFromDeps Include="redist" />
|
||||||
|
<RuntimeAssetsToRemoveFromDeps Include="tool_msbuild" />
|
||||||
|
<RuntimeAssetsToRemoveFromDeps Include="tool_nuget" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Delete Files="@(BinObj)" />
|
<Delete Files="@(BinObj)" />
|
||||||
|
@ -98,7 +103,10 @@
|
||||||
|
|
||||||
<!-- Workaround for https://github.com/dotnet/sdk/issues/115 -->
|
<!-- Workaround for https://github.com/dotnet/sdk/issues/115 -->
|
||||||
<ItemGroup>
|
<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\**" />
|
<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>
|
</ItemGroup>
|
||||||
<Copy SourceFiles="@(HackFilesToCopy)"
|
<Copy SourceFiles="@(HackFilesToCopy)"
|
||||||
DestinationFiles="@(HackFilesToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
DestinationFiles="@(HackFilesToCopy->'$(SdkOutputDirectory)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||||
|
@ -107,7 +115,7 @@
|
||||||
<DotNetPublish ToolPath="%(Stage.DotnetDir)"
|
<DotNetPublish ToolPath="%(Stage.DotnetDir)"
|
||||||
Output="$(SdkOutputDirectory)"
|
Output="$(SdkOutputDirectory)"
|
||||||
Configuration="$(Configuration)"
|
Configuration="$(Configuration)"
|
||||||
VersionSuffix="$(CommitCount)"
|
VersionSuffix="rc4-$(CommitCount)"
|
||||||
ProjectPath="$(SrcDirectory)/redist/redist.csproj"
|
ProjectPath="$(SrcDirectory)/redist/redist.csproj"
|
||||||
MSBuildArgs="/p:GenerateRuntimeConfigurationFiles=true" />
|
MSBuildArgs="/p:GenerateRuntimeConfigurationFiles=true" />
|
||||||
|
|
||||||
|
@ -115,7 +123,7 @@
|
||||||
<DotNetPublish ToolPath="%(Stage.DotnetDir)"
|
<DotNetPublish ToolPath="%(Stage.DotnetDir)"
|
||||||
Output="$(SdkOutputDirectory)/Roslyn"
|
Output="$(SdkOutputDirectory)/Roslyn"
|
||||||
Configuration="$(Configuration)"
|
Configuration="$(Configuration)"
|
||||||
VersionSuffix="$(CommitCount)"
|
VersionSuffix="rc4-$(CommitCount)"
|
||||||
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
|
ProjectPath="$(SrcDirectory)/tool_roslyn/tool_roslyn.csproj" />
|
||||||
|
|
||||||
<!-- Corehostify Binaries -->
|
<!-- Corehostify Binaries -->
|
||||||
|
@ -146,7 +154,11 @@
|
||||||
|
|
||||||
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
|
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
|
||||||
SectionName="runtimeTargets"
|
SectionName="runtimeTargets"
|
||||||
AssetPath="$(BinaryToCorehostifyRelDir)/%(AssetsToRemoveFromDeps.Identity).exe" />
|
AssetPath="$(BinaryToCorehostifyRelDir)/%(RuntimeTargetsAssetsToRemoveFromDeps.Identity).exe" />
|
||||||
|
|
||||||
|
<RemoveAssetFromDepsPackages DepsFile="$(SdkOutputDirectory)/redist.deps.json"
|
||||||
|
SectionName="runtime"
|
||||||
|
AssetPath="%(RuntimeAssetsToRemoveFromDeps.Identity).dll" />
|
||||||
|
|
||||||
<Copy SourceFiles="$(SdkOutputDirectory)/redist.deps.json"
|
<Copy SourceFiles="$(SdkOutputDirectory)/redist.deps.json"
|
||||||
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json" />
|
DestinationFiles="$(SdkOutputDirectory)/%(BundledTools.Identity).deps.json" />
|
||||||
|
@ -161,6 +173,7 @@
|
||||||
<!-- cleanup project output we don't need -->
|
<!-- cleanup project output we don't need -->
|
||||||
<Delete Files="$(SdkOutputDirectory)/redist%(PublishOutputExtensions.Identity)" />
|
<Delete Files="$(SdkOutputDirectory)/redist%(PublishOutputExtensions.Identity)" />
|
||||||
<Delete Files="$(SdkOutputDirectory)/tool_msbuild%(PublishOutputExtensions.Identity)" />
|
<Delete Files="$(SdkOutputDirectory)/tool_msbuild%(PublishOutputExtensions.Identity)" />
|
||||||
|
<Delete Files="$(SdkOutputDirectory)/tool_nuget%(PublishOutputExtensions.Identity)" />
|
||||||
|
|
||||||
<!-- Copy Host to SDK Directory -->
|
<!-- Copy Host to SDK Directory -->
|
||||||
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostBaseName)"
|
<Copy SourceFiles="$(SharedFrameworkNameVersionPath)/$(DotnetHostBaseName)"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CLI_MSBuild_Version>15.1.0-preview-000523-01</CLI_MSBuild_Version>
|
<CLI_MSBuild_Version>15.1.0-preview-000539-01</CLI_MSBuild_Version>
|
||||||
<CLI_Roslyn_Version>2.0.0-rc3-61212-03</CLI_Roslyn_Version>
|
<CLI_Roslyn_Version>2.0.0-rc4-61325-08</CLI_Roslyn_Version>
|
||||||
<CLI_NETSDK_Version>1.0.0-alpha-20170117-4</CLI_NETSDK_Version>
|
<CLI_NETSDK_Version>1.0.0-alpha-20170123-1</CLI_NETSDK_Version>
|
||||||
<CLI_NuGet_Version>4.0.0-rc3</CLI_NuGet_Version>
|
<CLI_NuGet_Version>4.0.0-rc3</CLI_NuGet_Version>
|
||||||
<CLI_WEBSDK_Version>1.0.0-alpha-20170120-3-249</CLI_WEBSDK_Version>
|
<CLI_WEBSDK_Version>1.0.0-alpha-20170120-3-249</CLI_WEBSDK_Version>
|
||||||
<CLI_TestPlatform_Version>15.0.0-preview-20170123-02</CLI_TestPlatform_Version>
|
<CLI_TestPlatform_Version>15.0.0-preview-20170123-02</CLI_TestPlatform_Version>
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<SdkBrandName>Microsoft .NET Core 1.0.3 - SDK RC 4</SdkBrandName>
|
<SdkBrandName>Microsoft .NET Core 1.0.3 - SDK RC 4</SdkBrandName>
|
||||||
<SharedFrameworkBrandName>Microsoft .NET Core 1.0.3 - Runtime</SharedFrameworkBrandName>
|
<SharedFrameworkBrandName>Microsoft .NET Core 1.0.3 - Runtime</SharedFrameworkBrandName>
|
||||||
<SharedHostBrandName>Microsoft .NET Core 1.0.1 - Host</SharedHostBrandName>
|
<SharedHostBrandName>Microsoft .NET Core 1.1.0 - Host</SharedHostBrandName>
|
||||||
<HostFxrBrandName>Microsoft .NET Core 1.0.1 - Host FX Resolver</HostFxrBrandName>
|
<HostFxrBrandName>Microsoft .NET Core 1.1.0 - Host FX Resolver</HostFxrBrandName>
|
||||||
|
|
||||||
<AdditionalSharedFrameworkBrandName>Microsoft .NET Core 1.1.0 - Runtime</AdditionalSharedFrameworkBrandName>
|
<AdditionalSharedFrameworkBrandName>Microsoft .NET Core 1.1.0 - Runtime</AdditionalSharedFrameworkBrandName>
|
||||||
<AdditionalSharedHostBrandName>Microsoft .NET Core 1.1.0 - Host</AdditionalSharedHostBrandName>
|
<AdditionalSharedHostBrandName>Microsoft .NET Core 1.1.0 - Host</AdditionalSharedHostBrandName>
|
||||||
|
|
|
@ -43,6 +43,10 @@
|
||||||
<IntermediateDirectory>$(BaseOutputDirectory)/intermediate</IntermediateDirectory>
|
<IntermediateDirectory>$(BaseOutputDirectory)/intermediate</IntermediateDirectory>
|
||||||
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
|
<PackagesDirectory>$(BaseOutputDirectory)/packages</PackagesDirectory>
|
||||||
<SharedFrameworkPublishDirectory>$(IntermediateDirectory)/sharedFrameworkPublish</SharedFrameworkPublishDirectory>
|
<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>
|
</PropertyGroup>
|
||||||
|
|
||||||
<GetCommitHash RepoRoot="$(RepoRoot)">
|
<GetCommitHash RepoRoot="$(RepoRoot)">
|
||||||
|
@ -121,10 +125,10 @@
|
||||||
|
|
||||||
<!-- Additional Shared Framework to be installed -->
|
<!-- Additional Shared Framework to be installed -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AdditionalCoreSetupChannel>release/1.1.0</AdditionalCoreSetupChannel>
|
<AdditionalCoreSetupChannel>preview</AdditionalCoreSetupChannel>
|
||||||
<AdditionalSharedFrameworkVersion>1.1.0</AdditionalSharedFrameworkVersion>
|
<AdditionalSharedFrameworkVersion>1.0.3</AdditionalSharedFrameworkVersion>
|
||||||
<AdditionalSharedHostVersion>1.1.0</AdditionalSharedHostVersion>
|
<AdditionalSharedHostVersion>1.0.1</AdditionalSharedHostVersion>
|
||||||
<AdditionalHostFxrVersion>1.1.0</AdditionalHostFxrVersion>
|
<AdditionalHostFxrVersion>1.0.1</AdditionalHostFxrVersion>
|
||||||
|
|
||||||
<!-- Additional Downloaded Installers + Archives -->
|
<!-- Additional Downloaded Installers + Archives -->
|
||||||
<AdditionalDownloadedSharedHostInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-host-$(ProductMonikerRid).$(AdditionalSharedHostVersion)$(InstallerExtension)</AdditionalDownloadedSharedHostInstallerFileName>
|
<AdditionalDownloadedSharedHostInstallerFileName Condition=" '$(InstallerExtension)' != '' ">dotnet-host-$(ProductMonikerRid).$(AdditionalSharedHostVersion)$(InstallerExtension)</AdditionalDownloadedSharedHostInstallerFileName>
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
EnvironmentVariables=$(RunTestEnvironmentVariables);
|
EnvironmentVariables=$(RunTestEnvironmentVariables);
|
||||||
TestProject=%(TestProjects.Identity);
|
TestProject=%(TestProjects.Identity);
|
||||||
TestResultXmlDir=$(TestResultXmlDir);
|
TestResultXmlDir=$(TestResultXmlDir);
|
||||||
ToolPath=$(Stage0Directory);
|
ToolPath=$(Stage2Directory);
|
||||||
WorkingDirectory=$([System.IO.Directory]::GetParent(%(TestProjects.Identity)))
|
WorkingDirectory=$([System.IO.Directory]::GetParent(%(TestProjects.Identity)))
|
||||||
</Properties>
|
</Properties>
|
||||||
</ProjectsToTest>
|
</ProjectsToTest>
|
||||||
|
@ -86,31 +86,19 @@
|
||||||
|
|
||||||
<Target Name="CreateTestAssetPackageNuPkgs"
|
<Target Name="CreateTestAssetPackageNuPkgs"
|
||||||
DependsOnTargets="SetupTestPackageProjectData;"
|
DependsOnTargets="SetupTestPackageProjectData;"
|
||||||
Inputs="%(TestPackageProject.PackInputs)"
|
Outputs="%(TestPackageProject.Identity)">
|
||||||
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>
|
|
||||||
|
|
||||||
<DotNetRestore ToolPath="$(Stage2Directory)"
|
<DotNetRestore ToolPath="$(Stage2Directory)"
|
||||||
|
Source="$(TestPackagesDir)"
|
||||||
ConfigFile="$(RepoRoot)\NuGet.Config"
|
ConfigFile="$(RepoRoot)\NuGet.Config"
|
||||||
ProjectPath="%(TestPackageProject.ProjectPath)" />
|
ProjectPath="%(TestPackageProject.ProjectPath)" />
|
||||||
|
|
||||||
<DotNetBuild Framework="$(Framework)"
|
|
||||||
Runtime="%(TestPackageProject.Runtime)"
|
|
||||||
ProjectPath="%(TestPackageProject.ProjectPath)"
|
|
||||||
ToolPath="$(Stage0Directory)" />
|
|
||||||
|
|
||||||
<!-- https://github.com/NuGet/Home/issues/4063 -->
|
<!-- https://github.com/NuGet/Home/issues/4063 -->
|
||||||
<DotNetPack NoBuild="True"
|
<DotNetPack Output="$(TestPackagesDir)"
|
||||||
Output="$(TestPackagesDir)"
|
|
||||||
ProjectPath="%(TestPackageProject.ProjectPath)"
|
ProjectPath="%(TestPackageProject.ProjectPath)"
|
||||||
ToolPath="$(Stage0Directory)"
|
ToolPath="$(Stage0Directory)"
|
||||||
VersionSuffix="%(TestPackageProject.VersionSuffix)"
|
VersionSuffix="%(TestPackageProject.VersionSuffix)"
|
||||||
MsbuildArgs="$(DotNetPackMsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion)" />
|
MsbuildArgs="%(TestPackageProject.MsbuildArgs) /p:SdkNuGetVersion=$(SdkNugetVersion)" />
|
||||||
|
|
||||||
</Target>
|
</Target>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -93,12 +93,12 @@
|
||||||
|
|
||||||
<Message Text="Publishing Archiver" />
|
<Message Text="Publishing Archiver" />
|
||||||
|
|
||||||
<DotNetPublish ToolPath="$(Stage0Directory)"
|
<DotNetPublish ToolPath="$(Stage2Directory)"
|
||||||
WorkingDirectory="$(RepoRoot)/tools/Archiver"
|
WorkingDirectory="$(RepoRoot)/tools/Archiver"
|
||||||
Output="$(ToolsOutputDirectory)"
|
Output="$(ToolsOutputDirectory)"
|
||||||
Configuration="$(Configuration)" />
|
Configuration="$(Configuration)" />
|
||||||
|
|
||||||
<Exec Command="$(DotnetStage0) $(ArchiverDll) -a $(IntermediateArchive) $(NuGetPackagesArchiveFolder)" />
|
<Exec Command="$(DotnetStage2) $(ArchiverDll) -a $(IntermediateArchive) $(NuGetPackagesArchiveFolder)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="SetupNuGetPackagesArchiveInputsOutputs"
|
<Target Name="SetupNuGetPackagesArchiveInputsOutputs"
|
||||||
|
|
|
@ -3,14 +3,9 @@
|
||||||
<Target Name="InitCrossgenProps"
|
<Target Name="InitCrossgenProps"
|
||||||
DependsOnTargets="Init">
|
DependsOnTargets="Init">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<CoreCLRRid>$(Rid)</CoreCLRRid>
|
<CoreCLRPackageName>runtime.$(CoreCLRRid).microsoft.netcore.runtime.coreclr</CoreCLRPackageName>
|
||||||
<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>
|
|
||||||
|
|
||||||
<CrossGenPackageName>runtime.$(CoreCLRRid).microsoft.netcore.runtime.coreclr</CrossGenPackageName>
|
<CrossGenPackageName>runtime.$(CoreCLRRid).microsoft.netcore.runtime.coreclr</CrossGenPackageName>
|
||||||
<LibCLRJitPackageName>runtime.$(CoreCLRRid).microsoft.netcore.jit</LibCLRJitPackageName>
|
<LibCLRJitPackageName>runtime.$(CoreCLRRid).microsoft.netcore.jit</LibCLRJitPackageName>
|
||||||
<CoreCLRPackageName>runtime.$(CoreCLRRid).microsoft.netcore.runtime.coreclr</CoreCLRPackageName>
|
|
||||||
|
|
||||||
<CoreCLRLibsDir>$(NuGetPackagesDir)/$(CoreCLRPackageName)/$(CoreCLRVersion)/runtimes/$(CoreCLRRid)/lib/netstandard1.0</CoreCLRLibsDir>
|
<CoreCLRLibsDir>$(NuGetPackagesDir)/$(CoreCLRPackageName)/$(CoreCLRVersion)/runtimes/$(CoreCLRRid)/lib/netstandard1.0</CoreCLRLibsDir>
|
||||||
<CrossgenPath>$(NuGetPackagesDir)/$(CrossGenPackageName)/$(CoreCLRVersion)/tools/crossgen$(ExeExtension)</CrossgenPath>
|
<CrossgenPath>$(NuGetPackagesDir)/$(CrossGenPackageName)/$(CoreCLRVersion)/tools/crossgen$(ExeExtension)</CrossgenPath>
|
||||||
|
|
|
@ -90,23 +90,23 @@
|
||||||
Outputs="$(DebianTestResultsXmlFile)" >
|
Outputs="$(DebianTestResultsXmlFile)" >
|
||||||
|
|
||||||
<!-- Install Dependencies and SDK Packages -->
|
<!-- 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 $(AdditionalDownloadedSharedHostInstallerFile)" />
|
||||||
<Exec Command="sudo dpkg -i $(AdditionalDownloadedHostFxrInstallerFile)" />
|
<Exec Command="sudo dpkg -i $(AdditionalDownloadedHostFxrInstallerFile)" />
|
||||||
<Exec Command="sudo dpkg -i $(AdditionalDownloadedSharedFrameworkInstallerFile)" />
|
<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)" />
|
<Exec Command="sudo dpkg -i $(SdkInstallerFile)" />
|
||||||
|
|
||||||
<!-- Run E2E -->
|
<!-- Run E2E -->
|
||||||
<DotNetRestore ProjectPath="$(EndToEndTestProject)"
|
<DotNetRestore ProjectPath="$(EndToEndTestProject)"
|
||||||
ToolPath="$(Stage0Directory)" />
|
ToolPath="$(DebianInstalledDirectory)" />
|
||||||
|
|
||||||
<DotNetTest ProjectPath="$(EndToEndTestProject)"
|
<DotNetTest ProjectPath="$(EndToEndTestProject)"
|
||||||
EnvironmentVariables="@(TestSdkDebTaskEnvironmentVariables)"
|
EnvironmentVariables="@(TestSdkDebTaskEnvironmentVariables)"
|
||||||
ToolPath="$(Stage0Directory)" />
|
ToolPath="$(DebianInstalledDirectory)" />
|
||||||
|
|
||||||
<!-- Clean up Packages -->
|
<!-- Clean up Packages -->
|
||||||
<Exec Command="sudo dpkg -r $(SdkDebianPackageName)" />
|
<Exec Command="sudo dpkg -r $(SdkDebianPackageName)" />
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<DotnetDebToolProjectJsonLines Include="{" />
|
<DotnetDebToolProjectJsonLines Include="{" />
|
||||||
<DotnetDebToolProjectJsonLines Include="%20%20%20%20"version": "1.0.0-*"," />
|
<DotnetDebToolProjectJsonLines Include="%20%20%20%20"version": "1.0.0-*"," />
|
||||||
<DotnetDebToolProjectJsonLines Include="%20%20%20%20"name": "$(DotnetDebToolConsumerProjectName)"," />
|
<DotnetDebToolProjectJsonLines Include="%20%20%20%20"name": "$(DotnetDebToolConsumerProjectName)"," />
|
||||||
<DotnetDebToolProjectJsonLines Include="%20%20%20%20"frameworks": { "netcoreapp1.0": {} }," />
|
<DotnetDebToolProjectJsonLines Include="%20%20%20%20"frameworks": { "netcoreapp1.0": {}, "netcoreapp1.1": {} }," />
|
||||||
<DotnetDebToolProjectJsonLines Include="%20%20%20%20"tools": {"$(DotnetDebToolPackageId)": "$(DotnetDebToolVersion)" }" />
|
<DotnetDebToolProjectJsonLines Include="%20%20%20%20"tools": {"$(DotnetDebToolPackageId)": "$(DotnetDebToolVersion)" }" />
|
||||||
<DotnetDebToolProjectJsonLines Include="}" />
|
<DotnetDebToolProjectJsonLines Include="}" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -1,76 +1,23 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Target Name="SetupTestPackageProjectData"
|
<Target Name="SetupTestPackageProjectData"
|
||||||
DependsOnTargets="AssociateSourceFilesWithProjects;
|
DependsOnTargets="SetupTestPackageProjectFrameworks">
|
||||||
AssociateOutputsWithProjects;">
|
|
||||||
<ItemGroup>
|
<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>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="SetupTestPackageProjectFrameworks"
|
<Target Name="SetupTestPackageProjectFrameworks"
|
||||||
DependsOnTargets="SetupTestPackageProjectBaseData;
|
DependsOnTargets="SetupTestPackageProjectBaseData">
|
||||||
AssociateSourceFilesWithProjects;"
|
|
||||||
Outputs="%(TestPackageProjectFrameworks.Identity)">
|
|
||||||
<PropertyGroup>
|
|
||||||
<CurrentBuildFramework>%(TestPackageProjectFrameworks.Identity)</CurrentBuildFramework>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<TestPackageProject Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Frameworks)', '(^|;)$(CurrentBuildFramework)($|;)'))"
|
<TestPackageProject Include="@(BaseTestPackageProject)">
|
||||||
Include="@(BaseTestPackageProject)">
|
|
||||||
<Framework>$(CurrentBuildFramework)</Framework>
|
|
||||||
<Runtime Condition=" '$(CurrentBuildFramework)' == 'net45' Or '$(CurrentBuildFramework)' == 'net451' ">$(CoreCLRRid)</Runtime>
|
|
||||||
<OutputPath>%(OutputPath)$(CurrentBuildFramework)/</OutputPath>
|
|
||||||
</TestPackageProject>
|
</TestPackageProject>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</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">
|
<Target Name="SetupTestPackageProjectBaseData">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils">
|
<BaseTestPackageProject Include="src/Microsoft.DotNet.Cli.Utils"
|
||||||
|
Condition=" '$(IsDesktopAvailable)' == 'True' " >
|
||||||
<Name>Microsoft.DotNet.Cli.Utils</Name>
|
<Name>Microsoft.DotNet.Cli.Utils</Name>
|
||||||
<ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName>
|
<ProjectName>Microsoft.DotNet.Cli.Utils.csproj</ProjectName>
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
|
@ -78,7 +25,17 @@
|
||||||
<VersionPrefix>$(CliVersionPrefix)-</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)-</VersionPrefix>
|
||||||
<VersionSuffix>rc4-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>rc4-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||||
<Clean>False</Clean>
|
<Clean>False</Clean>
|
||||||
<Frameworks>netstandard1.5</Frameworks>
|
</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>
|
||||||
|
<IsApplicable>True</IsApplicable>
|
||||||
|
<VersionPrefix>$(CliVersionPrefix)-</VersionPrefix>
|
||||||
|
<VersionSuffix>rc4-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||||
|
<Clean>False</Clean>
|
||||||
|
<MsbuildArgs>/p:TargetFramework=netstandard1.5</MsbuildArgs>
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="src/Microsoft.DotNet.InternalAbstractions">
|
<BaseTestPackageProject Include="src/Microsoft.DotNet.InternalAbstractions">
|
||||||
<Name>Microsoft.DotNet.InternalAbstractions</Name>
|
<Name>Microsoft.DotNet.InternalAbstractions</Name>
|
||||||
|
@ -88,9 +45,9 @@
|
||||||
<VersionPrefix>2.0.0-beta-</VersionPrefix>
|
<VersionPrefix>2.0.0-beta-</VersionPrefix>
|
||||||
<VersionSuffix>beta-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>beta-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||||
<Clean>False</Clean>
|
<Clean>False</Clean>
|
||||||
<Frameworks>netstandard1.3</Frameworks>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/PackageWithFakeNativeDep">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/PackageWithFakeNativeDep"
|
||||||
|
Condition=" '$(IsDesktopAvailable)' == 'True' " >
|
||||||
<Name>PackageWithFakeNativeDep</Name>
|
<Name>PackageWithFakeNativeDep</Name>
|
||||||
<ProjectName>PackageWithFakeNativeDep.csproj</ProjectName>
|
<ProjectName>PackageWithFakeNativeDep.csproj</ProjectName>
|
||||||
<IsTool>False</IsTool>
|
<IsTool>False</IsTool>
|
||||||
|
@ -98,8 +55,7 @@
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.0</VersionPrefix>
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix></VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>net45</Frameworks>
|
<MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs>
|
||||||
<PackRuntime>$(CoreCLRRid)</PackRuntime>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-context-test">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-context-test">
|
||||||
<Name>dotnet-dependency-context-test</Name>
|
<Name>dotnet-dependency-context-test</Name>
|
||||||
|
@ -109,7 +65,6 @@
|
||||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
||||||
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>netcoreapp1.0</Frameworks>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-tool-invoker">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-dependency-tool-invoker">
|
||||||
<Name>dotnet-dependency-tool-invoker</Name>
|
<Name>dotnet-dependency-tool-invoker</Name>
|
||||||
|
@ -119,9 +74,9 @@
|
||||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
||||||
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>netcoreapp1.0</Frameworks>
|
|
||||||
</BaseTestPackageProject>
|
</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>
|
<Name>dotnet-desktop-and-portable</Name>
|
||||||
<ProjectName>dotnet-desktop-and-portable.csproj</ProjectName>
|
<ProjectName>dotnet-desktop-and-portable.csproj</ProjectName>
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
|
@ -129,11 +84,10 @@
|
||||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
||||||
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>net451;netcoreapp1.0</Frameworks>
|
<MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs>
|
||||||
<PackRuntime>$(CoreCLRRid)</PackRuntime>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-desktop-binding-redirects"
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-desktop-binding-redirects"
|
||||||
Condition=" '$(IsDesktopAvailable)' == 'True' ">
|
Condition=" '$(IsDesktopAvailable)' == 'True' ">
|
||||||
<Name>dotnet-desktop-binding-redirects</Name>
|
<Name>dotnet-desktop-binding-redirects</Name>
|
||||||
<ProjectName>dotnet-desktop-binding-redirects.csproj</ProjectName>
|
<ProjectName>dotnet-desktop-binding-redirects.csproj</ProjectName>
|
||||||
<IsTool>True</IsTool>
|
<IsTool>True</IsTool>
|
||||||
|
@ -142,8 +96,7 @@
|
||||||
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
<VersionPrefix>1.0.0-rc-</VersionPrefix>
|
||||||
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
<VersionSuffix>rc-$(TestPackageBuildVersionSuffix)</VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>net451</Frameworks>
|
<MsbuildArgs>/p:RuntimeIdentifier=$(CoreCLRRid)</MsbuildArgs>
|
||||||
<PackRuntime>$(CoreCLRRid)</PackRuntime>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello">
|
||||||
<Name>dotnet-hello</Name>
|
<Name>dotnet-hello</Name>
|
||||||
|
@ -153,7 +106,6 @@
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.0</VersionPrefix>
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix></VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>netcoreapp1.0</Frameworks>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello">
|
||||||
<Name>dotnet-hello</Name>
|
<Name>dotnet-hello</Name>
|
||||||
|
@ -163,7 +115,6 @@
|
||||||
<VersionPrefix>2.0.0</VersionPrefix>
|
<VersionPrefix>2.0.0</VersionPrefix>
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix></VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>netcoreapp1.0</Frameworks>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-portable">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-portable">
|
||||||
<Name>dotnet-portable</Name>
|
<Name>dotnet-portable</Name>
|
||||||
|
@ -173,7 +124,6 @@
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.0</VersionPrefix>
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix></VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>netcoreapp1.0</Frameworks>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-prefercliruntime">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/dotnet-prefercliruntime">
|
||||||
<Name>dotnet-prefercliruntime</Name>
|
<Name>dotnet-prefercliruntime</Name>
|
||||||
|
@ -183,7 +133,6 @@
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.0</VersionPrefix>
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix></VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>netcoreapp1.0</Frameworks>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
<BaseTestPackageProject Include="TestAssets/TestPackages/ToolWithOutputName">
|
<BaseTestPackageProject Include="TestAssets/TestPackages/ToolWithOutputName">
|
||||||
<Name>dotnet-tool-with-output-name</Name>
|
<Name>dotnet-tool-with-output-name</Name>
|
||||||
|
@ -194,13 +143,8 @@
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.0</VersionPrefix>
|
||||||
<VersionSuffix></VersionSuffix>
|
<VersionSuffix></VersionSuffix>
|
||||||
<Clean>True</Clean>
|
<Clean>True</Clean>
|
||||||
<Frameworks>netcoreapp1.0</Frameworks>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
|
|
||||||
<TestPackageProjectFrameworksExcludes Condition=" '$(IsDesktopAvailable)' != 'True' " Include="net45" />
|
|
||||||
<TestPackageProjectFrameworksExcludes Condition=" '$(IsDesktopAvailable)' != 'True' " Include="net451" />
|
|
||||||
<TestPackageProjectFrameworks Include="%(BaseTestPackageProject.Frameworks)" Exclude="@(TestPackageProjectFrameworksExcludes)" />
|
|
||||||
|
|
||||||
<BaseTestPackageProject>
|
<BaseTestPackageProject>
|
||||||
<ProjectDir>$(RepoRoot)%(Identity)/</ProjectDir>
|
<ProjectDir>$(RepoRoot)%(Identity)/</ProjectDir>
|
||||||
<OutputPath>$(TestPackagesBuildDir)%(Identity)/bin/$(Configuration)/</OutputPath>
|
<OutputPath>$(TestPackagesBuildDir)%(Identity)/bin/$(Configuration)/</OutputPath>
|
||||||
|
@ -208,8 +152,6 @@
|
||||||
|
|
||||||
<BaseTestPackageProject>
|
<BaseTestPackageProject>
|
||||||
<ProjectPath>%(ProjectDir)%(ProjectName)</ProjectPath>
|
<ProjectPath>%(ProjectDir)%(ProjectName)</ProjectPath>
|
||||||
<BuildInputIncludeFilter>%(ProjectDir)**/*.*</BuildInputIncludeFilter>
|
|
||||||
<BuildInputExcludeFilter>%(ProjectDir)bin/**/*.*;%(ProjectDir)obj/**/*.*</BuildInputExcludeFilter>
|
|
||||||
</BaseTestPackageProject>
|
</BaseTestPackageProject>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Description>Build scripts for dotnet-cli</Description>
|
<Description>Build scripts for dotnet-cli</Description>
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.0</VersionPrefix>
|
||||||
<TargetFrameworks>netcoreapp1.0</TargetFrameworks>
|
<TargetFrameworks>netcoreapp1.1</TargetFrameworks>
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||||
<OutputPath>bin\$(Configuration)</OutputPath>
|
<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>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\shared-build-targets-utils\shared-build-targets-utils.csproj" />
|
<ProjectReference Include="..\shared-build-targets-utils\shared-build-targets-utils.csproj" />
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<Version>1.6.0</Version>
|
<Version>1.6.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR">
|
<PackageReference Include="Microsoft.NETCore.Runtime.CoreCLR">
|
||||||
<Version>1.0.4</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Build">
|
<PackageReference Include="Microsoft.Build">
|
||||||
<Version>$(CLI_MSBuild_Version)</Version>
|
<Version>$(CLI_MSBuild_Version)</Version>
|
||||||
|
|
|
@ -13,6 +13,6 @@
|
||||||
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
||||||
|
|
||||||
|
|
||||||
<CliVersionPrefix>1.0.0-rc4</CliVersionPrefix>
|
<CliVersionPrefix>1.0.0</CliVersionPrefix>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
# Dockerfile that creates a container suitable to build dotnet-cli
|
# Dockerfile that creates a container suitable to build dotnet-cli
|
||||||
FROM centos:7.1.1503
|
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 deltarpm
|
||||||
RUN yum -q -y install epel-release
|
RUN yum -q -y install epel-release
|
||||||
# RUN yum -y update
|
# RUN yum -y update
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<Version>1.0.1-beta-000933</Version>
|
<Version>1.0.1-beta-000933</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
||||||
<Version>1.0.1-beta-000933</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NuGet.Versioning">
|
<PackageReference Include="NuGet.Versioning">
|
||||||
<Version>$(CLI_NuGet_Version)</Version>
|
<Version>$(CLI_NuGet_Version)</Version>
|
||||||
|
|
|
@ -165,7 +165,8 @@ namespace Microsoft.DotNet.Internal.ProjectModel
|
||||||
|
|
||||||
// Project files
|
// Project files
|
||||||
project.Files = new ProjectFilesCollection(rawProject, project.ProjectDirectory, project.ProjectFilePath);
|
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;
|
var commands = rawProject.Value<JToken>("commands") as JObject;
|
||||||
if (commands != null)
|
if (commands != null)
|
||||||
|
@ -758,10 +759,14 @@ namespace Microsoft.DotNet.Internal.ProjectModel
|
||||||
|
|
||||||
if (rawPackOptions != null)
|
if (rawPackOptions != null)
|
||||||
{
|
{
|
||||||
var packOptionValue = rawPackOptions.Value<T>(option);
|
var hasOption = rawPackOptions.Value<JToken>(option) != null;
|
||||||
if (packOptionValue != 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);
|
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'";
|
var compileWarning = "'compile' in 'buildOptions'";
|
||||||
AddDiagnosticMesage(rawProject, project, "compile", compileWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "compile", compileWarning);
|
||||||
AddDiagnosticMesage(rawProject, project, "compileExclude", compileWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "compileExclude", compileWarning);
|
||||||
AddDiagnosticMesage(rawProject, project, "compileFiles", compileWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "compileFiles", compileWarning);
|
||||||
AddDiagnosticMesage(rawProject, project, "compileBuiltIn", compileWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "compileBuiltIn", compileWarning);
|
||||||
|
|
||||||
var resourceWarning = "'embed' in 'buildOptions'";
|
var resourceWarning = "'embed' in 'buildOptions'";
|
||||||
AddDiagnosticMesage(rawProject, project, "resource", resourceWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "resource", resourceWarning);
|
||||||
AddDiagnosticMesage(rawProject, project, "resourceExclude", resourceWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "resourceExclude", resourceWarning);
|
||||||
AddDiagnosticMesage(rawProject, project, "resourceFiles", resourceWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "resourceFiles", resourceWarning);
|
||||||
AddDiagnosticMesage(rawProject, project, "resourceBuiltIn", resourceWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "resourceBuiltIn", resourceWarning);
|
||||||
AddDiagnosticMesage(rawProject, project, "namedResource", 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";
|
var contentWarning = "'publishOptions' to publish or 'copyToOutput' in 'buildOptions' to copy to build output";
|
||||||
AddDiagnosticMesage(rawProject, project, "content", contentWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "content", contentWarning);
|
||||||
AddDiagnosticMesage(rawProject, project, "contentExclude", contentWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "contentExclude", contentWarning);
|
||||||
AddDiagnosticMesage(rawProject, project, "contentFiles", contentWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "contentFiles", contentWarning);
|
||||||
AddDiagnosticMesage(rawProject, project, "contentBuiltIn", contentWarning);
|
AddDeprecatedDiagnosticMessage(rawProject, project, "contentBuiltIn", contentWarning);
|
||||||
|
|
||||||
AddDiagnosticMesage(rawProject, project, "packInclude", "'files' in 'packOptions'");
|
AddDeprecatedDiagnosticMessage(rawProject, project, "packInclude", "'files' in 'packOptions'");
|
||||||
AddDiagnosticMesage(rawProject, project, "publishExclude", "'publishOptions'");
|
AddDeprecatedDiagnosticMessage(rawProject, project, "publishExclude", "'publishOptions'");
|
||||||
AddDiagnosticMesage(rawProject, project, "exclude", "'exclude' within 'compile' or 'embed'");
|
AddDeprecatedDiagnosticMessage(rawProject, project, "exclude", "'exclude' within 'compile' or 'embed'");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void AddDiagnosticMesage(
|
private static void AddDeprecatedDiagnosticMessage(
|
||||||
JObject rawProject,
|
JObject rawProject,
|
||||||
Project project,
|
Project project,
|
||||||
string option,
|
string option,
|
||||||
string message)
|
string message,
|
||||||
|
DiagnosticMessageSeverity severity = DiagnosticMessageSeverity.Warning)
|
||||||
{
|
{
|
||||||
var lineInfo = rawProject.Value<IJsonLineInfo>(option);
|
var lineInfo = rawProject.Value<IJsonLineInfo>(option);
|
||||||
if (lineInfo == null)
|
if (lineInfo == null)
|
||||||
|
@ -850,11 +863,132 @@ namespace Microsoft.DotNet.Internal.ProjectModel
|
||||||
ErrorCodes.DOTNET1015,
|
ErrorCodes.DOTNET1015,
|
||||||
$"The '{option}' option is deprecated. Use {message} instead.",
|
$"The '{option}' option is deprecated. Use {message} instead.",
|
||||||
project.ProjectFilePath,
|
project.ProjectFilePath,
|
||||||
DiagnosticMessageSeverity.Warning,
|
severity,
|
||||||
lineInfo.LineNumber,
|
lineInfo.LineNumber,
|
||||||
lineInfo.LinePosition));
|
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)
|
private static bool TryGetStringEnumerable(JToken token, out IEnumerable<string> result)
|
||||||
{
|
{
|
||||||
IEnumerable<string> values;
|
IEnumerable<string> values;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
<WarningsAsErrors>true</WarningsAsErrors>
|
<WarningsAsErrors>true</WarningsAsErrors>
|
||||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
|
|
|
@ -314,7 +314,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var projectDirectory in
|
foreach (var projectDirectory in
|
||||||
Enumerable.Repeat(directory, 1).Union(directory.GetDirectories()))
|
Enumerable.Repeat(directory, 1).Union(directory.GetDirectories("*", SearchOption.AllDirectories)))
|
||||||
{
|
{
|
||||||
AddIfProjectExists(projects, projectDirectory);
|
AddIfProjectExists(projects, projectDirectory);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ using Microsoft.Build.Construction;
|
||||||
using Microsoft.DotNet.Internal.ProjectModel;
|
using Microsoft.DotNet.Internal.ProjectModel;
|
||||||
using Microsoft.DotNet.Internal.ProjectModel.Graph;
|
using Microsoft.DotNet.Internal.ProjectModel.Graph;
|
||||||
using Microsoft.DotNet.Cli;
|
using Microsoft.DotNet.Cli;
|
||||||
|
using Microsoft.DotNet.Cli.Utils;
|
||||||
using Microsoft.DotNet.Cli.Utils.ExceptionExtensions;
|
using Microsoft.DotNet.Cli.Utils.ExceptionExtensions;
|
||||||
using Microsoft.DotNet.Cli.Sln.Internal;
|
using Microsoft.DotNet.Cli.Sln.Internal;
|
||||||
using Microsoft.DotNet.ProjectJsonMigration.Rules;
|
using Microsoft.DotNet.ProjectJsonMigration.Rules;
|
||||||
|
@ -41,10 +42,11 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
IEnumerable<ProjectDependency> projectDependencies = null;
|
IEnumerable<ProjectDependency> projectDependencies = null;
|
||||||
var projectMigrationReports = new List<ProjectMigrationReport>();
|
var projectMigrationReports = new List<ProjectMigrationReport>();
|
||||||
|
|
||||||
|
List<string> warnings = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Verify up front so we can prefer these errors over an unresolved project dependency
|
// Verify up front so we can prefer these errors over an unresolved project dependency
|
||||||
VerifyInputs(rootInputs, rootSettings);
|
VerifyInputs(rootInputs, rootSettings, out warnings);
|
||||||
|
|
||||||
projectMigrationReports.Add(MigrateProject(rootSettings));
|
projectMigrationReports.Add(MigrateProject(rootSettings));
|
||||||
|
|
||||||
|
@ -67,7 +69,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
rootSettings.ProjectDirectory,
|
rootSettings.ProjectDirectory,
|
||||||
rootInputs?.DefaultProjectContext?.GetProjectName(),
|
rootInputs?.DefaultProjectContext?.GetProjectName(),
|
||||||
new List<MigrationError> {e.Error},
|
new List<MigrationError> {e.Error},
|
||||||
null)
|
warnings)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,6 +145,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
var projectName = migrationRuleInputs.DefaultProjectContext.GetProjectName();
|
var projectName = migrationRuleInputs.DefaultProjectContext.GetProjectName();
|
||||||
var outputProject = Path.Combine(migrationSettings.OutputDirectory, projectName + ".csproj");
|
var outputProject = Path.Combine(migrationSettings.OutputDirectory, projectName + ".csproj");
|
||||||
|
|
||||||
|
List<string> warnings = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (File.Exists(outputProject))
|
if (File.Exists(outputProject))
|
||||||
|
@ -165,7 +168,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VerifyInputs(migrationRuleInputs, migrationSettings);
|
VerifyInputs(migrationRuleInputs, migrationSettings, out warnings);
|
||||||
|
|
||||||
SetupOutputDirectory(migrationSettings.ProjectDirectory, migrationSettings.OutputDirectory);
|
SetupOutputDirectory(migrationSettings.ProjectDirectory, migrationSettings.OutputDirectory);
|
||||||
|
|
||||||
|
@ -178,7 +181,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
exc.Error
|
exc.Error
|
||||||
};
|
};
|
||||||
|
|
||||||
return new ProjectMigrationReport(migrationSettings.ProjectDirectory, projectName, error, null);
|
return new ProjectMigrationReport(migrationSettings.ProjectDirectory, projectName, error, warnings);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<string> csprojDependencies = null;
|
List<string> csprojDependencies = null;
|
||||||
|
@ -207,7 +210,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
projectName,
|
projectName,
|
||||||
outputProject,
|
outputProject,
|
||||||
null,
|
null,
|
||||||
null,
|
warnings,
|
||||||
csprojDependencies);
|
csprojDependencies);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,13 +237,22 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
return new MigrationRuleInputs(projectContexts, templateMSBuildProject, itemGroup, propertyGroup, xproj);
|
return new MigrationRuleInputs(projectContexts, templateMSBuildProject, itemGroup, propertyGroup, xproj);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void VerifyInputs(MigrationRuleInputs migrationRuleInputs, MigrationSettings migrationSettings)
|
private void VerifyInputs(
|
||||||
|
MigrationRuleInputs migrationRuleInputs,
|
||||||
|
MigrationSettings migrationSettings,
|
||||||
|
out List<string> warningMessages
|
||||||
|
)
|
||||||
{
|
{
|
||||||
VerifyProject(migrationRuleInputs.ProjectContexts, migrationSettings.ProjectDirectory);
|
VerifyProject(migrationRuleInputs.ProjectContexts, migrationSettings.ProjectDirectory, out warningMessages);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void VerifyProject(IEnumerable<ProjectContext> projectContexts, string projectDirectory)
|
private void VerifyProject(
|
||||||
|
IEnumerable<ProjectContext> projectContexts,
|
||||||
|
string projectDirectory,
|
||||||
|
out List<string> warningMessages)
|
||||||
{
|
{
|
||||||
|
warningMessages = null;
|
||||||
|
|
||||||
if (!projectContexts.Any())
|
if (!projectContexts.Any())
|
||||||
{
|
{
|
||||||
MigrationErrorCodes.MIGRATE1013(String.Format(LocalizableStrings.MIGRATE1013Arg, projectDirectory)).Throw();
|
MigrationErrorCodes.MIGRATE1013(String.Format(LocalizableStrings.MIGRATE1013Arg, projectDirectory)).Throw();
|
||||||
|
@ -251,9 +263,29 @@ namespace Microsoft.DotNet.ProjectJsonMigration
|
||||||
var diagnostics = defaultProjectContext.ProjectFile.Diagnostics;
|
var diagnostics = defaultProjectContext.ProjectFile.Diagnostics;
|
||||||
if (diagnostics.Any())
|
if (diagnostics.Any())
|
||||||
{
|
{
|
||||||
MigrationErrorCodes.MIGRATE1011(
|
var warnings = diagnostics.Where(d => d.Severity == DiagnosticMessageSeverity.Warning);
|
||||||
String.Format("{0}{1}{2}", projectDirectory, Environment.NewLine, string.Join(Environment.NewLine, diagnostics.Select(d => FormatDiagnosticMessage(d)))))
|
if (warnings.Any())
|
||||||
.Throw();
|
{
|
||||||
|
var migrationError = MigrationErrorCodes.MIGRATE1011(String.Format(
|
||||||
|
"{0}{1}{2}",
|
||||||
|
projectDirectory,
|
||||||
|
Environment.NewLine,
|
||||||
|
string.Join(Environment.NewLine, diagnostics.Select(d => FormatDiagnosticMessage(d)))));
|
||||||
|
|
||||||
|
warningMessages = new List<string>();
|
||||||
|
warningMessages.Add(migrationError.GetFormattedErrorMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
var errors = diagnostics.Where(d => d.Severity == DiagnosticMessageSeverity.Error);
|
||||||
|
if (errors.Any())
|
||||||
|
{
|
||||||
|
MigrationErrorCodes.MIGRATE1011(String.Format(
|
||||||
|
"{0}{1}{2}",
|
||||||
|
projectDirectory,
|
||||||
|
Environment.NewLine,
|
||||||
|
string.Join(Environment.NewLine, diagnostics.Select(d => FormatDiagnosticMessage(d)))))
|
||||||
|
.Throw();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var compilerName =
|
var compilerName =
|
||||||
|
|
|
@ -110,10 +110,15 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Rules
|
||||||
compilerOptions => projectFolderName,
|
compilerOptions => projectFolderName,
|
||||||
compilerOptions => compilerOptions.OutputName != null);
|
compilerOptions => compilerOptions.OutputName != null);
|
||||||
|
|
||||||
|
private string[] _compilePatternsToExclude = new string[] {
|
||||||
|
"**/*.cs"
|
||||||
|
};
|
||||||
|
|
||||||
private IncludeContextTransform CompileFilesTransform =>
|
private IncludeContextTransform CompileFilesTransform =>
|
||||||
new IncludeContextTransform(
|
new IncludeContextTransform(
|
||||||
"Compile",
|
"Compile",
|
||||||
transformMappings: false,
|
transformMappings: false,
|
||||||
|
patternsToExclude: _compilePatternsToExclude,
|
||||||
condition: ic => ic != null,
|
condition: ic => ic != null,
|
||||||
emitBuiltInIncludes: false);
|
emitBuiltInIncludes: false);
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,11 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Transforms
|
||||||
&& includeContext.IncludeFiles != null
|
&& includeContext.IncludeFiles != null
|
||||||
&& includeContext.IncludeFiles.Count > 0);
|
&& includeContext.IncludeFiles.Count > 0);
|
||||||
|
|
||||||
|
private bool IsPatternExcluded(string pattern)
|
||||||
|
{
|
||||||
|
return _patternsToExclude.Contains(pattern.Replace('\\', '/'));
|
||||||
|
}
|
||||||
|
|
||||||
protected virtual Func<string, AddItemTransform<IncludeContext>> IncludeExcludeTransformGetter =>
|
protected virtual Func<string, AddItemTransform<IncludeContext>> IncludeExcludeTransformGetter =>
|
||||||
(itemName) => new AddItemTransform<IncludeContext>(
|
(itemName) => new AddItemTransform<IncludeContext>(
|
||||||
itemName,
|
itemName,
|
||||||
|
@ -36,6 +41,8 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Transforms
|
||||||
fullIncludeSet = fullIncludeSet.Union(includeContext.BuiltInsInclude.OrEmptyIfNull());
|
fullIncludeSet = fullIncludeSet.Union(includeContext.BuiltInsInclude.OrEmptyIfNull());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fullIncludeSet = fullIncludeSet.Where((pattern) => !IsPatternExcluded(pattern));
|
||||||
|
|
||||||
return FormatGlobPatternsForMsbuild(fullIncludeSet, includeContext.SourceBasePath);
|
return FormatGlobPatternsForMsbuild(fullIncludeSet, includeContext.SourceBasePath);
|
||||||
},
|
},
|
||||||
includeContext =>
|
includeContext =>
|
||||||
|
@ -50,7 +57,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Transforms
|
||||||
{
|
{
|
||||||
return includeContext != null &&
|
return includeContext != null &&
|
||||||
(
|
(
|
||||||
(includeContext.IncludePatterns != null && includeContext.IncludePatterns.Count > 0)
|
(includeContext.IncludePatterns != null && includeContext.IncludePatterns.Where((pattern) => !IsPatternExcluded(pattern)).Count() > 0)
|
||||||
||
|
||
|
||||||
(_emitBuiltInIncludes &&
|
(_emitBuiltInIncludes &&
|
||||||
includeContext.BuiltInsInclude != null &&
|
includeContext.BuiltInsInclude != null &&
|
||||||
|
@ -68,6 +75,7 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Transforms
|
||||||
|
|
||||||
private readonly string _itemName;
|
private readonly string _itemName;
|
||||||
private bool _transformMappings;
|
private bool _transformMappings;
|
||||||
|
private string[] _patternsToExclude;
|
||||||
private bool _emitBuiltInIncludes;
|
private bool _emitBuiltInIncludes;
|
||||||
private readonly List<ItemMetadataValue<IncludeContext>> _metadata = new List<ItemMetadataValue<IncludeContext>>();
|
private readonly List<ItemMetadataValue<IncludeContext>> _metadata = new List<ItemMetadataValue<IncludeContext>>();
|
||||||
|
|
||||||
|
@ -75,11 +83,13 @@ namespace Microsoft.DotNet.ProjectJsonMigration.Transforms
|
||||||
string itemName,
|
string itemName,
|
||||||
bool transformMappings = true,
|
bool transformMappings = true,
|
||||||
Func<IncludeContext, bool> condition = null,
|
Func<IncludeContext, bool> condition = null,
|
||||||
bool emitBuiltInIncludes = true) : base(condition)
|
bool emitBuiltInIncludes = true,
|
||||||
|
string[] patternsToExclude = null) : base(condition)
|
||||||
{
|
{
|
||||||
_itemName = itemName;
|
_itemName = itemName;
|
||||||
_transformMappings = transformMappings;
|
_transformMappings = transformMappings;
|
||||||
_emitBuiltInIncludes = emitBuiltInIncludes;
|
_emitBuiltInIncludes = emitBuiltInIncludes;
|
||||||
|
_patternsToExclude = patternsToExclude ?? Array.Empty<string>();
|
||||||
|
|
||||||
_mappingsToTransfrom = (addItemTransform, targetPath) =>
|
_mappingsToTransfrom = (addItemTransform, targetPath) =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,6 +104,15 @@ namespace Microsoft.DotNet.TestFramework
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TestAssetInstance WithEmptyGlobalJson()
|
||||||
|
{
|
||||||
|
var file = Root.Parent.GetFile("global.json");
|
||||||
|
|
||||||
|
File.WriteAllText(file.FullName, @"{}");
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
private void CopyFiles(IEnumerable<FileInfo> filesToCopy)
|
private void CopyFiles(IEnumerable<FileInfo> filesToCopy)
|
||||||
{
|
{
|
||||||
foreach (var file in filesToCopy)
|
foreach (var file in filesToCopy)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||||
|
|
330
src/dotnet/SlnFileExtensions.cs
Normal file
330
src/dotnet/SlnFileExtensions.cs
Normal file
|
@ -0,0 +1,330 @@
|
||||||
|
// 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.Construction;
|
||||||
|
using Microsoft.Build.Evaluation;
|
||||||
|
using Microsoft.Build.Execution;
|
||||||
|
using Microsoft.DotNet.Cli.Sln.Internal;
|
||||||
|
using Microsoft.DotNet.Cli.Utils;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace Microsoft.DotNet.Tools.Common
|
||||||
|
{
|
||||||
|
internal static class SlnFileExtensions
|
||||||
|
{
|
||||||
|
public static void AddProject(this SlnFile slnFile, string fullProjectPath)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(fullProjectPath))
|
||||||
|
{
|
||||||
|
throw new ArgumentException();
|
||||||
|
}
|
||||||
|
|
||||||
|
var relativeProjectPath = PathUtility.GetRelativePath(
|
||||||
|
PathUtility.EnsureTrailingSlash(slnFile.BaseDirectory),
|
||||||
|
fullProjectPath);
|
||||||
|
|
||||||
|
if (slnFile.Projects.Any((p) =>
|
||||||
|
string.Equals(p.FilePath, relativeProjectPath, StringComparison.OrdinalIgnoreCase)))
|
||||||
|
{
|
||||||
|
Reporter.Output.WriteLine(string.Format(
|
||||||
|
CommonLocalizableStrings.SolutionAlreadyContainsProject,
|
||||||
|
slnFile.FullPath,
|
||||||
|
relativeProjectPath));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var projectInstance = new ProjectInstance(fullProjectPath);
|
||||||
|
|
||||||
|
var slnProject = new SlnProject
|
||||||
|
{
|
||||||
|
Id = projectInstance.GetProjectId(),
|
||||||
|
TypeGuid = projectInstance.GetProjectTypeGuid(),
|
||||||
|
Name = Path.GetFileNameWithoutExtension(relativeProjectPath),
|
||||||
|
FilePath = relativeProjectPath
|
||||||
|
};
|
||||||
|
|
||||||
|
slnFile.AddDefaultBuildConfigurations(slnProject);
|
||||||
|
|
||||||
|
slnFile.AddSolutionFolders(slnProject);
|
||||||
|
|
||||||
|
slnFile.Projects.Add(slnProject);
|
||||||
|
|
||||||
|
Reporter.Output.WriteLine(
|
||||||
|
string.Format(CommonLocalizableStrings.ProjectAddedToTheSolution, relativeProjectPath));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AddDefaultBuildConfigurations(this SlnFile slnFile, SlnProject slnProject)
|
||||||
|
{
|
||||||
|
if (slnProject == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentException();
|
||||||
|
}
|
||||||
|
|
||||||
|
var defaultConfigurations = new List<string>()
|
||||||
|
{
|
||||||
|
"Debug|Any CPU",
|
||||||
|
"Debug|x64",
|
||||||
|
"Debug|x86",
|
||||||
|
"Release|Any CPU",
|
||||||
|
"Release|x64",
|
||||||
|
"Release|x86",
|
||||||
|
};
|
||||||
|
|
||||||
|
// NOTE: The order you create the sections determines the order they are written to the sln
|
||||||
|
// file. In the case of an empty sln file, in order to make sure the solution configurations
|
||||||
|
// section comes first we need to add it first. This doesn't affect correctness but does
|
||||||
|
// stop VS from re-ordering things later on. Since we are keeping the SlnFile class low-level
|
||||||
|
// it shouldn't care about the VS implementation details. That's why we handle this here.
|
||||||
|
AddDefaultSolutionConfigurations(defaultConfigurations, slnFile.SolutionConfigurationsSection);
|
||||||
|
AddDefaultProjectConfigurations(
|
||||||
|
defaultConfigurations,
|
||||||
|
slnFile.ProjectConfigurationsSection.GetOrCreatePropertySet(slnProject.Id));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void AddDefaultSolutionConfigurations(
|
||||||
|
List<string> defaultConfigurations,
|
||||||
|
SlnPropertySet solutionConfigs)
|
||||||
|
{
|
||||||
|
foreach (var config in defaultConfigurations)
|
||||||
|
{
|
||||||
|
if (!solutionConfigs.ContainsKey(config))
|
||||||
|
{
|
||||||
|
solutionConfigs[config] = config;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void AddDefaultProjectConfigurations(
|
||||||
|
List<string> defaultConfigurations,
|
||||||
|
SlnPropertySet projectConfigs)
|
||||||
|
{
|
||||||
|
foreach (var config in defaultConfigurations)
|
||||||
|
{
|
||||||
|
var activeCfgKey = $"{config}.ActiveCfg";
|
||||||
|
if (!projectConfigs.ContainsKey(activeCfgKey))
|
||||||
|
{
|
||||||
|
projectConfigs[activeCfgKey] = config;
|
||||||
|
}
|
||||||
|
|
||||||
|
var build0Key = $"{config}.Build.0";
|
||||||
|
if (!projectConfigs.ContainsKey(build0Key))
|
||||||
|
{
|
||||||
|
projectConfigs[build0Key] = config;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void AddSolutionFolders(this SlnFile slnFile, SlnProject slnProject)
|
||||||
|
{
|
||||||
|
if (slnProject == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentException();
|
||||||
|
}
|
||||||
|
|
||||||
|
var solutionFolders = slnProject.GetSolutionFoldersFromProject();
|
||||||
|
|
||||||
|
if (solutionFolders.Any())
|
||||||
|
{
|
||||||
|
var nestedProjectsSection = slnFile.Sections.GetOrCreateSection(
|
||||||
|
"NestedProjects",
|
||||||
|
SlnSectionType.PreProcess);
|
||||||
|
|
||||||
|
var pathToGuidMap = slnFile.GetSolutionFolderPaths(nestedProjectsSection.Properties);
|
||||||
|
|
||||||
|
string parentDirGuid = null;
|
||||||
|
var solutionFolderHierarchy = string.Empty;
|
||||||
|
foreach (var dir in solutionFolders)
|
||||||
|
{
|
||||||
|
solutionFolderHierarchy = Path.Combine(solutionFolderHierarchy, dir);
|
||||||
|
if (pathToGuidMap.ContainsKey(solutionFolderHierarchy))
|
||||||
|
{
|
||||||
|
parentDirGuid = pathToGuidMap[solutionFolderHierarchy];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var solutionFolder = new SlnProject
|
||||||
|
{
|
||||||
|
Id = Guid.NewGuid().ToString("B").ToUpper(),
|
||||||
|
TypeGuid = ProjectTypeGuids.SolutionFolderGuid,
|
||||||
|
Name = dir,
|
||||||
|
FilePath = dir
|
||||||
|
};
|
||||||
|
|
||||||
|
slnFile.Projects.Add(solutionFolder);
|
||||||
|
|
||||||
|
if (parentDirGuid != null)
|
||||||
|
{
|
||||||
|
nestedProjectsSection.Properties[solutionFolder.Id] = parentDirGuid;
|
||||||
|
}
|
||||||
|
parentDirGuid = solutionFolder.Id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nestedProjectsSection.Properties[slnProject.Id] = parentDirGuid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IDictionary<string, string> GetSolutionFolderPaths(
|
||||||
|
this SlnFile slnFile,
|
||||||
|
SlnPropertySet nestedProjects)
|
||||||
|
{
|
||||||
|
var solutionFolderPaths = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
var solutionFolderProjects = slnFile.Projects.GetProjectsByType(ProjectTypeGuids.SolutionFolderGuid);
|
||||||
|
foreach (var slnProject in solutionFolderProjects)
|
||||||
|
{
|
||||||
|
var path = slnProject.FilePath;
|
||||||
|
var id = slnProject.Id;
|
||||||
|
while (nestedProjects.ContainsKey(id))
|
||||||
|
{
|
||||||
|
id = nestedProjects[id];
|
||||||
|
var parentSlnProject = solutionFolderProjects.Where(p => p.Id == id).Single();
|
||||||
|
path = Path.Combine(parentSlnProject.FilePath, path);
|
||||||
|
}
|
||||||
|
|
||||||
|
solutionFolderPaths[path] = slnProject.Id;
|
||||||
|
}
|
||||||
|
|
||||||
|
return solutionFolderPaths;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool RemoveProject(this SlnFile slnFile, string projectPath)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(projectPath))
|
||||||
|
{
|
||||||
|
throw new ArgumentException();
|
||||||
|
}
|
||||||
|
|
||||||
|
var projectPathNormalized = PathUtility.GetPathWithDirectorySeparator(projectPath);
|
||||||
|
|
||||||
|
var projectsToRemove = slnFile.Projects.Where((p) =>
|
||||||
|
string.Equals(p.FilePath, projectPathNormalized, StringComparison.OrdinalIgnoreCase)).ToList();
|
||||||
|
|
||||||
|
bool projectRemoved = false;
|
||||||
|
if (projectsToRemove.Count == 0)
|
||||||
|
{
|
||||||
|
Reporter.Output.WriteLine(string.Format(
|
||||||
|
CommonLocalizableStrings.ProjectReferenceCouldNotBeFound,
|
||||||
|
projectPath));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (var slnProject in projectsToRemove)
|
||||||
|
{
|
||||||
|
var buildConfigsToRemove = slnFile.ProjectConfigurationsSection.GetPropertySet(slnProject.Id);
|
||||||
|
if (buildConfigsToRemove != null)
|
||||||
|
{
|
||||||
|
slnFile.ProjectConfigurationsSection.Remove(buildConfigsToRemove);
|
||||||
|
}
|
||||||
|
|
||||||
|
var nestedProjectsSection = slnFile.Sections.GetSection(
|
||||||
|
"NestedProjects",
|
||||||
|
SlnSectionType.PreProcess);
|
||||||
|
if (nestedProjectsSection != null && nestedProjectsSection.Properties.ContainsKey(slnProject.Id))
|
||||||
|
{
|
||||||
|
nestedProjectsSection.Properties.Remove(slnProject.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
slnFile.Projects.Remove(slnProject);
|
||||||
|
Reporter.Output.WriteLine(
|
||||||
|
string.Format(CommonLocalizableStrings.ProjectReferenceRemoved, slnProject.FilePath));
|
||||||
|
}
|
||||||
|
|
||||||
|
projectRemoved = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return projectRemoved;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void RemoveEmptyConfigurationSections(this SlnFile slnFile)
|
||||||
|
{
|
||||||
|
if (slnFile.Projects.Count == 0)
|
||||||
|
{
|
||||||
|
var solutionConfigs = slnFile.Sections.GetSection("SolutionConfigurationPlatforms");
|
||||||
|
if (solutionConfigs != null)
|
||||||
|
{
|
||||||
|
slnFile.Sections.Remove(solutionConfigs);
|
||||||
|
}
|
||||||
|
|
||||||
|
var projectConfigs = slnFile.Sections.GetSection("ProjectConfigurationPlatforms");
|
||||||
|
if (projectConfigs != null)
|
||||||
|
{
|
||||||
|
slnFile.Sections.Remove(projectConfigs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void RemoveEmptySolutionFolders(this SlnFile slnFile)
|
||||||
|
{
|
||||||
|
var solutionFolderProjects = slnFile.Projects
|
||||||
|
.GetProjectsByType(ProjectTypeGuids.SolutionFolderGuid)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
if (solutionFolderProjects.Any())
|
||||||
|
{
|
||||||
|
var nestedProjectsSection = slnFile.Sections.GetSection(
|
||||||
|
"NestedProjects",
|
||||||
|
SlnSectionType.PreProcess);
|
||||||
|
|
||||||
|
if (nestedProjectsSection == null)
|
||||||
|
{
|
||||||
|
foreach (var solutionFolderProject in solutionFolderProjects)
|
||||||
|
{
|
||||||
|
if (solutionFolderProject.Sections.Count() == 0)
|
||||||
|
{
|
||||||
|
slnFile.Projects.Remove(solutionFolderProject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var solutionFoldersInUse = slnFile.GetSolutionFoldersThatContainProjectsInItsHierarchy(
|
||||||
|
nestedProjectsSection.Properties);
|
||||||
|
|
||||||
|
foreach (var solutionFolderProject in solutionFolderProjects)
|
||||||
|
{
|
||||||
|
if (!solutionFoldersInUse.Contains(solutionFolderProject.Id))
|
||||||
|
{
|
||||||
|
nestedProjectsSection.Properties.Remove(solutionFolderProject.Id);
|
||||||
|
if (solutionFolderProject.Sections.Count() == 0)
|
||||||
|
{
|
||||||
|
slnFile.Projects.Remove(solutionFolderProject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nestedProjectsSection.IsEmpty)
|
||||||
|
{
|
||||||
|
slnFile.Sections.Remove(nestedProjectsSection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static HashSet<string> GetSolutionFoldersThatContainProjectsInItsHierarchy(
|
||||||
|
this SlnFile slnFile,
|
||||||
|
SlnPropertySet nestedProjects)
|
||||||
|
{
|
||||||
|
var solutionFoldersInUse = new HashSet<string>();
|
||||||
|
|
||||||
|
var nonSolutionFolderProjects = slnFile.Projects.GetProjectsNotOfType(
|
||||||
|
ProjectTypeGuids.SolutionFolderGuid);
|
||||||
|
|
||||||
|
foreach (var nonSolutionFolderProject in nonSolutionFolderProjects)
|
||||||
|
{
|
||||||
|
var id = nonSolutionFolderProject.Id;
|
||||||
|
while (nestedProjects.ContainsKey(id))
|
||||||
|
{
|
||||||
|
id = nestedProjects[id];
|
||||||
|
solutionFoldersInUse.Add(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return solutionFoldersInUse;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,7 +8,7 @@ using System.Linq;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Tools.Common
|
namespace Microsoft.DotNet.Tools.Common
|
||||||
{
|
{
|
||||||
public static class SlnProjectCollectionExtensions
|
internal static class SlnProjectCollectionExtensions
|
||||||
{
|
{
|
||||||
public static IEnumerable<SlnProject> GetProjectsByType(
|
public static IEnumerable<SlnProject> GetProjectsByType(
|
||||||
this SlnProjectCollection projects,
|
this SlnProjectCollection projects,
|
||||||
|
|
|
@ -8,7 +8,7 @@ using System.Linq;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Tools.Common
|
namespace Microsoft.DotNet.Tools.Common
|
||||||
{
|
{
|
||||||
public static class SlnProjectExtensions
|
internal static class SlnProjectExtensions
|
||||||
{
|
{
|
||||||
public static IList<string> GetSolutionFoldersFromProject(this SlnProject project)
|
public static IList<string> GetSolutionFoldersFromProject(this SlnProject project)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="AppDescription">
|
<trans-unit id="AppDescription">
|
||||||
<source>Command to add project to project reference</source>
|
<source>Command to add project to project reference</source>
|
||||||
<target state="translated">Befehl zum Hinzufügen des Projekts zum Projektverweis</target>
|
<target state="translated">Befehl zum Hinzufügen eines Projekt-zu-Projekt-Verweises</target>
|
||||||
<note />
|
<note />
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
<trans-unit id="AppHelpText">
|
<trans-unit id="AppHelpText">
|
||||||
|
|
|
@ -103,7 +103,24 @@ namespace Microsoft.DotNet.Tools.Migrate
|
||||||
|
|
||||||
private void UpdateSolutionFile(MigrationReport migrationReport)
|
private void UpdateSolutionFile(MigrationReport migrationReport)
|
||||||
{
|
{
|
||||||
if (_slnFile == null)
|
if(_slnFile != null)
|
||||||
|
{
|
||||||
|
UpdateSolutionFile(migrationReport, _slnFile);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (var slnPath in _workspaceDirectory.EnumerateFiles("*.sln"))
|
||||||
|
{
|
||||||
|
var slnFile = SlnFile.Read(slnPath.FullName);
|
||||||
|
|
||||||
|
UpdateSolutionFile(migrationReport, slnFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateSolutionFile(MigrationReport migrationReport, SlnFile slnFile)
|
||||||
|
{
|
||||||
|
if (slnFile == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -115,7 +132,7 @@ namespace Microsoft.DotNet.Tools.Migrate
|
||||||
|
|
||||||
var csprojFilesToAdd = new HashSet<string>();
|
var csprojFilesToAdd = new HashSet<string>();
|
||||||
|
|
||||||
var slnPathWithTrailingSlash = PathUtility.EnsureTrailingSlash(_slnFile.BaseDirectory);
|
var slnPathWithTrailingSlash = PathUtility.EnsureTrailingSlash(slnFile.BaseDirectory);
|
||||||
foreach (var report in migrationReport.ProjectMigrationReports)
|
foreach (var report in migrationReport.ProjectMigrationReports)
|
||||||
{
|
{
|
||||||
var reportPathWithTrailingSlash = PathUtility.EnsureTrailingSlash(report.ProjectDirectory);
|
var reportPathWithTrailingSlash = PathUtility.EnsureTrailingSlash(report.ProjectDirectory);
|
||||||
|
@ -124,7 +141,7 @@ namespace Microsoft.DotNet.Tools.Migrate
|
||||||
reportPathWithTrailingSlash);
|
reportPathWithTrailingSlash);
|
||||||
|
|
||||||
var xprojPath = Path.Combine(relativeReportPath, report.ProjectName + ".xproj");
|
var xprojPath = Path.Combine(relativeReportPath, report.ProjectName + ".xproj");
|
||||||
var xprojProjectsReferencedBySolution = _slnFile.Projects.Where(p => p.FilePath == xprojPath);
|
var xprojProjectsReferencedBySolution = slnFile.Projects.Where(p => p.FilePath == xprojPath);
|
||||||
|
|
||||||
var migratedProjectName = report.ProjectName + ".csproj";
|
var migratedProjectName = report.ProjectName + ".csproj";
|
||||||
if (xprojProjectsReferencedBySolution.Count() == 1)
|
if (xprojProjectsReferencedBySolution.Count() == 1)
|
||||||
|
@ -138,7 +155,7 @@ namespace Microsoft.DotNet.Tools.Migrate
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var csprojPath = Path.Combine(relativeReportPath, migratedProjectName);
|
var csprojPath = Path.Combine(relativeReportPath, migratedProjectName);
|
||||||
var solutionContainsCsprojPriorToMigration = _slnFile.Projects
|
var solutionContainsCsprojPriorToMigration = slnFile.Projects
|
||||||
.Where(p => p.FilePath == csprojPath)
|
.Where(p => p.FilePath == csprojPath)
|
||||||
.Any();
|
.Any();
|
||||||
|
|
||||||
|
@ -155,21 +172,43 @@ namespace Microsoft.DotNet.Tools.Migrate
|
||||||
}
|
}
|
||||||
|
|
||||||
Version version;
|
Version version;
|
||||||
if (!Version.TryParse(_slnFile.VisualStudioVersion, out version) || version.Major < 15)
|
if (!Version.TryParse(slnFile.VisualStudioVersion, out version) || version.Major < 15)
|
||||||
{
|
{
|
||||||
_slnFile.ProductDescription = ProductDescription;
|
slnFile.ProductDescription = ProductDescription;
|
||||||
_slnFile.VisualStudioVersion = VisualStudioVersion;
|
slnFile.VisualStudioVersion = VisualStudioVersion;
|
||||||
_slnFile.MinimumVisualStudioVersion = MinimumVisualStudioVersion;
|
slnFile.MinimumVisualStudioVersion = MinimumVisualStudioVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
_slnFile.Write();
|
RemoveReferencesToMigratedFiles(slnFile);
|
||||||
|
|
||||||
|
slnFile.Write();
|
||||||
|
|
||||||
foreach (var csprojFile in csprojFilesToAdd)
|
foreach (var csprojFile in csprojFilesToAdd)
|
||||||
{
|
{
|
||||||
AddProject(_slnFile.FullPath, csprojFile);
|
AddProject(slnFile.FullPath, csprojFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void RemoveReferencesToMigratedFiles(SlnFile slnFile)
|
||||||
|
{
|
||||||
|
var solutionFolders = slnFile.Projects.GetProjectsByType(ProjectTypeGuids.SolutionFolderGuid);
|
||||||
|
|
||||||
|
foreach (var solutionFolder in solutionFolders)
|
||||||
|
{
|
||||||
|
var solutionItems = solutionFolder.Sections.GetSection("SolutionItems");
|
||||||
|
if (solutionItems != null && solutionItems.Properties.ContainsKey("global.json"))
|
||||||
|
{
|
||||||
|
solutionItems.Properties.Remove("global.json");
|
||||||
|
if (solutionItems.IsEmpty)
|
||||||
|
{
|
||||||
|
solutionFolder.Sections.Remove(solutionItems);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
slnFile.RemoveEmptySolutionFolders();
|
||||||
|
}
|
||||||
|
|
||||||
private void AddProject(string slnPath, string csprojPath)
|
private void AddProject(string slnPath, string csprojPath)
|
||||||
{
|
{
|
||||||
List<string> args = new List<string>()
|
List<string> args = new List<string>()
|
||||||
|
@ -240,6 +279,8 @@ namespace Microsoft.DotNet.Tools.Migrate
|
||||||
{
|
{
|
||||||
var errorContent = GetProjectReportErrorContent(projectMigrationReport, colored: true);
|
var errorContent = GetProjectReportErrorContent(projectMigrationReport, colored: true);
|
||||||
var successContent = GetProjectReportSuccessContent(projectMigrationReport, colored: true);
|
var successContent = GetProjectReportSuccessContent(projectMigrationReport, colored: true);
|
||||||
|
var warningContent = GetProjectReportWarningContent(projectMigrationReport, colored: true);
|
||||||
|
Reporter.Output.WriteLine(warningContent);
|
||||||
if (!string.IsNullOrEmpty(errorContent))
|
if (!string.IsNullOrEmpty(errorContent))
|
||||||
{
|
{
|
||||||
Reporter.Error.WriteLine(errorContent);
|
Reporter.Error.WriteLine(errorContent);
|
||||||
|
@ -268,6 +309,8 @@ namespace Microsoft.DotNet.Tools.Migrate
|
||||||
{
|
{
|
||||||
var errorContent = GetProjectReportErrorContent(projectMigrationReport, colored: colored);
|
var errorContent = GetProjectReportErrorContent(projectMigrationReport, colored: colored);
|
||||||
var successContent = GetProjectReportSuccessContent(projectMigrationReport, colored: colored);
|
var successContent = GetProjectReportSuccessContent(projectMigrationReport, colored: colored);
|
||||||
|
var warningContent = GetProjectReportWarningContent(projectMigrationReport, colored: colored);
|
||||||
|
sb.AppendLine(warningContent);
|
||||||
if (!string.IsNullOrEmpty(errorContent))
|
if (!string.IsNullOrEmpty(errorContent))
|
||||||
{
|
{
|
||||||
sb.AppendLine(errorContent);
|
sb.AppendLine(errorContent);
|
||||||
|
@ -309,6 +352,19 @@ namespace Microsoft.DotNet.Tools.Migrate
|
||||||
projectMigrationReport.ProjectDirectory));
|
projectMigrationReport.ProjectDirectory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetProjectReportWarningContent(ProjectMigrationReport projectMigrationReport, bool colored)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
Func<string, string> YellowIfColored = (str) => colored ? str.Yellow() : str;
|
||||||
|
|
||||||
|
foreach (var warning in projectMigrationReport.Warnings)
|
||||||
|
{
|
||||||
|
sb.AppendLine(YellowIfColored(warning));
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
private string GetProjectReportErrorContent(ProjectMigrationReport projectMigrationReport, bool colored)
|
private string GetProjectReportErrorContent(ProjectMigrationReport projectMigrationReport, bool colored)
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170123-02" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170123-02" />
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="1.1.8-rc" />
|
<PackageReference Include="MSTest.TestAdapter" Version="1.1.10-rc2" />
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="1.0.8-rc" />
|
<PackageReference Include="MSTest.TestFramework" Version="1.0.8-rc2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.0-beta-*" PrivateAssets="All"/>
|
<PackageReference Include="FSharp.NET.Sdk" Version="1.0.0-beta-*" PrivateAssets="All"/>
|
||||||
<PackageReference Include="Microsoft.FSharp.Core.netcore" Version="1.0.0-alpha-161023" />
|
<PackageReference Include="Microsoft.FSharp.Core.netcore" Version="1.0.0-alpha-161023" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170123-02" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170123-02" />
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="1.1.8-rc" />
|
<PackageReference Include="MSTest.TestAdapter" Version="1.1.10-rc2" />
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="1.0.8-rc" />
|
<PackageReference Include="MSTest.TestFramework" Version="1.0.8-rc2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
// 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.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
using Microsoft.Build.Construction;
|
|
||||||
using Microsoft.Build.Evaluation;
|
|
||||||
using Microsoft.Build.Execution;
|
|
||||||
using Microsoft.DotNet.Cli;
|
using Microsoft.DotNet.Cli;
|
||||||
using Microsoft.DotNet.Cli.Sln.Internal;
|
using Microsoft.DotNet.Cli.Sln.Internal;
|
||||||
using Microsoft.DotNet.Cli.Utils;
|
using Microsoft.DotNet.Cli.Utils;
|
||||||
|
@ -49,7 +46,7 @@ namespace Microsoft.DotNet.Tools.Sln.Add
|
||||||
int preAddProjectCount = slnFile.Projects.Count;
|
int preAddProjectCount = slnFile.Projects.Count;
|
||||||
foreach (var fullProjectPath in fullProjectPaths)
|
foreach (var fullProjectPath in fullProjectPaths)
|
||||||
{
|
{
|
||||||
AddProject(slnFile, fullProjectPath);
|
slnFile.AddProject(fullProjectPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (slnFile.Projects.Count > preAddProjectCount)
|
if (slnFile.Projects.Count > preAddProjectCount)
|
||||||
|
@ -59,165 +56,5 @@ namespace Microsoft.DotNet.Tools.Sln.Add
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddProject(SlnFile slnFile, string fullProjectPath)
|
|
||||||
{
|
|
||||||
var relativeProjectPath = PathUtility.GetRelativePath(
|
|
||||||
PathUtility.EnsureTrailingSlash(slnFile.BaseDirectory),
|
|
||||||
fullProjectPath);
|
|
||||||
|
|
||||||
if (slnFile.Projects.Any((p) =>
|
|
||||||
string.Equals(p.FilePath, relativeProjectPath, StringComparison.OrdinalIgnoreCase)))
|
|
||||||
{
|
|
||||||
Reporter.Output.WriteLine(string.Format(
|
|
||||||
CommonLocalizableStrings.SolutionAlreadyContainsProject,
|
|
||||||
slnFile.FullPath,
|
|
||||||
relativeProjectPath));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var projectInstance = new ProjectInstance(fullProjectPath);
|
|
||||||
|
|
||||||
var slnProject = new SlnProject
|
|
||||||
{
|
|
||||||
Id = projectInstance.GetProjectId(),
|
|
||||||
TypeGuid = projectInstance.GetProjectTypeGuid(),
|
|
||||||
Name = Path.GetFileNameWithoutExtension(relativeProjectPath),
|
|
||||||
FilePath = relativeProjectPath
|
|
||||||
};
|
|
||||||
|
|
||||||
AddDefaultBuildConfigurations(slnFile, slnProject);
|
|
||||||
|
|
||||||
AddSolutionFolders(slnFile, slnProject);
|
|
||||||
|
|
||||||
slnFile.Projects.Add(slnProject);
|
|
||||||
|
|
||||||
Reporter.Output.WriteLine(
|
|
||||||
string.Format(CommonLocalizableStrings.ProjectAddedToTheSolution, relativeProjectPath));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddDefaultBuildConfigurations(SlnFile slnFile, SlnProject slnProject)
|
|
||||||
{
|
|
||||||
var defaultConfigurations = new List<string>()
|
|
||||||
{
|
|
||||||
"Debug|Any CPU",
|
|
||||||
"Debug|x64",
|
|
||||||
"Debug|x86",
|
|
||||||
"Release|Any CPU",
|
|
||||||
"Release|x64",
|
|
||||||
"Release|x86",
|
|
||||||
};
|
|
||||||
|
|
||||||
// NOTE: The order you create the sections determines the order they are written to the sln
|
|
||||||
// file. In the case of an empty sln file, in order to make sure the solution configurations
|
|
||||||
// section comes first we need to add it first. This doesn't affect correctness but does
|
|
||||||
// stop VS from re-ordering things later on. Since we are keeping the SlnFile class low-level
|
|
||||||
// it shouldn't care about the VS implementation details. That's why we handle this here.
|
|
||||||
AddDefaultSolutionConfigurations(defaultConfigurations, slnFile.SolutionConfigurationsSection);
|
|
||||||
AddDefaultProjectConfigurations(
|
|
||||||
defaultConfigurations,
|
|
||||||
slnFile.ProjectConfigurationsSection.GetOrCreatePropertySet(slnProject.Id));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddDefaultSolutionConfigurations(
|
|
||||||
List<string> defaultConfigurations,
|
|
||||||
SlnPropertySet solutionConfigs)
|
|
||||||
{
|
|
||||||
foreach (var config in defaultConfigurations)
|
|
||||||
{
|
|
||||||
if (!solutionConfigs.ContainsKey(config))
|
|
||||||
{
|
|
||||||
solutionConfigs[config] = config;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddDefaultProjectConfigurations(
|
|
||||||
List<string> defaultConfigurations,
|
|
||||||
SlnPropertySet projectConfigs)
|
|
||||||
{
|
|
||||||
foreach (var config in defaultConfigurations)
|
|
||||||
{
|
|
||||||
var activeCfgKey = $"{config}.ActiveCfg";
|
|
||||||
if (!projectConfigs.ContainsKey(activeCfgKey))
|
|
||||||
{
|
|
||||||
projectConfigs[activeCfgKey] = config;
|
|
||||||
}
|
|
||||||
|
|
||||||
var build0Key = $"{config}.Build.0";
|
|
||||||
if (!projectConfigs.ContainsKey(build0Key))
|
|
||||||
{
|
|
||||||
projectConfigs[build0Key] = config;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddSolutionFolders(SlnFile slnFile, SlnProject slnProject)
|
|
||||||
{
|
|
||||||
var solutionFolders = slnProject.GetSolutionFoldersFromProject();
|
|
||||||
|
|
||||||
if (solutionFolders.Any())
|
|
||||||
{
|
|
||||||
var nestedProjectsSection = slnFile.Sections.GetOrCreateSection(
|
|
||||||
"NestedProjects",
|
|
||||||
SlnSectionType.PreProcess);
|
|
||||||
|
|
||||||
var pathToGuidMap = GetSolutionFolderPaths(slnFile, nestedProjectsSection.Properties);
|
|
||||||
|
|
||||||
string parentDirGuid = null;
|
|
||||||
var solutionFolderHierarchy = string.Empty;
|
|
||||||
foreach (var dir in solutionFolders)
|
|
||||||
{
|
|
||||||
solutionFolderHierarchy = Path.Combine(solutionFolderHierarchy, dir);
|
|
||||||
if (pathToGuidMap.ContainsKey(solutionFolderHierarchy))
|
|
||||||
{
|
|
||||||
parentDirGuid = pathToGuidMap[solutionFolderHierarchy];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var solutionFolder = new SlnProject
|
|
||||||
{
|
|
||||||
Id = Guid.NewGuid().ToString("B").ToUpper(),
|
|
||||||
TypeGuid = ProjectTypeGuids.SolutionFolderGuid,
|
|
||||||
Name = dir,
|
|
||||||
FilePath = dir
|
|
||||||
};
|
|
||||||
|
|
||||||
slnFile.Projects.Add(solutionFolder);
|
|
||||||
|
|
||||||
if (parentDirGuid != null)
|
|
||||||
{
|
|
||||||
nestedProjectsSection.Properties[solutionFolder.Id] = parentDirGuid;
|
|
||||||
}
|
|
||||||
parentDirGuid = solutionFolder.Id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
nestedProjectsSection.Properties[slnProject.Id] = parentDirGuid;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private IDictionary<string, string> GetSolutionFolderPaths(SlnFile slnFile, SlnPropertySet nestedProjects)
|
|
||||||
{
|
|
||||||
var solutionFolderPaths = new Dictionary<string, string>();
|
|
||||||
|
|
||||||
var solutionFolderProjects = slnFile.Projects.GetProjectsByType(ProjectTypeGuids.SolutionFolderGuid);
|
|
||||||
foreach (var slnProject in solutionFolderProjects)
|
|
||||||
{
|
|
||||||
var path = slnProject.FilePath;
|
|
||||||
var id = slnProject.Id;
|
|
||||||
while (nestedProjects.ContainsKey(id))
|
|
||||||
{
|
|
||||||
id = nestedProjects[id];
|
|
||||||
var parentSlnProject = solutionFolderProjects.Where(p => p.Id == id).Single();
|
|
||||||
path = Path.Combine(parentSlnProject.FilePath, path);
|
|
||||||
}
|
|
||||||
|
|
||||||
solutionFolderPaths[path] = slnProject.Id;
|
|
||||||
}
|
|
||||||
|
|
||||||
return solutionFolderPaths;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,12 +48,12 @@ namespace Microsoft.DotNet.Tools.Sln.Remove
|
||||||
bool slnChanged = false;
|
bool slnChanged = false;
|
||||||
foreach (var path in relativeProjectPaths)
|
foreach (var path in relativeProjectPaths)
|
||||||
{
|
{
|
||||||
slnChanged |= RemoveProject(slnFile, path);
|
slnChanged |= slnFile.RemoveProject(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoveEmptyConfigurationSections(slnFile);
|
slnFile.RemoveEmptyConfigurationSections();
|
||||||
|
|
||||||
RemoveEmptySolutionFolders(slnFile);
|
slnFile.RemoveEmptySolutionFolders();
|
||||||
|
|
||||||
if (slnChanged)
|
if (slnChanged)
|
||||||
{
|
{
|
||||||
|
@ -62,120 +62,5 @@ namespace Microsoft.DotNet.Tools.Sln.Remove
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool RemoveProject(SlnFile slnFile, string projectPath)
|
|
||||||
{
|
|
||||||
var projectPathNormalized = PathUtility.GetPathWithDirectorySeparator(projectPath);
|
|
||||||
|
|
||||||
var projectsToRemove = slnFile.Projects.Where((p) =>
|
|
||||||
string.Equals(p.FilePath, projectPathNormalized, StringComparison.OrdinalIgnoreCase)).ToList();
|
|
||||||
|
|
||||||
bool projectRemoved = false;
|
|
||||||
if (projectsToRemove.Count == 0)
|
|
||||||
{
|
|
||||||
Reporter.Output.WriteLine(string.Format(
|
|
||||||
CommonLocalizableStrings.ProjectReferenceCouldNotBeFound,
|
|
||||||
projectPath));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
foreach (var slnProject in projectsToRemove)
|
|
||||||
{
|
|
||||||
var buildConfigsToRemove = slnFile.ProjectConfigurationsSection.GetPropertySet(slnProject.Id);
|
|
||||||
if (buildConfigsToRemove != null)
|
|
||||||
{
|
|
||||||
slnFile.ProjectConfigurationsSection.Remove(buildConfigsToRemove);
|
|
||||||
}
|
|
||||||
|
|
||||||
var nestedProjectsSection = slnFile.Sections.GetSection(
|
|
||||||
"NestedProjects",
|
|
||||||
SlnSectionType.PreProcess);
|
|
||||||
if (nestedProjectsSection != null && nestedProjectsSection.Properties.ContainsKey(slnProject.Id))
|
|
||||||
{
|
|
||||||
nestedProjectsSection.Properties.Remove(slnProject.Id);
|
|
||||||
}
|
|
||||||
|
|
||||||
slnFile.Projects.Remove(slnProject);
|
|
||||||
Reporter.Output.WriteLine(
|
|
||||||
string.Format(CommonLocalizableStrings.ProjectReferenceRemoved, slnProject.FilePath));
|
|
||||||
}
|
|
||||||
|
|
||||||
projectRemoved = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return projectRemoved;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RemoveEmptyConfigurationSections(SlnFile slnFile)
|
|
||||||
{
|
|
||||||
if (slnFile.Projects.Count == 0)
|
|
||||||
{
|
|
||||||
var solutionConfigs = slnFile.Sections.GetSection("SolutionConfigurationPlatforms");
|
|
||||||
if (solutionConfigs != null)
|
|
||||||
{
|
|
||||||
slnFile.Sections.Remove(solutionConfigs);
|
|
||||||
}
|
|
||||||
|
|
||||||
var projectConfigs = slnFile.Sections.GetSection("ProjectConfigurationPlatforms");
|
|
||||||
if (projectConfigs != null)
|
|
||||||
{
|
|
||||||
slnFile.Sections.Remove(projectConfigs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RemoveEmptySolutionFolders(SlnFile slnFile)
|
|
||||||
{
|
|
||||||
var solutionFolderProjects = slnFile.Projects
|
|
||||||
.GetProjectsByType(ProjectTypeGuids.SolutionFolderGuid)
|
|
||||||
.ToList();
|
|
||||||
|
|
||||||
if (solutionFolderProjects.Any())
|
|
||||||
{
|
|
||||||
var nestedProjectsSection = slnFile.Sections.GetSection(
|
|
||||||
"NestedProjects",
|
|
||||||
SlnSectionType.PreProcess);
|
|
||||||
|
|
||||||
var solutionFoldersInUse = GetSolutionFoldersThatContainProjectsInItsHierarchy(
|
|
||||||
slnFile,
|
|
||||||
nestedProjectsSection.Properties);
|
|
||||||
|
|
||||||
foreach (var solutionFolderProject in solutionFolderProjects)
|
|
||||||
{
|
|
||||||
if (!solutionFoldersInUse.Contains(solutionFolderProject.Id))
|
|
||||||
{
|
|
||||||
slnFile.Projects.Remove(solutionFolderProject);
|
|
||||||
nestedProjectsSection.Properties.Remove(solutionFolderProject.Id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nestedProjectsSection.IsEmpty)
|
|
||||||
{
|
|
||||||
slnFile.Sections.Remove(nestedProjectsSection);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private HashSet<string> GetSolutionFoldersThatContainProjectsInItsHierarchy(
|
|
||||||
SlnFile slnFile,
|
|
||||||
SlnPropertySet nestedProjects)
|
|
||||||
{
|
|
||||||
var solutionFoldersInUse = new HashSet<string>();
|
|
||||||
|
|
||||||
var nonSolutionFolderProjects = slnFile.Projects.GetProjectsNotOfType(
|
|
||||||
ProjectTypeGuids.SolutionFolderGuid);
|
|
||||||
|
|
||||||
foreach (var nonSolutionFolderProject in nonSolutionFolderProjects)
|
|
||||||
{
|
|
||||||
var id = nonSolutionFolderProject.Id;
|
|
||||||
while (nestedProjects.ContainsKey(id))
|
|
||||||
{
|
|
||||||
id = nestedProjects[id];
|
|
||||||
solutionFoldersInUse.Add(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return solutionFoldersInUse;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
<AssemblyName>dotnet</AssemblyName>
|
<AssemblyName>dotnet</AssemblyName>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
|
||||||
<SignAssembly>true</SignAssembly>
|
<SignAssembly>true</SignAssembly>
|
||||||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||||
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dotnet5.4</PackageTargetFallback>
|
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);dotnet5.4</PackageTargetFallback>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -32,44 +32,44 @@
|
||||||
<Version>9.0.1</Version>
|
<Version>9.0.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Text.Encoding.CodePages">
|
<PackageReference Include="System.Text.Encoding.CodePages">
|
||||||
<Version>4.0.1</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Diagnostics.FileVersionInfo">
|
<PackageReference Include="System.Diagnostics.FileVersionInfo">
|
||||||
<Version>4.0.0</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.ApplicationInsights">
|
<PackageReference Include="Microsoft.ApplicationInsights">
|
||||||
<Version>2.0.0</Version>
|
<Version>2.0.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Diagnostics.TraceSource">
|
<PackageReference Include="System.Diagnostics.TraceSource">
|
||||||
<Version>4.0.0</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Diagnostics.TextWriterTraceListener">
|
<PackageReference Include="System.Diagnostics.TextWriterTraceListener">
|
||||||
<Version>4.0.0</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Resources.Writer">
|
<PackageReference Include="System.Resources.Writer">
|
||||||
<Version>4.0.0</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Runtime.Serialization.Primitives">
|
<PackageReference Include="System.Runtime.Serialization.Primitives">
|
||||||
<Version>4.1.1</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Private.DataContractSerialization">
|
<PackageReference Include="System.Private.DataContractSerialization">
|
||||||
<Version>4.1.1</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="System.Text.RegularExpressions">
|
<PackageReference Include="System.Text.RegularExpressions">
|
||||||
<Version>4.1.0</Version>
|
<Version>4.3.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Win32.Registry">
|
<PackageReference Include="Microsoft.Win32.Registry">
|
||||||
<Version>4.0.0</Version>
|
<Version>4.3.0</Version>
|
||||||
<IncludeAssets>Analyzers;Build;ContentFiles;Native;Runtime</IncludeAssets>
|
<IncludeAssets>Analyzers;Build;ContentFiles;Native;Runtime</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Build">
|
<PackageReference Include="Microsoft.Build">
|
||||||
<Version>$(CLI_MSBuild_Version)</Version>
|
<Version>$(CLI_MSBuild_Version)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions">
|
||||||
<Version>1.0.1-beta-000933</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.TemplateEngine.Abstractions" Version="$(TemplateEngineVersion)" />
|
<PackageReference Include="Microsoft.TemplateEngine.Abstractions" Version="$(TemplateEngineVersion)" />
|
||||||
<PackageReference Include="Microsoft.TemplateEngine.Cli" Version="$(TemplateEngineVersion)" />
|
<PackageReference Include="Microsoft.TemplateEngine.Cli" Version="$(TemplateEngineVersion)" />
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dotnet5.4</PackageTargetFallback>
|
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);dotnet5.4</PackageTargetFallback>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Build.Runtime">
|
<PackageReference Include="Microsoft.Build.Runtime">
|
||||||
<Version>$(CLI_MSBuild_Version)</Version>
|
<Version>$(CLI_MSBuild_Version)</Version>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
<Version>$(CLI_TestPlatform_Version)</Version>
|
<Version>$(CLI_TestPlatform_Version)</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\dotnet\dotnet.csproj" />
|
<ProjectReference Include="..\dotnet\dotnet.csproj" />
|
||||||
<ProjectReference Include="..\Microsoft.DotNet.Archive\Microsoft.DotNet.Archive.csproj" />
|
<ProjectReference Include="..\Microsoft.DotNet.Archive\Microsoft.DotNet.Archive.csproj" />
|
||||||
<ProjectReference Include="..\Microsoft.DotNet.Cli.Sln.Internal\Microsoft.DotNet.Cli.Sln.Internal.csproj" />
|
<ProjectReference Include="..\Microsoft.DotNet.Cli.Sln.Internal\Microsoft.DotNet.Cli.Sln.Internal.csproj" />
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Build.Runtime">
|
<PackageReference Include="Microsoft.Build.Runtime">
|
||||||
<Version>$(CLI_MSBuild_Version)</Version>
|
<Version>$(CLI_MSBuild_Version)</Version>
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
<VersionPrefix>$(CliVersionPrefix)</VersionPrefix>
|
||||||
<TargetFramework>netcoreapp1.0</TargetFramework>
|
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NETCore.App">
|
<PackageReference Include="Microsoft.NETCore.App">
|
||||||
<Version>1.0.3</Version>
|
<Version>1.1.0</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="NuGet.CommandLine.XPlat">
|
<PackageReference Include="NuGet.CommandLine.XPlat">
|
||||||
<Version>$(CLI_NuGet_Version)</Version>
|
<Version>$(CLI_NuGet_Version)</Version>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue