Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions eng/slngen.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
<SlnGenSolutionFolder Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true'">tests</SlnGenSolutionFolder>
<SlnGenSolutionFolder Condition="'$(SlnGenSolutionFolder)' == ''">src</SlnGenSolutionFolder>

<!-- Don't include shared framework projects referenced via a named reference except the leaf's project. -->
<IncludeInSolutionFile Condition="'$(IsNETCoreAppRef)' == 'true' and '$(MSBuildProjectName)' != '$(SlnGenMainProject)'">false</IncludeInSolutionFile>

<!-- Include CompilerServices.Unsafe as it's a transitive test dependency. -->
<IncludeInSolutionFile Condition="'$(IsNETCoreAppRef)' == 'true' and '$(MSBuildProjectName)' == 'System.Runtime.CompilerServices.Unsafe'">true</IncludeInSolutionFile>
<!-- Don't include shared framework projects except the leaf's project and OOBs. -->
<IncludeInSolutionFile Condition="'$(IsNETCoreAppRef)' == 'true' and '$(MSBuildProjectName)' != '$(SlnGenMainProject)' and '$(IsNETCoreAppPackage)' != 'true'">false</IncludeInSolutionFile>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After doing this I realize that another condition that might work is '$(TargetFrameworks)' != '$(NetCoreAppCurrent)' since this will also catch references that didn't build in the up-front build pass. Let me know what makes more sense to use.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I would prefer that over the static list (which we likely need anyway for another change but probably not here) as the existence of another TargetFramework than $(NetCoreAppCurrent)* should indicate that the reference project should be present in the solution file.

</PropertyGroup>
<ItemGroup>
<SlnGenCustomProjectTypeGuid Include=".ilproj" ProjectTypeGuid="{9A19103F-16F7-4668-BE54-9A1E7A4F7556}" />
Expand Down
9 changes: 9 additions & 0 deletions src/libraries/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<IsNETCoreAppRef Condition="'$(IsNETCoreAppRef)' == '' and
'$(IsReferenceAssembly)' == 'true' and
$(NetCoreAppLibrary.Contains('$(AssemblyName);'))">true</IsNETCoreAppRef>
<IsNETCoreAppPackage Condition="$(NetCoreAppLibraryPackage.Contains('$(AssemblyName);'))">true</IsNETCoreAppPackage>

<!-- By default, disable implicit framework references for NetCoreAppCurrent libraries. -->
<DisableImplicitFrameworkReferences Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and
Expand Down Expand Up @@ -339,5 +340,13 @@
Text="Analyzers must only target netstandard2.0 since they run in the compiler which targets netstandard2.0. The following files were found to target '%(_AnalyzerPackFile.TargetFramework)': @(_AnalyzerPackFile)" />
</Target>

<Target Name="EnsureNetCoreAppLibraryPackage" BeforeTargets="Pack">
<Error Condition="'$(IsNETCoreAppPackage)' != 'true' and '$(IsNETCoreAppSrc)' == 'true' and '$(IsPackable)' == 'true'"
Text="Please add $(AssemblyName) to the NetCoreAppLibraryPackage property." />

<Error Condition="'$(IsNETCoreAppPackage)' == 'true' and '$(IsSourceProject)' == 'true' and ('$(IsNETCoreAppSrc)' != 'true' or '$(IsPackable)' != 'true')"
Text="Please remove $(AssemblyName) from the NetCoreAppLibraryPackage property." />
</Target>

<Import Project="$(MSBuildThisFileDirectory)workloads-testing.targets" />
</Project>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.CompilerServ
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.CompilerServices.Unsafe", "..\System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj", "{4A28B457-D950-486B-B59B-A4C977A733B1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\ref\System.Text.Encodings.Web.csproj", "{97AB4A8D-C0D0-4F19-9B43-CD7E3CBCD6E4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Encodings.Web", "..\System.Text.Encodings.Web\src\System.Text.Encodings.Web.csproj", "{7902A0CA-E94D-4C96-A112-455A1E5E2390}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json.SourceGeneration", "..\System.Text.Json\gen\System.Text.Json.SourceGeneration.csproj", "{6699E51A-8DC5-4DBA-A06B-B4A04144E4FA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\ref\System.Text.Json.csproj", "{E9581D82-320F-4446-8B0B-FF64A85F1777}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Text.Json", "..\System.Text.Json\src\System.Text.Json.csproj", "{FA7201FE-097D-4197-BDEC-329986814D8D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{50BA55F5-BD05-4C05-910F-2BFD20BD3465}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{61EC962F-E956-4EB3-A3F9-266E3FDD6217}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{155C3F40-F63D-49DF-87D3-A3EEA27036E8}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{CA39EF46-3F88-4E94-97ED-EC9694BF0E61}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5725D7DF-DC33-47D2-90C9-D8736C579E77}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7436279E-7BAF-4BCD-ADEF-FE438CFD4A05}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -67,6 +71,14 @@ Global
{4A28B457-D950-486B-B59B-A4C977A733B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A28B457-D950-486B-B59B-A4C977A733B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A28B457-D950-486B-B59B-A4C977A733B1}.Release|Any CPU.Build.0 = Release|Any CPU
{E9581D82-320F-4446-8B0B-FF64A85F1777}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E9581D82-320F-4446-8B0B-FF64A85F1777}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9581D82-320F-4446-8B0B-FF64A85F1777}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9581D82-320F-4446-8B0B-FF64A85F1777}.Release|Any CPU.Build.0 = Release|Any CPU
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6}.Release|Any CPU.Build.0 = Release|Any CPU
{6699E51A-8DC5-4DBA-A06B-B4A04144E4FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6699E51A-8DC5-4DBA-A06B-B4A04144E4FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6699E51A-8DC5-4DBA-A06B-B4A04144E4FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -75,10 +87,10 @@ Global
{F38E2965-8DBB-4795-89AF-C0109EB23574}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F38E2965-8DBB-4795-89AF-C0109EB23574}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F38E2965-8DBB-4795-89AF-C0109EB23574}.Release|Any CPU.Build.0 = Release|Any CPU
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6}.Release|Any CPU.Build.0 = Release|Any CPU
{97AB4A8D-C0D0-4F19-9B43-CD7E3CBCD6E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{97AB4A8D-C0D0-4F19-9B43-CD7E3CBCD6E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{97AB4A8D-C0D0-4F19-9B43-CD7E3CBCD6E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{97AB4A8D-C0D0-4F19-9B43-CD7E3CBCD6E4}.Release|Any CPU.Build.0 = Release|Any CPU
{696D69C9-C5F6-405E-A8B5-5375D08BBADC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{696D69C9-C5F6-405E-A8B5-5375D08BBADC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{696D69C9-C5F6-405E-A8B5-5375D08BBADC}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -88,18 +100,20 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6D9C22DB-C4E3-483E-AF78-C1DCE6ED8DD6} = {50BA55F5-BD05-4C05-910F-2BFD20BD3465}
{F38E2965-8DBB-4795-89AF-C0109EB23574} = {50BA55F5-BD05-4C05-910F-2BFD20BD3465}
{696D69C9-C5F6-405E-A8B5-5375D08BBADC} = {50BA55F5-BD05-4C05-910F-2BFD20BD3465}
{F5E89C81-2D78-4F86-ABD2-7D983F46EB58} = {155C3F40-F63D-49DF-87D3-A3EEA27036E8}
{5351C410-530D-4724-A8E6-430831E7332B} = {155C3F40-F63D-49DF-87D3-A3EEA27036E8}
{E5B6A94F-615E-4DAF-8110-E5A776BB8296} = {155C3F40-F63D-49DF-87D3-A3EEA27036E8}
{5C580568-6072-4F27-B5C6-FA04556E3B98} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
{FA7201FE-097D-4197-BDEC-329986814D8D} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
{7902A0CA-E94D-4C96-A112-455A1E5E2390} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
{4A28B457-D950-486B-B59B-A4C977A733B1} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
{6699E51A-8DC5-4DBA-A06B-B4A04144E4FA} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6} = {5725D7DF-DC33-47D2-90C9-D8736C579E77}
{6D9C22DB-C4E3-483E-AF78-C1DCE6ED8DD6} = {61EC962F-E956-4EB3-A3F9-266E3FDD6217}
{E9581D82-320F-4446-8B0B-FF64A85F1777} = {61EC962F-E956-4EB3-A3F9-266E3FDD6217}
{F38E2965-8DBB-4795-89AF-C0109EB23574} = {61EC962F-E956-4EB3-A3F9-266E3FDD6217}
{97AB4A8D-C0D0-4F19-9B43-CD7E3CBCD6E4} = {61EC962F-E956-4EB3-A3F9-266E3FDD6217}
{696D69C9-C5F6-405E-A8B5-5375D08BBADC} = {61EC962F-E956-4EB3-A3F9-266E3FDD6217}
{F5E89C81-2D78-4F86-ABD2-7D983F46EB58} = {CA39EF46-3F88-4E94-97ED-EC9694BF0E61}
{5351C410-530D-4724-A8E6-430831E7332B} = {CA39EF46-3F88-4E94-97ED-EC9694BF0E61}
{E5B6A94F-615E-4DAF-8110-E5A776BB8296} = {CA39EF46-3F88-4E94-97ED-EC9694BF0E61}
{5C580568-6072-4F27-B5C6-FA04556E3B98} = {7436279E-7BAF-4BCD-ADEF-FE438CFD4A05}
{FA7201FE-097D-4197-BDEC-329986814D8D} = {7436279E-7BAF-4BCD-ADEF-FE438CFD4A05}
{7902A0CA-E94D-4C96-A112-455A1E5E2390} = {7436279E-7BAF-4BCD-ADEF-FE438CFD4A05}
{4A28B457-D950-486B-B59B-A4C977A733B1} = {7436279E-7BAF-4BCD-ADEF-FE438CFD4A05}
{2AED2951-7724-4EFC-8E16-6DF877C6B4A6} = {7436279E-7BAF-4BCD-ADEF-FE438CFD4A05}
{6699E51A-8DC5-4DBA-A06B-B4A04144E4FA} = {7436279E-7BAF-4BCD-ADEF-FE438CFD4A05}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {810D114A-26F4-4151-9EFE-29A7F1BF62AA}
Expand Down
Loading