Skip to content

Commit 5905885

Browse files
authored
Add CentralPackageVersions sample (#95)
1 parent 763b6e1 commit 5905885

File tree

6 files changed

+50
-1
lines changed

6 files changed

+50
-1
lines changed

MSBuildSdks.sln

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleNoTargets", "samples\
4444
EndProject
4545
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Build.Artifacts", "src\Artifacts\Microsoft.Build.Artifacts.csproj", "{6E84BA77-308F-4780-852F-B27F8BFD2797}"
4646
EndProject
47-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Artifacts.UnitTests", "src\Artifacts.UnitTests\Microsoft.Build.Artifacts.UnitTests.csproj", "{359B2C2B-B9B8-496F-B4B1-9E4359729F89}"
47+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Build.Artifacts.UnitTests", "src\Artifacts.UnitTests\Microsoft.Build.Artifacts.UnitTests.csproj", "{359B2C2B-B9B8-496F-B4B1-9E4359729F89}"
48+
EndProject
49+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CentralPackageVersions", "CentralPackageVersions", "{FCF015C3-82E5-488D-8438-1410F6572F0B}"
50+
ProjectSection(SolutionItems) = preProject
51+
samples\CentralPackageVersions\Directory.Build.props = samples\CentralPackageVersions\Directory.Build.props
52+
samples\CentralPackageVersions\Directory.Build.targets = samples\CentralPackageVersions\Directory.Build.targets
53+
samples\CentralPackageVersions\Packages.props = samples\CentralPackageVersions\Packages.props
54+
EndProjectSection
55+
EndProject
56+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary", "samples\CentralPackageVersions\src\ClassLibrary\ClassLibrary.csproj", "{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}"
4857
EndProject
4958
Global
5059
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -92,13 +101,19 @@ Global
92101
{359B2C2B-B9B8-496F-B4B1-9E4359729F89}.Debug|Any CPU.Build.0 = Debug|Any CPU
93102
{359B2C2B-B9B8-496F-B4B1-9E4359729F89}.Release|Any CPU.ActiveCfg = Release|Any CPU
94103
{359B2C2B-B9B8-496F-B4B1-9E4359729F89}.Release|Any CPU.Build.0 = Release|Any CPU
104+
{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
105+
{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}.Debug|Any CPU.Build.0 = Debug|Any CPU
106+
{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}.Release|Any CPU.ActiveCfg = Release|Any CPU
107+
{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C}.Release|Any CPU.Build.0 = Release|Any CPU
95108
EndGlobalSection
96109
GlobalSection(SolutionProperties) = preSolution
97110
HideSolutionNode = FALSE
98111
EndGlobalSection
99112
GlobalSection(NestedProjects) = preSolution
100113
{516F0D1D-C4FE-4832-9E49-903A2C57D3F3} = {867D30F7-2AEC-48E7-B167-4919EE1B0985}
101114
{48F56A6B-A285-4B40-9E96-044F7AA2C532} = {516F0D1D-C4FE-4832-9E49-903A2C57D3F3}
115+
{FCF015C3-82E5-488D-8438-1410F6572F0B} = {867D30F7-2AEC-48E7-B167-4919EE1B0985}
116+
{A266FDFA-BE7C-4E3E-9BEA-EF18EF66540C} = {FCF015C3-82E5-488D-8438-1410F6572F0B}
102117
EndGlobalSection
103118
GlobalSection(ExtensibilityGlobals) = postSolution
104119
SolutionGuid = {6AB3C4FB-938A-42B8-8E9E-A53178C94301}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Project>
2+
3+
</Project>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Project>
2+
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.0.26" />
3+
</Project>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<ItemGroup>
3+
<PackageReference Update="Newtonsoft.Json" Version="12.0.2" />
4+
</ItemGroup>
5+
6+
<ItemGroup>
7+
<GlobalPackageReference Include="SlnGen" Version="2.2.6" Condition="'$(EnableSlnGen)' != 'false'" />
8+
</ItemGroup>
9+
</Project>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Newtonsoft.Json;
2+
3+
namespace ClassLibrary
4+
{
5+
public class Class1
6+
{
7+
[JsonIgnore]
8+
public string Name { get; set; }
9+
}
10+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>netstandard2.0</TargetFramework>
4+
</PropertyGroup>
5+
6+
<ItemGroup>
7+
<PackageReference Include="Newtonsoft.Json" />
8+
</ItemGroup>
9+
</Project>

0 commit comments

Comments
 (0)