"values": ["x64", "x86", "arm", "arm64", "armel"],
"defaultValue": "x64"
},
- "Framework":{
- "description": "Build the specified framework (netcoreapp1.0, netcoreapp1.1, netcoreapp2.0, or netcoreapp2.1 default: netcoreapp2.1)",
- "valueType": "property",
- "values": ["netcoreapp1.0", "netcoreapp1.1", "netcoreapp2.0", "netcoreapp2.1"],
- "defaultValue": "netcoreapp2.1"
- },
"ConfigurationGroup": {
"description": "Sets the configuration group as Release or Debug.",
"valueType": "property",
"valueType": "property",
"values": ["true", "false"],
"defaultValue": false
- },
+ },
"Project": {
"description": "Project where the commands are going to be applied.",
"valueType": "passThrough",
"settings": {
"PortableBuild":"true"
}
- }
+ }
},
"defaultValues":{
"toolName": "msbuild",
"settings": {
"TargetArchitecture": "default",
- "Framework": "default",
"OSGroup": "default",
"MsBuildLogging":"/flp:v=n;LogFile=msbuild-cmake.log"
}
"defaultValues":{
"toolName": "msbuild",
"settings": {
- "Architecture": "default",
+ "Architecture": "default",
"TargetArchitecture": "default",
- "Framework": "default",
"OSGroup": "default",
"MsBuildLogging":"/flp:v=n;LogFile=msbuild.log"
}
<PropertyGroup>
<Version>$(SharedFrameworkNugetVersion)</Version>
-
- <!-- This corresponds to TFM we want the SharedFX to target and should be updated when needed. -->
-
- <NETCoreAppFramework>netcoreapp2.1</NETCoreAppFramework>
<OmitDependencies>true</OmitDependencies>
<SkipValidatePackage>true</SkipValidatePackage>
<ShouldCreateLayout>false</ShouldCreateLayout>
<Dependency Include="_._">
<TargetFramework>.NETCoreApp2.0</TargetFramework>
</Dependency>
-
+
<!-- references the host packages -->
<Dependency Include="Microsoft.NETCore.DotNetHostPolicy">
<Version>$(HostPolicyVersion)</Version>
<File Include="$(PlaceHolderFile)">
<TargetPath>ref/netcoreapp</TargetPath>
</File>
-
+
<File Include="$(PropsFile)">
<TargetPath>build/$(NETCoreAppFramework)</TargetPath>
</File>
<AdditionalProperties Condition="'$(PackageTargetRuntime)' != ''">NuGetRuntimeIdentifier=$(PackageTargetRuntime)</AdditionalProperties>
</ProjectReference>
</ItemGroup>
-
+
<Target Name="GenerateFileVersionProps" BeforeTargets="GenerateNuSpec" Condition="'$(PackageTargetRuntime)' == ''">
<MSBuild Projects="@(ProjectReference)"
- Condition="'%(ProjectReference.PackageTargetRuntime)' == '$(PackageRID)' OR
- '%(ProjectReference.BuidOnRID)' == '$(PackageRID)' OR
+ Condition="'%(ProjectReference.PackageTargetRuntime)' == '$(PackageRID)' OR
+ '%(ProjectReference.BuidOnRID)' == '$(PackageRID)' OR
('$(IncludeAllRuntimePackagesInPlatformManifest)' == 'true' AND
- '%(ProjectReference.PackageTargetRuntime)' != '' AND
+ '%(ProjectReference.PackageTargetRuntime)' != '' AND
'%(ProjectReference.ExcludeFromPlatformManifest)' != 'true')"
Targets="GetPackageFiles">
<Output TaskParameter="TargetOutputs" ItemName="SharedFrameworkRuntimeFiles" />
</MSBuild>
-
+
<GenerateFileVersionProps Files="@(SharedFrameworkRuntimeFiles)"
PackageId="$(Id)"
PackageVersion="$(Version)"
<!-- we don't want any analyzers by ResolveNuGetPackageAssets
null-refs when this isn't set and an analyzer is in the packages -->
<Language>unused</Language>
- <NuGetTargetMoniker>.NETCoreApp,Version=v2.1</NuGetTargetMoniker>
- <NuGetTargetMonikerShort>netcoreapp2.1</NuGetTargetMonikerShort>
- <PackageTargetFramework>netcoreapp2.1</PackageTargetFramework>
+ <NuGetTargetMoniker>$(NETCoreAppFrameworkMoniker)</NuGetTargetMoniker>
+ <NuGetTargetMonikerShort>$(NETCoreAppFramework)</NuGetTargetMonikerShort>
+ <PackageTargetFramework>$(NETCoreAppFramework)</PackageTargetFramework>
<PrimaryPackage>Microsoft.Private.CoreFx.NETCoreApp</PrimaryPackage>
<CrossGenOutputPath>$(CrossGenRootPath)/$(MSBuildProjectName)/$(NuGetRuntimeIdentifier)</CrossGenOutputPath>
<ContainsPackageReferences>true</ContainsPackageReferences>
</PropertyGroup>
<PropertyGroup>
- <CommonProjectArgs>$(MSBuildPassThroughPropertyList) /p:TargetFramework=$(Framework) /p:RuntimeIdentifier=$(PackageTargetRid)</CommonProjectArgs>
+ <CommonProjectArgs>$(MSBuildPassThroughPropertyList) /p:TargetFramework=$(NETCoreAppFramework) /p:RuntimeIdentifier=$(PackageTargetRid)</CommonProjectArgs>
<!-- SFP is short for SharedFrameworkPublish. Using an abreviation to prevent long path issues. -->
<SharedFrameworkIntermediatePackagesDir>$(IntermediateOutputRootPath)SFP.packages\</SharedFrameworkIntermediatePackagesDir>
<Target Name="PublishSharedFrameworkAndSharedHost"
DependsOnTargets="RestoreLockedCoreHost">
-
+
<PropertyGroup>
<SharedFrameworkSourceRoot>$(MSBuildThisFileDirectory)framework</SharedFrameworkSourceRoot>
<CommonSharedFrameworkArgs>$(CommonProjectArgs) /p:RuntimeFrameworkVersion=$(SharedFrameworkNugetVersion)</CommonSharedFrameworkArgs>
- </PropertyGroup>
+ </PropertyGroup>
<RemoveDir Directories="$(SharedFrameworkNameAndVersionRoot)" />
<Delete Files="@(ToDelete)" />
<!-- Rename deps file -->
- <Move SourceFiles="$(SharedFrameworkNameAndVersionRoot)\framework.deps.json"
+ <Move SourceFiles="$(SharedFrameworkNameAndVersionRoot)\framework.deps.json"
DestinationFiles="$(SharedFrameworkNameAndVersionRoot)\$(SharedFrameworkName).deps.json" />
-
+
<!-- Use the muxer we intended to consume (either restored a shipped version or the one we built) -->
<!-- Ensure the host is executable. See https://github.com/NuGet/Home/issues/4424 -->
<Exec Command="chmod u+x $(CoreHostLockedDir)dotnet$(ExeSuffix)"
<ItemGroup>
<SharedFrameworkSymbols Include="$(PackageSymbolsBinDir)Microsoft.NETCore.App/**/*.pdb" />
<SharedFrameworkSymbols Include="$(PackageSymbolsBinDir)Microsoft.NETCore.App/**/*$(SymbolFileExtension)" />
- <SharedFrameworkSymbols Include="$(PackageSymbolsBinDir)Microsoft.NETCore.App/**/*$(CrossGenSymbolExtension)"
+ <SharedFrameworkSymbols Include="$(PackageSymbolsBinDir)Microsoft.NETCore.App/**/*$(CrossGenSymbolExtension)"
Condition="'$(CrossGenSymbolExtension)' != ''" />
</ItemGroup>
<RemoveDir Directories="$(SharedFrameworkPublishSymbolsDir)"
<RuntimeGraphGeneratorRuntime Condition="'$(OSGroup)'=='Windows_NT'">win</RuntimeGraphGeneratorRuntime>
<RuntimeGraphGeneratorRuntime Condition="'$(OSGroup)'=='OSX'">osx</RuntimeGraphGeneratorRuntime>
<RuntimeGraphGeneratorRuntime Condition="$(OutputRID.StartsWith('alpine'))">alpine</RuntimeGraphGeneratorRuntime>
- <RuntimeGraphGeneratorRuntime Condition="'$(RuntimeGraphGeneratorRuntime)'==''">linux</RuntimeGraphGeneratorRuntime>
+ <RuntimeGraphGeneratorRuntime Condition="'$(RuntimeGraphGeneratorRuntime)'==''">linux</RuntimeGraphGeneratorRuntime>
</PropertyGroup>
<ItemGroup>
<TrimPkgsFromDeps Include="microsoft.netcore.dotnetapphost" />
<TrimPkgsFromDeps Include="microsoft.netcore.dotnethostresolver" />
</ItemGroup>
-
+
<ProcessSharedFrameworkDeps AssetsFilePath="$(SharedFrameworkAssetsFile)"
DepsFilePath="$(SharedFrameworkDepsFile)"
PackagesToRemove="@(TrimPkgsFromDeps)"
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(MNAVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(MNAVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<OutputType>Library</OutputType>
<RuntimeFrameworkVersion>$(MNAVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(MNAVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.4;portable-net451+win8</PackageTargetFallback>
<RuntimeFrameworkVersion>$(MNAVersion)</RuntimeFrameworkVersion>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(MNAVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeFrameworkVersion>$(MNAVersion)</RuntimeFrameworkVersion>
</PropertyGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<RuntimeIdentifier>$(TestTargetRid)</RuntimeIdentifier>
<RuntimeFrameworkVersion>$(MNAVersion)</RuntimeFrameworkVersion>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
+ <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.4;portable-net451+win8</PackageTargetFallback>
string dotnetInstallPath = null,
string currentRid = null,
string builtDotnetOutputPath = null,
- string framework = "netcoreapp2.1")
+ string framework = null)
{
ValidateRequiredDirectories(repoDirectoriesProvider);
_testProjectName = testProjectName;
+ _framework = framework ?? Environment.GetEnvironmentVariable("MNA_TFM");
_exeExtension = exeExtension ?? RuntimeInformationExtensions.GetExeExtensionForCurrentOSPlatform();
_sharedLibraryExtension = sharedLibraryExtension
_currentRid = currentRid ?? repoDirectoriesProvider.TargetRID;
_builtDotnet = new DotNetCli(repoDirectoriesProvider.BuiltDotnet);
- _framework = framework;
InitializeTestProject(
_testProjectName,
_testProjectSourceDirectory,
}
storeArgs.Add($"/p:MNAVersion={_repoDirectoriesProvider.MicrosoftNETCoreAppVersion}");
+ storeArgs.Add($"/p:NETCoreAppFramework={_framework}");
// Ensure the project's OutputType isn't 'Exe', since that causes issues with 'dotnet store'
storeArgs.Add("/p:OutputType=Library");
restoreArgs.Add("--disable-parallel");
restoreArgs.Add($"/p:MNAVersion={_repoDirectoriesProvider.MicrosoftNETCoreAppVersion}");
+ restoreArgs.Add($"/p:NETCoreAppFramework={_framework}");
if (extraMSBuildProperties != null)
{
</PropertyGroup>
<Exec Command="$(DotnetToolCommand) test $(TestArgs) --logger "trx;LogFileName=$(TestResultsXml)""
WorkingDirectory="$(TestWorkingDirectory)"
- EnvironmentVariables="NUGET_PACKAGES=$(PackagesDir);TEST_ARTIFACTS=$(SystemPathTestsOutputDir);TEST_TARGETRID=$(TestTargetRid);BUILDRID=$(OutputRid);BUILD_ARCHITECTURE=$(TargetArchitecture);BUILD_CONFIGURATION=$(ConfigurationGroup);MNA_VERSION=$(ProductVersion);DOTNET_SDK_PATH=$(DotnetCliPath)"
+ EnvironmentVariables="NUGET_PACKAGES=$(PackagesDir);TEST_ARTIFACTS=$(SystemPathTestsOutputDir);TEST_TARGETRID=$(TestTargetRid);BUILDRID=$(OutputRid);BUILD_ARCHITECTURE=$(TargetArchitecture);BUILD_CONFIGURATION=$(ConfigurationGroup);MNA_VERSION=$(ProductVersion);MNA_TFM=$(NETCoreAppFramework);DOTNET_SDK_PATH=$(DotnetCliPath)"
Condition="'$(TestProjectFilename)' != 'HostActivationTests' or '$(IsCrossArch)' != 'true'"
ContinueOnError="true"
IgnoreStandardErrorWarningFormat="true"