未验证 提交 0b3b5082 编写于 作者: K Kevin Ransom (msft) 提交者: GitHub

fix 13174 - make fsharp build sourcebuild friendly again (#13239)

* fix 13174

* missed one

* path seperators

* oops

* Oh yeah projects moved

* packonly

* remove debug from package build

* cleanup
上级 ebd32a78
......@@ -61,6 +61,7 @@ param (
[string]$officialSkipTests = "false",
[switch]$noVisualStudio,
[switch]$sourceBuild,
[switch]$skipBuild,
[parameter(ValueFromRemainingArguments = $true)][string[]]$properties)
......@@ -114,6 +115,7 @@ function Print-Usage() {
Write-Host " -useGlobalNuGetCache Use global NuGet cache."
Write-Host " -noVisualStudio Only build fsc and fsi as .NET Core applications. No Visual Studio required. '-configuration', '-verbosity', '-norestore', '-rebuild' are supported."
Write-Host " -sourceBuild Simulate building for source-build."
Write-Host " -skipbuild Skip building product"
Write-Host ""
Write-Host "Command line arguments starting with '/p:' are passed through to MSBuild."
}
......@@ -458,7 +460,7 @@ try {
}
$script:BuildMessage = "Failure building product"
if ($restore -or $build -or $rebuild -or $pack -or $sign -or $publish) {
if ($restore -or $build -or $rebuild -or $pack -or $sign -or $publish -and -not $skipBuild) {
if ($noVisualStudio) {
BuildSolution "FSharp.sln"
}
......
......@@ -483,7 +483,6 @@
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj" />
</ItemGroup>
<ItemGroup Condition="'$(FSHARPCORE_USE_PACKAGE)' != 'true'">
<ProjectReference Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj" />
</ItemGroup>
......
......@@ -15,6 +15,7 @@
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<UseStandardResourceNames>false</UseStandardResourceNames>
<PackageOutputPath>$(ArtifactsPackagesDir)\$(Configuration)</PackageOutputPath>
<ShouldUnsetParentConfigurationAndPlatform>false</ShouldUnsetParentConfigurationAndPlatform>
</PropertyGroup>
</Project>
......@@ -4,8 +4,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework Condition="'$(Configuration)' != 'Proto'">netstandard2.0</TargetFramework>
<TargetFrameworks Condition="'$(Configuration)' == 'Proto'">netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyName>FSharp.Build</AssemblyName>
<NoWarn>$(NoWarn);75</NoWarn> <!-- InternalCommandLineOption -->
<AllowCrossTargeting>true</AllowCrossTargeting>
......
......@@ -11,6 +11,13 @@
<NoDefaultExcludes>true</NoDefaultExcludes>
</PropertyGroup>
<PropertyGroup>
<ArcadeSdkDir Condition="'$(ArcadeSdkDir)' == ''">$(NuGetPackageRoot)microsoft.dotnet.arcade.sdk\$(ArcadeSdkVersion)\</ArcadeSdkDir>
<_BuildReleasePackagesTargets>$(ArcadeSdkDir)tools\BuildReleasePackages.targets</_BuildReleasePackagesTargets>
</PropertyGroup>
<Import Project="$(_BuildReleasePackagesTargets)" />
<ItemGroup>
<NuspecProperty Include="fSharpCorePreviewPackageVersion=$(FSCorePackageVersionValue)-$(VersionSuffix)" />
<NuspecProperty Include="fSharpCorePackageVersion=$(FSCorePackageVersionValue)" />
......@@ -19,6 +26,36 @@
<NuspecProperty Include="artifactsPackagesDir=$(ArtifactsPackagesDir)" />
</ItemGroup>
<Target Name="Build" />
<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)..\fsi\fsiProject\fsi.fsproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\fsc\fscProject\fsc.fsproj" />
</ItemGroup>
<ItemGroup>
<DependentProjects Include="$(MSBuildThisFileDirectory)..\FSharp.Core\FSharp.Core.fsproj">
<AdditionalProperties>TargetFrameworks=netstandard2.1;netstandard2.0</AdditionalProperties>
</DependentProjects>
<DependentProjects Include="$(MSBuildThisFileDirectory)..\FSharp.Build\FSharp.Build.fsproj">
<AdditionalProperties>TargetFrameworks=netstandard2.0</AdditionalProperties>
</DependentProjects>
<DependentProjects Include="$(MSBuildThisFileDirectory)..\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj">
<AdditionalProperties>TargetFrameworks=netstandard2.0</AdditionalProperties>
</DependentProjects>
<DependentProjects Include="$(MSBuildThisFileDirectory)..\FSharp.DependencyManager.Nuget\FSharp.DependencyManager.Nuget.fsproj">
<AdditionalProperties>TargetFrameworks=netstandard2.0</AdditionalProperties>
</DependentProjects>
<DependentProjects Include="$(MSBuildThisFileDirectory)..\Compiler\FSharp.Compiler.Service.fsproj">
<AdditionalProperties>TargetFrameworks=netstandard2.0</AdditionalProperties>
</DependentProjects>
</ItemGroup>
<Target Name="PackDependentProjectsCore">
<MSBuild Projects="@(DependentProjects)" Targets="Pack" Properties="Restore=true;Pack=true;BUILD_PUBLICSIGN=$(BUILD_PUBLICSIGN)" />
</Target>
<Target Name="PackDependentProjects"
BeforeTargets="Build"
DependsOnTargets="PackDependentProjectsCore;PackageReleasePackages">
</Target>
</Project>
// See https://aka.ms/new-console-template for more information
// See https://aka.ms/new-console-template for more information
return 0;
\ No newline at end of file
......@@ -33,7 +33,7 @@
<NgenArchitecture>All</NgenArchitecture>
<NgenPriority>2</NgenPriority>
<Private>True</Private>
<AdditionalProperties>TargetFramework=$(DependencyTargetFramework)</AdditionalProperties>
<AdditionalProperties>TargetFramework=netstandard2.0</AdditionalProperties>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\FSharp.Compiler.Interactive.Settings\FSharp.Compiler.Interactive.Settings.fsproj">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册