Add flag to exclude MSBuild runtime libraries (#327)
This commit is contained in:
Родитель
ae478dc1d5
Коммит
9ab5255e05
|
@ -13,7 +13,13 @@
|
|||
<Compile Include="$(MSBuildThisFileDirectory)/shared/**/*.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)'!='netstandard2.0'">
|
||||
<PropertyGroup>
|
||||
<ExcludeMSBuildRuntime Condition=" '$(ExcludeMSBuildRuntime)' =='' ">false</ExcludeMSBuildRuntime>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- This forces the MSBuild runtime assets to be excluded from build. We have this opt-in because
|
||||
otherwise it will add these as dependencies to all projects. -->
|
||||
<ItemGroup Condition="$(ExcludeMSBuildRuntime)">
|
||||
<!-- Exclude MSBuild runtime assets from both src and test projects
|
||||
as they shouldn't be present in this solution's output paths.
|
||||
Instead, these dependencies should be loaded from the selected
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<PackageId>upgrade-assistant</PackageId>
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
<InstallTools>true</InstallTools>
|
||||
<ExcludeMSBuildRuntime>true</ExcludeMSBuildRuntime>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="appsettings.json">
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Build" ExcludeAssets="runtime" />
|
||||
<PackageReference Include="NuGet.ProjectModel" ExcludeAssets="runtime" />
|
||||
<PackageReference Include="NuGet.Frameworks" ExcludeAssets="runtime" />
|
||||
<PackageReference Include="Microsoft.Build.Locator" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options" />
|
||||
|
@ -13,7 +14,6 @@
|
|||
<!-- This package is mostly COM definitions which can be loaded in .NET 5 runtime just fine -->
|
||||
<NoWarn>NU1701</NoWarn>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NuGet.Frameworks" ExcludeAssets="runtime" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\common\Microsoft.DotNet.UpgradeAssistant.Abstractions\Microsoft.DotNet.UpgradeAssistant.Abstractions.csproj" />
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<ExcludeMSBuildRuntime>true</ExcludeMSBuildRuntime>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="assets\**" />
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<IsPackable>false</IsPackable>
|
||||
<IsUnitTestProject>true</IsUnitTestProject>
|
||||
<InstallTools>true</InstallTools>
|
||||
<ExcludeMSBuildRuntime>true</ExcludeMSBuildRuntime>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="IntegrationScenarios\**" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче