1fd99f1588
* Updating the preview4 channel to rel-1.0.0-preview4 * Add more xlf files for new strings * bundle fsharp sdk, only Sdk directory is required * align f# console proj * align f# lib template * align f# mstest template * align f# xunit template * align f# web template * fix mstest package version, aligned to c# * remove unused directories from bundled sdks * Adding a SdkNugetVersion property when invoking dotnet pack on test packages so that test packages can reference exact packages. We need that because of https://github.com/NuGet/Home/issues/4063. Without it, pack creates the nuspec with a version like 1.0.0-version-, instead of 1.0.0-version-<version_used_in_build>, which leads to problems when restoring the tool. Like, it ends up restoring to the closest version of the package (oldest), instead of the latest. * Update web template for Web SDK 154 (#4948) * Update WebSDK version * Update web template to get rid of globs https://github.com/aspnet/Templates/pull/735 * MSBuild to 15.1.458 (#4950) * Adding MigrateWebSdkRule to the DefaultMigrationRuleSet (#4963) * Adding MigrateWebSdkRule to the DefaultMigrationRuleSet and adding a E2E test to cover it. * Do not migrate compile and EmbeddedResources for web application, because those are included in the Web Sdk already. * Addressing code review comments
48 lines
2.3 KiB
XML
48 lines
2.3 KiB
XML
<Project ToolsVersion="15.0" DefaultTargets="CopySdkToOutput">
|
|
<!-- workaround for https://github.com/Microsoft/msbuild/issues/885 -->
|
|
<!-- renaming the property because the original property is a global property and therefore
|
|
cannot be redefined at runtime. -->
|
|
<PropertyGroup>
|
|
<CLIBuildDllPath>$([MSBuild]::Unescape($(CLIBuildDll)))</CLIBuildDllPath>
|
|
</PropertyGroup>
|
|
|
|
<UsingTask TaskName="DotNetRestore" AssemblyFile="$(CLIBuildDllPath)" />
|
|
|
|
<Target Name="CopySdkToOutput"
|
|
DependsOnTargets="PrepareBundledSdksProps;
|
|
EnsureSdkRestored;
|
|
GetSdkItemsToCopy"
|
|
Inputs="@(SdkContent)"
|
|
Outputs="@(SdkContent->'$(SdkLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')">
|
|
<Copy SourceFiles="@(SdkContent)"
|
|
DestinationFiles="@(SdkContent->'$(SdkLayoutDirectory)/%(RecursiveDir)%(FileName)%(Extension)')" />
|
|
|
|
<!-- Remove unused directories for FSharp.NET.Sdk, just Sdk directory is needed -->
|
|
<RemoveDir Condition=" '$([System.IO.Path]::GetFileName($(SdkLayoutDirectory)))' == 'FSharp.NET.Sdk' " Directories="$(SdkLayoutDirectory)/build;$(SdkLayoutDirectory)/buildCrossTargeting" />
|
|
|
|
<Message Text="Copied Sdk $(SdkPackageName) from $(SdkNuPkgPath) to $(SdkLayoutDirectory)."
|
|
Importance="High" />
|
|
</Target>
|
|
|
|
<Target Name="GetSdkItemsToCopy">
|
|
<ItemGroup>
|
|
<SdkContent Include="$(SdkNuPkgPath)/**/*"
|
|
Exclude="$(SdkNuPkgPath)/$(SdkPackageName).nuspec;
|
|
$(SdkNuPkgPath)/$(SdkPackageName).$(SdkPackageVersion).nupkg;
|
|
$(SdkNuPkgPath)/$(SdkPackageName).$(SdkPackageVersion).nupkg.sha512" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target Name="EnsureSdkRestored"
|
|
Condition="!Exists('$(SdkNuPkgPath)/$(SdkPackageName.ToLower()).nuspec')">
|
|
<DotNetRestore ToolPath="$(Stage0Directory)"
|
|
ProjectPath="$(MSBuildThisFileDirectory)/sdks/sdks.csproj"
|
|
AdditionalParameters="/p:SdkPackageName=$(SdkPackageName) /p:SdkPackageVersion=$(SdkPackageVersion)" />
|
|
</Target>
|
|
|
|
<Target Name="PrepareBundledSdksProps">
|
|
<PropertyGroup>
|
|
<SdkNuPkgPath>$(NuGetPackagesDir)/$(SdkPackageName.ToLower())/$(SdkPackageVersion.ToLower())</SdkNuPkgPath>
|
|
</PropertyGroup>
|
|
</Target>
|
|
</Project>
|