Adjust Uno.SourceGeneration to build using net462

The Linux requires that the Uno.SourceGeneration is also available on netcore2.1
This commit is contained in:
Jérôme Laban 2018-11-30 10:53:07 -05:00
Родитель 148194ee6a
Коммит 1862c4c844
9 изменённых файлов: 152 добавлений и 197 удалений

Просмотреть файл

@ -27,6 +27,6 @@
</dependencies>
</metadata>
<files>
<file src="..\src\Uno.SourceGeneration\Bin\Release\Uno.SourceGeneration.dll" target="lib/net462/Uno.SourceGeneration.dll" />
<file src="..\src\Uno.SourceGeneration\Bin\Release\net462\Uno.SourceGeneration.dll" target="lib/net462/Uno.SourceGeneration.dll" />
</files>
</package>

Просмотреть файл

@ -26,5 +26,7 @@
<file src="..\src\Uno.SourceGeneratorTasks.Shared\Content\Uno.SourceGenerationTasks.targets" target="build\MonoAndroid" />
<file src="..\src\Uno.SourceGeneratorTasks.Shared\Content\Uno.SourceGenerationTasks.targets" target="build\Xamarin.iOS10" />
<file src="..\src\Uno.SourceGeneratorTasks.Shared\Content\Uno.SourceGenerationTasks.targets" target="build\Xamarin.Mac20" />
<file src="_._" target="lib/netstandard2.0" />
</files>
</package>

0
build/_._ Normal file
Просмотреть файл

Просмотреть файл

@ -2,86 +2,87 @@
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D45247E2-A279-472C-8D8B-CBCB83F37FB1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Uno.SampleGenerators</RootNamespace>
<AssemblyName>Uno.SampleGenerators</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<StartAction>Program</StartAction>
<StartProgram>$(DevEnvDir)..\..\MSBuild\15.0\Bin\MSBuild.exe</StartProgram>
<StartArguments>..\..\..\Uno.SampleProject\Uno.SampleProject.csproj /p:Configuration=Debug</StartArguments>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D45247E2-A279-472C-8D8B-CBCB83F37FB1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Uno.SampleGenerators</RootNamespace>
<AssemblyName>Uno.SampleGenerators</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<StartAction>Program</StartAction>
<StartProgram>$(DevEnvDir)..\..\MSBuild\15.0\Bin\MSBuild.exe</StartProgram>
<StartArguments>..\..\..\Uno.SampleProject\Uno.SampleProject.csproj /p:Configuration=Debug</StartArguments>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet />
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet />
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Common">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Common">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
<Version>4.3.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="AnotherCustomSourceGenerator.cs" />
<Compile Include="GeneratorBaseClass.cs" />
<Compile Include="MyCustomSourceGenerator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UselessGenerator.cs" />
<Compile Include="AnotherCustomSourceGenerator.cs" />
<Compile Include="GeneratorBaseClass.cs" />
<Compile Include="MyCustomSourceGenerator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UselessGenerator.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Uno.SourceGeneration\Uno.SourceGeneration.csproj">
<Project>{b59fa47d-b3d2-4309-ae28-f5150ab02d46}</Project>
<Name>Uno.SourceGeneration</Name>
</ProjectReference>
<ProjectReference Include="..\Uno.SourceGeneration\Uno.SourceGeneration.csproj">
<Project>{b59fa47d-b3d2-4309-ae28-f5150ab02d46}</Project>
<Name>Uno.SourceGeneration</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
</ItemGroup>
@ -93,4 +94,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

Просмотреть файл

@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Uno.SampleProject</RootNamespace>
<AssemblyName>Uno.SampleProject</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -22,7 +23,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>
</CodeAnalysisRuleSet>
<UnoSourceGeneratorUnsecureBinLogEnabled>true</UnoSourceGeneratorUnsecureBinLogEnabled>
<UnoSourceGeneratorUnsecureBinLogEnabled>true</UnoSourceGeneratorUnsecureBinLogEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -48,7 +49,7 @@
<Compile Include="MyCustomSourceGenerator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<PropertyGroup>
<PropertyGroup>
<UnoSourceGeneratorTasksPath>..\..\Uno.SourceGeneratorTasks.Dev$(MSBuildToolsVersion)\bin\$(Configuration)</UnoSourceGeneratorTasksPath>
<UnoSourceGeneratorOutputPath>GeneratedFiles</UnoSourceGeneratorOutputPath>
</PropertyGroup>
@ -71,10 +72,10 @@
</Target>
-->
<Target Name="ValidateBinLog" Condition="'$(Configuration)' == 'Release'" AfterTargets="Build">
<ItemGroup>
<_binLogFiles Include="$(IntermediateOutputPath)\**\*.binlog" />
</ItemGroup>
<Message Text="Validating binlog files presence in $(IntermediateOutputPath)" Importance="High" />
<Error Text="No binlog file should be generated in Release configuration (found @(_binLogFiles))" Condition="'@(_binLogFiles)' != ''" />
<ItemGroup>
<_binLogFiles Include="$(IntermediateOutputPath)\**\*.binlog" />
</ItemGroup>
<Message Text="Validating binlog files presence in $(IntermediateOutputPath)" Importance="High" />
<Error Text="No binlog file should be generated in Release configuration (found @(_binLogFiles))" Condition="'@(_binLogFiles)' != ''" />
</Target>
</Project>
</Project>

Просмотреть файл

@ -17,22 +17,3 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Uno.SourceGeneration")]
[assembly: AssemblyDescription("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("b59fa47d-b3d2-4309-ae28-f5150ab02d46")]
//[assembly: InternalsVisibleTo("Uno.SourceGeneration.Host")]
//[assembly: InternalsVisibleTo("Uno.SourceGenerator.Dev15.0")]
//[assembly: InternalsVisibleTo("Uno.SourceGenerator.Dev14.0")]

Просмотреть файл

@ -1,100 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B59FA47D-B3D2-4309-AE28-F5150AB02D46}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Uno.SourceGeneration</RootNamespace>
<AssemblyName>Uno.SourceGeneration</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<CopyNuGetImplementations>true</CopyNuGetImplementations>
<TargetFrameworkProfile />
<TargetFrameworks>netcoreapp2.1;net462</TargetFrameworks>
<DefineConstants>$(DefineConstants);HAS_BINLOG</DefineConstants>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet />
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<ItemGroup Condition="'$(TargetFramework)'=='net462'">
<PackageReference Include="Microsoft.Build">
<Version>14.3.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.Build.Utilities.Core">
<Version>14.3.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Common">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
<Version>4.3.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build">
<Version>14.3.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.Build.Utilities.Core">
<Version>14.3.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Common">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common">
<Version>1.3.1</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
<Version>4.3.0</Version>
</PackageReference>
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp2.1'">
<!-- This target is only used to build the host on linux -->
<PackageReference Include="Microsoft.Build">
<Version>15.4.8</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Build.Utilities.Core">
<Version>15.4.8</Version>
<ExcludeAssets>runtime</ExcludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis">
<Version>2.10.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Common">
<Version>2.10.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp">
<Version>2.10.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces">
<Version>2.10.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common">
<Version>2.10.0</Version>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="2.10.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\build\AssemblyVersion.cs">
<Link>AssemblyVersion.cs</Link>
</Compile>
<Compile Include="GenerateBeforeAttribute.cs" />
<Compile Include="GenerateAfterAttribute.cs" />
<Compile Include="ISourceGeneratorLogger.cs" />
<Compile Include="SourceGeneratorExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SourceGenerator.cs" />
<Compile Include="SourceGeneratorContext.cs" />
</ItemGroup>
<ItemGroup>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

Просмотреть файл

@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Uno.SourceGeneratorTasks</RootNamespace>
<AssemblyName>Uno.SourceGeneratorTasks.v0</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<CopyNuGetImplementations>true</CopyNuGetImplementations>
<TargetFrameworkProfile />
@ -141,4 +141,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

Просмотреть файл

@ -60,4 +60,4 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>