|
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<TargetFramework>$(SdkTargetFramework)</TargetFramework>
<AssemblyName>dotnet</AssemblyName>
<OutputType>Exe</OutputType>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$([MSBuild]::IsOSPlatform(`Windows`))' == 'false' ">true</PublicSign>
<AssetTargetFallback>dotnet5.4</AssetTargetFallback>
<RootNamespace>Microsoft.DotNet.Cli</RootNamespace>
<DefineConstants Condition="'$(IncludeAspNetCoreRuntime)' == 'false'">$(DefineConstants);EXCLUDE_ASPNETCORE</DefineConstants>
<DefineConstants>$(DefineConstants);DotnetCsproj</DefineConstants>
<PackageId>Microsoft.DotNet.Cli</PackageId>
<UseAppHost>false</UseAppHost>
<IsPackable>true</IsPackable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- Strong naming deprecated on .NET Core -->
<NoWarn>$(NoWarn);CS8002</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\Resolvers\Microsoft.DotNet.MSBuildSdkResolver\FXVersion.cs" LinkBase="Commands/New" />
<Compile Include="$(RepoRoot)src\Common\CompileOptions.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\EnvironmentVariableNames.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\MSBuildPropertyNames.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\MSBuildUtilities.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadFileBasedInstall.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadSetVersion.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\NuGetUtils.NuGet.cs" LinkBase="Common" />
<Compile Remove="Commands\Workload\list\VisualStudioWorkloads.cs" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
<Compile Remove="$(RepoRoot)\src\Cli\dotnet\Installer\Windows\Security\*.cs" Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="CliStrings.resx" LinkBase="Resources" GenerateSource="true" Namespace="Microsoft.DotNet.Cli" />
<EmbeddedResource Update="Commands\CliCommandStrings.resx" LinkBase="Resources" GenerateSource="true" Namespace="Microsoft.DotNet.Cli.Commands" />
<EmbeddedResource Include="$(RepoRoot)src\Tasks\Common\Resources\Strings.resx" LinkBase="Resources" GenerateSource="True" Namespace="Microsoft.NET.Build.Tasks" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../Microsoft.DotNet.Configurer/Microsoft.DotNet.Configurer.csproj" GlobalPropertiesToRemove="PublishDir" />
<ProjectReference Include="../Microsoft.DotNet.InternalAbstractions/Microsoft.DotNet.InternalAbstractions.csproj" GlobalPropertiesToRemove="PublishDir" />
<ProjectReference Include="../Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj" GlobalPropertiesToRemove="PublishDir" />
<!-- override the Microsoft.TemplateEngine.Cli's dependency with the latest Microsoft.DotNet.TemplateLocator -->
<ProjectReference Include="../../Microsoft.DotNet.TemplateLocator\Microsoft.DotNet.TemplateLocator.csproj" GlobalPropertiesToRemove="PublishDir" />
<ProjectReference Include="../../Resolvers\Microsoft.DotNet.NativeWrapper\Microsoft.DotNet.NativeWrapper.csproj" GlobalPropertiesToRemove="PublishDir" />
<ProjectReference Include="../../Microsoft.Win32.Msi/Microsoft.Win32.Msi.csproj" GlobalPropertiesToRemove="PublishDir" />
<ProjectReference Include="..\Microsoft.TemplateEngine.Cli\Microsoft.TemplateEngine.Cli.csproj" GlobalPropertiesToRemove="PublishDir" />
<ProjectReference Include="..\..\System.CommandLine.StaticCompletions\System.CommandLine.StaticCompletions.csproj" GlobalPropertiesToRemove="PublishDir" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
<PackageReference Include="Microsoft.VisualStudio.SolutionPersistence" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NuGet.CommandLine.XPlat" />
<PackageReference Include="Microsoft.ApplicationInsights" />
<PackageReference Include="Microsoft.Build" />
<PackageReference Include="Microsoft.NET.HostModel" />
<PackageReference Include="Microsoft.TemplateEngine.Orchestrator.RunnableProjects" />
<PackageReference Include="System.CommandLine" />
<PackageReference Include="Microsoft.Deployment.DotNet.Releases" />
<PackageReference Include="System.ServiceProcess.ServiceController" />
<PackageReference Include="Microsoft.VisualStudio.Setup.Configuration.Interop" PrivateAssets="All" ExcludeAssets="Runtime" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<PackageReference Include="Microsoft.Windows.CsWin32" IncludeAssets="all" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<!-- Lift dependency of NETStandard.Library.NETFramework to version produced in SBRP. -->
<PackageReference Include="NETStandard.Library" VersionOverride="$(NETStandardLibraryVersion)" ExcludeAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis.BuildClient" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
</ItemGroup>
<ItemGroup Condition=" '$(IncludeAspNetCoreRuntime)' != 'false' ">
<PackageReference Include="Microsoft.AspNetCore.DeveloperCertificates.XPlat" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="SDDLTests" />
<InternalsVisibleTo Include="dotnet-watch" />
<InternalsVisibleTo Include="dotnet-watch.Tests" />
</ItemGroup>
<Target Name="LinkVSEmbeddableAssemblies" DependsOnTargets="ResolveReferences" AfterTargets="ResolveReferences">
<ItemGroup>
<ReferencePath Condition="'%(ReferencePath.FileName)' == 'Microsoft.VisualStudio.Setup.Configuration.Interop'">
<EmbedInteropTypes>true</EmbedInteropTypes>
</ReferencePath>
</ItemGroup>
</Target>
<!-- Global usings -->
<!-- See: https://learn.microsoft.com/dotnet/core/project-sdk/msbuild-props#using -->
<ItemGroup>
<!-- Aliases -->
<!-- Note: '%3C' is for '<' and '%3E' is for '>' -->
<Using Include="System.Collections.Generic.Dictionary%3CMicrosoft.NET.Sdk.WorkloadManifestReader.WorkloadId, Microsoft.NET.Sdk.WorkloadManifestReader.WorkloadDefinition%3E" Alias="WorkloadCollection" />
</ItemGroup>
<!-- NOTE: only works for fast-path code changes -->
<Target Name="CopyToRedistFastPath" AfterTargets="AfterBuild">
<PropertyGroup>
<DestinationPath>$([System.IO.Path]::Combine($(TestHostDotNetRoot), "sdk", $(Version)))</DestinationPath>
</PropertyGroup>
<Copy SourceFiles="$(TargetPath)"
DestinationFolder="$(DestinationPath)"
SkipUnchangedFiles="true"
OverwriteReadOnlyFiles="true" />
</Target>
</Project>
|