Fixed NuGet references

pull/363/head
David Hall 2022-12-21 20:31:52 -07:00
parent a3cf995800
commit b2e972c77e
4 changed files with 25 additions and 8 deletions

View File

@ -18,9 +18,10 @@ DynamicMgmtObject, ManagementExtensions
<PackageReference Include="System.ValueTuple" Version="4.5.0" /> <PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' != 'net45' "> <ItemGroup Condition=" '$(TargetFramework)' != 'net45' ">
<PackageReference Include="System.Management" Version="7.0.0" /> <PackageReference Include="System.Management" Version="6.0.0" Condition=" '$(TargetFramework)' == 'netcoreapp3.1' " />
<PackageReference Include="System.Management" Version="7.0.0" Condition=" '$(TargetFramework)' != 'netcoreapp3.1' " />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System.Management" /> <Reference Include="System.Management" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -25,7 +25,8 @@ AccountLogonRights, DesiredAccess, SystemPrivilege
</When> </When>
<Otherwise> <Otherwise>
<ItemGroup> <ItemGroup>
<PackageReference Include="System.DirectoryServices" Version="7.0.0" /> <PackageReference Include="System.DirectoryServices" Version="6.0.0" Condition=" '$(TargetFramework)' == 'netcoreapp3.1' " />
<PackageReference Include="System.DirectoryServices" Version="7.0.0" Condition=" '$(TargetFramework)' != 'netcoreapp3.1' " />
</ItemGroup> </ItemGroup>
</Otherwise> </Otherwise>
</Choose> </Choose>

View File

@ -2,9 +2,19 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>UnitTest.PInvoke.NTDSApi</AssemblyName> <AssemblyName>UnitTest.PInvoke.NTDSApi</AssemblyName>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <Choose>
<Reference Include="System.DirectoryServices" /> <When Condition=" $(TargetFramework.StartsWith('net4')) ">
</ItemGroup> <ItemGroup>
<Reference Include="System.DirectoryServices" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<PackageReference Include="System.DirectoryServices" Version="6.0.0" Condition=" '$(TargetFramework)' == 'netcoreapp3.1' " />
<PackageReference Include="System.DirectoryServices" Version="7.0.0" Condition=" '$(TargetFramework)' != 'netcoreapp3.1' " />
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\PInvoke\NetApi32\Vanara.PInvoke.NetApi32.csproj" /> <ProjectReference Include="..\..\..\PInvoke\NetApi32\Vanara.PInvoke.NetApi32.csproj" />
<ProjectReference Include="..\..\..\PInvoke\NTDSApi\Vanara.PInvoke.NTDSApi.csproj" /> <ProjectReference Include="..\..\..\PInvoke\NTDSApi\Vanara.PInvoke.NTDSApi.csproj" />

View File

@ -19,8 +19,13 @@ CompactionMode, DeviceType, Subtype
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('netcore')) Or $(TargetFramework.StartsWith('net5')) " /> <PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('netcore')) Or $(TargetFramework.StartsWith('net5')) " />
<PackageReference Include="System.Management" Version="5.0.0" Condition=" '$(TargetFramework)' == 'net45' " /> </ItemGroup>
<PackageReference Include="System.Management" Version="7.0.0" Condition=" '$(TargetFramework)' != 'net45' " /> <ItemGroup Condition=" '$(TargetFramework)' != 'net45' ">
<PackageReference Include="System.Management" Version="6.0.0" Condition=" '$(TargetFramework)' == 'netcoreapp3.1' " />
<PackageReference Include="System.Management" Version="7.0.0" Condition=" '$(TargetFramework)' != 'netcoreapp3.1' " />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System.Management" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Management\Vanara.Management.csproj" /> <ProjectReference Include="..\Management\Vanara.Management.csproj" />