forked from dotnet/orleans
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build-time code generation for .NET Core (dotnet#3424)
* Build-time code generation for .NET Core * Fix build order. Remove BuildFlavor * sql * GetDotNetHost * build props * netcoreapp2.0 bootstrap
- Loading branch information
1 parent
9795c27
commit 26e0a1e
Showing
25 changed files
with
833 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
<Project> | ||
<Project Condition=" '$(OrleansBuildTimeCodeGen)' == 'true' "> | ||
<!-- Begin Orleans: Without these lines the project won't build properly --> | ||
<!-- Set path to ClientGenerator.exe --> | ||
<!-- Set path to code generator --> | ||
<PropertyGroup Condition=" '$(OrleansBuildTimeCodeGen)' == 'true' "> | ||
<!--<OrleansReferencesBase>$(ProjectDir)../Bootstrap/$(Configuration)</OrleansReferencesBase>--> | ||
<OrleansReferencesBase>$(SourceRoot)/Bootstrap/$(Configuration)/</OrleansReferencesBase> | ||
<OrleansCodeGeneratorAssembly>$(SourceRoot)Bootstrap/$(Configuration)/ClientGenerator.dll</OrleansCodeGeneratorAssembly> | ||
</PropertyGroup> | ||
<Import Project="$(SourceRoot)/src/Orleans.SDK.targets" Condition=" '$(OrleansBuildTimeCodeGen)' == 'true' and Exists('$(SourceRoot)/src/Orleans.SDK.targets') " /> | ||
<Import Project="$(SourceRoot)src/ClientGenerator/build/Microsoft.Orleans.OrleansCodeGenerator.Build.targets" Condition=" '$(OrleansBuildTimeCodeGen)' == 'true' " /> | ||
<!--End Orleans --> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/BootstrapBuild/ClientGenerator/ClientGenerator.Bootstrap.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<Project Sdk="Microsoft.NET.Sdk" DefaultTargets="Build;PostBuildPublish"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.0</TargetFramework> | ||
<OutputType>Exe</OutputType> | ||
<AssemblyName>ClientGenerator</AssemblyName> | ||
<RootNamespace>Microsoft.Orleans.CodeGenerator.MSBuild</RootNamespace> | ||
<SourceDir>$(SourceRoot)src/ClientGenerator/</SourceDir> | ||
<PublishDir>$(SourceRoot)Bootstrap/$(Configuration)/</PublishDir> | ||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> | ||
<GenerateBindingRedirects>true</GenerateBindingRedirects> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="$(SourceDir)**/*.cs" Exclude="$(SourceDir)obj/**/*.cs;$(SourceDir)bin/**/*.cs"> | ||
<!-- Hide the files and folder structure in the editor. --> | ||
<Link>_%(Filename).%(Extension)</Link> | ||
<Visible>false</Visible> | ||
</Compile> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="System.Runtime" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" /> | ||
<PackageReference Include="System.Runtime.Loader" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="$(MicrosoftExtensionsDependencyModelVersion)" /> | ||
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildVersion)" /> | ||
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Orleans.Core.Abstractions\Orleans.Core.Abstractions.csproj" /> | ||
<ProjectReference Include="..\OrleansCodeGenerator\OrleansCodeGenerator.Bootstrap.csproj" /> | ||
<ProjectReference Include="..\Orleans\Orleans.Bootstrap.csproj" /> | ||
</ItemGroup> | ||
|
||
<Target Name="PostBuildPublish" AfterTargets="Build"> | ||
<CallTarget Targets="Publish" /> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<_ParentDirectoryBuildPropsPath Condition="'$(_DirectoryBuildPropsFile)' != ''">$([System.IO.Path]::Combine('..', '$(_DirectoryBuildPropsFile)'))</_ParentDirectoryBuildPropsPath> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(_ParentDirectoryBuildPropsPath)" Condition="Exists('$(_ParentDirectoryBuildPropsPath)')"/> | ||
|
||
<PropertyGroup> | ||
<IsPackable>false</IsPackable> | ||
<DefineConstants>$(DefineConstants);EXCLUDE_CODEGEN</DefineConstants> | ||
<OrleansCodeGenPrecompile>true</OrleansCodeGenPrecompile> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<Project /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<AssemblyName>Orleans</AssemblyName> | ||
<RootNamespace>Orleans</RootNamespace> | ||
<SourceDir>$(SourceRoot)src/Orleans/</SourceDir> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="$(SourceDir)**/*.cs" Exclude="$(SourceDir)obj/**/*.cs;$(SourceDir)bin/**/*.cs"> | ||
<!-- Hide the files and folder structure in the editor. --> | ||
<Link>_%(Filename).%(Extension)</Link> | ||
<Visible>false</Visible> | ||
</Compile> | ||
<Compile Remove="$(SourceDir)Statistics\RuntimeStatisticsGroup.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjection)" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" /> | ||
<PackageReference Include="System.Collections.Immutable" Version="$(SystemCollectionsImmutableVersion)" /> | ||
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTupleVersion)" /> | ||
<PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" /> | ||
<PackageReference Include="System.ComponentModel.TypeConverter" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Diagnostics.FileVersionInfo" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Diagnostics.Process" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Diagnostics.TraceSource" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Linq.Expressions" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Net.NameResolution" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Net.NetworkInformation" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Reflection.Emit" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Reflection.TypeExtensions" Version="$(SystemReflectionTypeExtensionsVersion)" /> | ||
<PackageReference Include="System.Runtime" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Threading.Thread" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Threading.ThreadPool" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Xml.XmlDocument" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Xml.XPath.XmlDocument" Version="$(SystemRuntimeVersion)" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Orleans.Core.Abstractions\Orleans.Core.Abstractions.csproj" /> | ||
</ItemGroup> | ||
</Project> |
29 changes: 29 additions & 0 deletions
29
src/BootstrapBuild/OrleansCodeGenerator/OrleansCodeGenerator.Bootstrap.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<AssemblyName>OrleansCodeGenerator</AssemblyName> | ||
<RootNamespace>OrleansCodeGenerator</RootNamespace> | ||
<SourceDir>$(SourceRoot)src/OrleansCodeGenerator/</SourceDir> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="$(SourceDir)**/*.cs" Exclude="$(SourceDir)obj/**/*.cs;$(SourceDir)bin/**/*.cs"> | ||
<!-- Hide the files and folder structure in the editor. --> | ||
<Link>_%(Filename).%(Extension)</Link> | ||
<Visible>false</Visible> | ||
</Compile> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Orleans.Core.Abstractions\Orleans.Core.Abstractions.csproj" /> | ||
<ProjectReference Include="..\Orleans\Orleans.Bootstrap.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="$(MicrosoftCodeAnalysisCSharpVersion)" /> | ||
<PackageReference Include="System.Reflection" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Runtime" Version="$(SystemRuntimeVersion)" /> | ||
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeVersion)" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.