Permalink
Browse files

Build updates.

  • Loading branch information...
jp2masa committed Sep 3, 2018
1 parent edddaed commit 0269ff346ceefdc48e255ad13381d9b3cf00a3fc
@@ -9,8 +9,9 @@
# Build results
[Oo]bj/
[Aa]rtifacts/
[Bb]in/
[Oo]bj/
[Pp]ackages/
*.[Oo]bj
@@ -10,5 +10,7 @@
<Import Project="RepoLayout.props" />
<Import Project="PackageProperties.props" />
<Import Project="Versions.props" />
</Project>
@@ -1,16 +1,29 @@
<Project>
<Import Project="PackageProperties.targets" />
<PropertyGroup>
<IsToolProject Condition="'$(IsMSBuildExtensionProject)' == 'True'">True</IsToolProject>
</PropertyGroup>
<Import Project="NETFramework.targets" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
<Import Project="PackageProperties.targets" />
<Import Project="StrongName.targets" />
<!-- .NET Framework targets: reference assemblies -->
<Import Project="NETFramework.targets" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
<!-- Project types -->
<Import Project="MSBuildExtension.targets" Condition="'$(IsMSBuildExtensionProject)' == 'True'" />
<Import Project="Tests.targets" Condition="'$(IsTestProject)' == 'True'" />
<Import Project="Tool.targets" Condition="'$(IsToolProject)' == 'True'" />
<Import Project="VSIX.targets" Condition="'$(IsVsixProject)' == 'True'" />
<Import Project="Workarounds.targets" />
<!--
Import package versions last, as it updates package references included before.
Update should affect includes after itself, but for some cases it doesn't seem
to work, maybe because the import is conditioned?
-->
<Import Project="PackageVersions.targets" />
</Project>
@@ -0,0 +1,8 @@
<Project>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" PrivateAssets="All" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" PrivateAssets="All" ExcludeAssets="Runtime" />
</ItemGroup>
</Project>
@@ -1,19 +1,18 @@
<Project>
<PropertyGroup>
<MicrosoftAnalyzersVersion>2.6.1</MicrosoftAnalyzersVersion>
<MicrosoftNETFrameworkReferenceAssembliesVersion>1.0.0-alpha-004</MicrosoftNETFrameworkReferenceAssembliesVersion>
<MicrosoftVisualStudioSdkEmbedInteropTypesVersion>15.0.17</MicrosoftVisualStudioSdkEmbedInteropTypesVersion>
<MicrosoftVSSDKBuildToolsVersion>15.7.109</MicrosoftVSSDKBuildToolsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Update="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
<PackageReference Update="Microsoft.Build.Framework" Version="$(MicrosoftBuildVersion)" />
<PackageReference Update="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" />
<PackageReference Update="Microsoft.CodeAnalysis.Analyzers" Version="$(MicrosoftAnalyzersVersion)" />
<PackageReference Update="Microsoft.CodeQuality.Analyzers" Version="$(MicrosoftAnalyzersVersion)" />
<PackageReference Update="Microsoft.NetCore.Analyzers" Version="$(MicrosoftAnalyzersVersion)" />
<PackageReference Update="Microsoft.NetFramework.Analyzers" Version="$(MicrosoftAnalyzersVersion)" />
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="$(MicrosoftNETFrameworkReferenceAssembliesVersion)" />
<PackageReference Update="Microsoft.VisualStudio.ProjectSystem" Version="$(MicrosoftVisualStudioProjectSystemVersion)" />
<PackageReference Update="Microsoft.VisualStudio.ProjectSystem.Analyzers" Version="$(MicrosoftVisualStudioProjectSystemVersion)" />
<PackageReference Update="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="$(MicrosoftVisualStudioSdkEmbedInteropTypesVersion)" />
<PackageReference Update="Microsoft.VisualStudio.Threading.Analyzers" Version="$(MicrosoftVisualStudioThreadingAnalyzersVersion)" />
<PackageReference Update="Microsoft.VSSDK.BuildTools" Version="$(MicrosoftVSSDKBuildToolsVersion)" />
</ItemGroup>
@@ -0,0 +1,74 @@
<Project>
<PropertyGroup>
<DevelopmentDependency Condition="'$(DevelopmentDependency)' == ''">True</DevelopmentDependency>
</PropertyGroup>
<PropertyGroup>
<AppendTargetFrameworkToToolsPackageFolder Condition="'$(AppendTargetFrameworkToToolsPackageFolder)' == ''">True</AppendTargetFrameworkToToolsPackageFolder>
</PropertyGroup>
<PropertyGroup>
<IncludeBuildOutput>False</IncludeBuildOutput>
<SuppressDependenciesWhenPacking>True</SuppressDependenciesWhenPacking>
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackToolProject</TargetsForTfmSpecificContentInPackage>
</PropertyGroup>
<Target Name="PackToolProject"
DependsOnTargets="Publish">
<PropertyGroup>
<ToolPackagePath>$([MSBuild]::EnsureTrailingSlash($(ToolPackagePath)))</ToolPackagePath>
<ToolPackagePath Condition="'$(AppendTargetFrameworkToToolsPackageFolder)' == 'True'">$(ToolPackagePath)$(TargetFramework)\</ToolPackagePath>
</PropertyGroup>
<ItemGroup>
<GeneratedToolFiles Include="$(PublishDepsFilePath)" />
<GeneratedToolFiles Include="$(PublishRuntimeConfigFilePath)" Condition="'$(GenerateRuntimeConfigurationFiles)' == 'True'" />
</ItemGroup>
<ItemGroup>
<TfmSpecificPackageFile Include="@(GeneratedToolFiles)">
<PackagePath>tools\$(ToolPackagePath)%(GeneratedToolFiles.RecursiveDir)</PackagePath>
</TfmSpecificPackageFile>
<TfmSpecificPackageFile Include="@(ResolvedFileToPublish->'$([MSBuild]::NormalizeDirectory($(PublishDir)))%(RelativePath)')">
<PackagePath>tools\$(ToolPackagePath)%(ResolvedFileToPublish.RelativePath)</PackagePath>
</TfmSpecificPackageFile>
</ItemGroup>
</Target>
<PropertyGroup>
<GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);_GetProjectReferencesContentToPack</GenerateNuspecDependsOn>
</PropertyGroup>
<Target Name="_GetProjectReferencesContentToPack"
Condition="'@(ProjectReference)' != ''">
<MSBuild Projects="@(ProjectReference)"
Targets="GetNupkgContent"
BuildInParallel="$(BuildInParallel)"
Properties="_NupkgContentPath=%(ProjectReference.PackagePath);Configuration=$(Configuration);Platform=$(Platform)"
Condition="'%(ProjectReference.Pack)' == 'True'"
RemoveProperties="TargetFramework;%(ProjectReference.GlobalPropertiesToRemove)">
<Output TaskParameter="TargetOutputs" ItemName="_PackageFiles" />
</MSBuild>
</Target>
<ItemGroup>
<ProjectReference Update="@(ProjectReference)">
<ReferenceOutputAssembly Condition="'%(ProjectReference.Pack)' == 'True'">False</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Target Name="GetNupkgContent"
Returns="@(_NupkgContent)"
DependsOnTargets="$(GenerateNuspecDependsOn)">
<ItemGroup>
<_NupkgContent Include="@(_PackageFiles->'%(FullPath)')"
PackagePath="$([MSBuild]::EnsureTrailingSlash($(_NupkgContentPath)))%(_PackageFiles.PackagePath)" />
</ItemGroup>
</Target>
</Project>
@@ -0,0 +1,13 @@
<Project>
<PropertyGroup>
<MicrosoftAnalyzersVersion>2.6.1</MicrosoftAnalyzersVersion>
<MicrosoftBuildVersion>15.6.85</MicrosoftBuildVersion>
<MicrosoftNETFrameworkReferenceAssembliesVersion>1.0.0-alpha-004</MicrosoftNETFrameworkReferenceAssembliesVersion>
<MicrosoftVisualStudioProjectSystemVersion>15.3.224</MicrosoftVisualStudioProjectSystemVersion>
<MicrosoftVisualStudioSdkEmbedInteropTypesVersion>15.0.17</MicrosoftVisualStudioSdkEmbedInteropTypesVersion>
<MicrosoftVisualStudioThreadingAnalyzersVersion>15.8.145</MicrosoftVisualStudioThreadingAnalyzersVersion>
<MicrosoftVSSDKBuildToolsVersion>15.7.109</MicrosoftVSSDKBuildToolsVersion>
</PropertyGroup>
</Project>
@@ -1,9 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net471</TargetFramework>
<PackageDescription>Property pages implementation for Visual Studio CPS-based project systems.</PackageDescription>
<PackageTags>VS Visual Studio Property Pages CPS WPF Windows Forms WinForms X# XSharp Cosmos</PackageTags>
<MicrosoftBuildVersion>15.3.409</MicrosoftBuildVersion>
<MicrosoftVisualStudioProjectSystemVersion>15.3.224</MicrosoftVisualStudioProjectSystemVersion>
</PropertyGroup>
<ItemGroup>
@@ -15,13 +17,13 @@
<ItemGroup>
<PackageReference Include="EnvDTE" Version="8.0.2" />
<PackageReference Include="Microsoft.Build" Version="15.3.409" />
<PackageReference Include="Microsoft.Build" />
<PackageReference Include="Microsoft.VisualStudio.ManagedInterfaces" Version="8.0.50728" />
<PackageReference Include="Microsoft.VisualStudio.OLE.Interop" Version="7.10.6071" />
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem" Version="15.3.224" />
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem.Analyzers" Version="15.3.224" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem" />
<PackageReference Include="Microsoft.VisualStudio.ProjectSystem.Analyzers" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0" Version="15.0.26606" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="15.8.132" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" PrivateAssets="All" />
</ItemGroup>
</Project>
@@ -1,17 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<IsPackable>False</IsPackable>
<IsMSBuildExtensionProject>True</IsMSBuildExtensionProject>
<AppendTargetFrameworkToToolsPackageFolder>False</AppendTargetFrameworkToToolsPackageFolder>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" Version="15.3.409" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.3.409" />
</ItemGroup>
<Target Name="CopyBuildOutput" DependsOnTargets="Build">
<Copy SourceFiles="$(OutputPath)$(AssemblyName).dll" DestinationFolder="$(DestinationFolder)" />
</Target>
</Project>
@@ -4,7 +4,7 @@
using System.Linq;
using System.Reflection;
namespace XSharp.DotNetCLI
namespace XSharp.CommandLine
{
internal class Program
{
@@ -4,60 +4,28 @@
<TargetFrameworks>netcoreapp2.0;net471</TargetFrameworks>
<OutputType>Exe</OutputType>
<AssemblyName>xsc</AssemblyName>
<RootNamespace>XSharp.XSC</RootNamespace>
<RootNamespace>XSharp.CommandLine</RootNamespace>
<ApplicationIcon>XSharp.ico</ApplicationIcon>
<IsPackable>True</IsPackable>
<PackageId>XSharp.Compiler</PackageId>
<PackageDescription>X# compiler.</PackageDescription>
<DevelopmentDependency>True</DevelopmentDependency>
<NuspecFile>XSharp.Compiler.nuspec</NuspecFile>
<NuspecBasePath>..\</NuspecBasePath>
<!-- Package Properties -->
<InnerTargets>Publish</InnerTargets>
<PackageSubFolderName Condition="$(TargetFramework.StartsWith('net'))">win</PackageSubFolderName>
<PackageSubFolderName Condition="$(TargetFramework.StartsWith('netcoreapp'))">netcoreapp</PackageSubFolderName>
<CompilerPackageDir>$(BaseIntermediateOutputPath)$(Configuration)\package\</CompilerPackageDir>
<PublishDir>$(CompilerPackageDir)tools\$(PackageSubFolderName)\</PublishDir>
<IsPackable>True</IsPackable>
<IsMSBuildExtensionProject>True</IsMSBuildExtensionProject>
<AppendTargetFrameworkToToolsPackageFolder>False</AppendTargetFrameworkToToolsPackageFolder>
<ToolPackagePath Condition="$(TargetFramework.StartsWith('net'))">xsc\win\</ToolPackagePath>
<ToolPackagePath Condition="$(TargetFramework.StartsWith('netcoreapp'))">xsc\netcoreapp\</ToolPackagePath>
</PropertyGroup>
<ItemGroup>
<Content Include="build\**" Pack="True" PackagePath="build\" />
<Content Include="tools\**" Pack="True" PackagePath="tools\" />
<Content Include="tools\**" Exclude="tools\netcoreapp\**" Pack="True" PackagePath="tools\" />
<GeneratedToolFiles Include="tools\netcoreapp\**" Condition="$(TargetFramework.StartsWith('netcoreapp'))" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\XSharp.Assembler\XSharp.Assembler.csproj" />
<ProjectReference Include="..\XSharp.Build\XSharp.Build.csproj" />
<ProjectReference Include="..\XSharp.Compiler.Tasks\XSharp.Compiler.Tasks.csproj" Pack="True" PackagePath="" />
<ProjectReference Include="..\XSharp\XSharp.csproj" />
<ProjectReference Include="..\XSharp.Compiler.Tasks\XSharp.Compiler.Tasks.csproj">
<PrivateAssets>All</PrivateAssets>
<ReferenceOutputAssembly>False</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Target Name="PreparePackageDir" BeforeTargets="DispatchToInnerBuilds">
<RemoveDir Directories="$(CompilerPackageDir)" />
</Target>
<Target Name="IncludeContentInPackage" AfterTargets="DispatchToInnerBuilds">
<Copy SourceFiles="@(Content)" DestinationFolder="$(CompilerPackageDir)%(PackagePath)%(RecursiveDir)" />
</Target>
<Target Name="IncludeCompilerTasksInPackage" AfterTargets="IncludeContentInPackage">
<MSBuild Projects="..\XSharp.Compiler.Tasks\XSharp.Compiler.Tasks.csproj" Targets="CopyBuildOutput" Properties="TargetFramework=netstandard1.3;DestinationFolder=$(MSBuildThisFileDirectory)$(CompilerPackageDir)tools\" />
</Target>
<Target Name="PublishToSdk" DependsOnTargets="DispatchToInnerBuilds">
<ItemGroup>
<IncludeInSdk Include="$(CompilerPackageDir)**" />
</ItemGroup>
<Copy SourceFiles="@(IncludeInSdk)" DestinationFolder="$(SdkCompilerFolder)%(RecursiveDir)" />
</Target>
</Project>

This file was deleted.

Oops, something went wrong.
@@ -1,26 +1,21 @@
<Project>
<Choose>
<When Condition="'$(MSBuildRuntimeType)' == 'Core'">
<PropertyGroup>
<XscToolPath>$(MSBuildThisFileDirectory)netcoreapp\</XscToolPath>
<XscToolExe Condition="'$(OS)' == 'Windows_NT'">RunXsc.cmd</XscToolExe>
<XscToolExe Condition="'$(OS)' != 'Windows_NT'">RunXsc</XscToolExe>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<XscToolPath>$(MSBuildThisFileDirectory)win\</XscToolPath>
<XscToolExe>xsc.exe</XscToolExe>
</PropertyGroup>
</Otherwise>
</Choose>
<PropertyGroup>
<XscToolPath>$(MSBuildThisFileDirectory)win\</XscToolPath>
<XscToolExe>xsc.exe</XscToolExe>
</PropertyGroup>
<PropertyGroup Condition="'$(MSBuildRuntimeType)' == 'Core'">
<XscToolPath>$(MSBuildThisFileDirectory)netcoreapp\</XscToolPath>
<XscToolExe Condition="'$(OS)' != 'Windows_NT'">RunXsc</XscToolExe>
<XscToolExe Condition="'$(OS)' == 'Windows_NT'">RunXsc.cmd</XscToolExe>
</PropertyGroup>
<Target Name="MakeCompilerScriptsExecutable"
BeforeTargets="CoreCompile"
Condition="'$(MSBuildRuntimeType)' == 'Core' AND '$(OS)' != 'Windows_NT'">
<Exec Command="chmod +x '$(XscToolPath)/$(XscToolExe)'" />
<Exec Command="chmod +x '$(XscToolPath)$(XscToolExe)'" />
</Target>
Oops, something went wrong.

0 comments on commit 0269ff3

Please sign in to comment.