Skip to content

Commit d486b92

Browse files
authored
Merge pull request #8 from Chavoshi/master
Fix .Net Core & .Net Standard Dependencies
2 parents 8d1c6d9 + e40b2b4 commit d486b92

File tree

2 files changed

+16
-41
lines changed

2 files changed

+16
-41
lines changed

src/Unity.Configuration.csproj

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -53,38 +53,17 @@
5353
<UnityAbstractions>..\..\Abstractions\src\Unity.Abstractions.csproj</UnityAbstractions>
5454
</PropertyGroup>
5555

56-
<ItemGroup Condition="Exists('$(UnityAbstractions)')">
57-
<ProjectReference Include="$(UnityAbstractions)" />
56+
<ItemGroup>
57+
<ProjectReference Include="$(UnityAbstractions)" Condition="Exists('$(UnityAbstractions)')" />
58+
<PackageReference Include="Unity.Abstractions" Version="$(UnityAbstractionsVersion)" Condition="!Exists('$(UnityAbstractions)')" />
5859
</ItemGroup>
5960

60-
<ItemGroup Condition="!Exists('$(UnityAbstractions)')">
61-
<PackageReference Include="Unity.Abstractions" Version="$(UnityAbstractionsVersion)" />
61+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp2.0'">
62+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.*" />
6263
</ItemGroup>
6364

64-
<ItemGroup Condition="'$(TargetFramework)' == 'net45'">
65+
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0' AND '$(TargetFramework)' != 'netcoreapp2.0'">
6566
<Reference Include="System.Configuration" />
6667
</ItemGroup>
6768

68-
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
69-
<Reference Include="System.Configuration" />
70-
</ItemGroup>
71-
72-
<ItemGroup Condition="'$(TargetFramework)' == 'net47'">
73-
<PackageReference Include="System.Configuration.ConfigurationManager">
74-
<Version>4.4.1</Version>
75-
</PackageReference>
76-
</ItemGroup>
77-
78-
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
79-
<PackageReference Include="System.Configuration.ConfigurationManager">
80-
<Version>4.4.1</Version>
81-
</PackageReference>
82-
</ItemGroup>
83-
84-
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
85-
<PackageReference Include="System.Configuration.ConfigurationManager">
86-
<Version>4.4.1</Version>
87-
</PackageReference>
88-
</ItemGroup>
89-
9069
</Project>

tests/Configuration.Tests.csproj

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,27 @@
2222
<EmbeddedResource Include="ConfigFiles\*.config" />
2323
</ItemGroup>
2424

25-
<ItemGroup>
26-
<ProjectReference Include="..\src\Unity.Configuration.csproj" />
27-
</ItemGroup>
28-
29-
3025
<PropertyGroup>
3126
<UnityAbstractions>..\..\Abstractions\src\Unity.Abstractions.csproj</UnityAbstractions>
3227
<UnityContainer>..\..\Container\src\Unity.Container.csproj</UnityContainer>
3328
</PropertyGroup>
3429

35-
<ItemGroup Condition="Exists('$(UnityContainer)')">
36-
<ProjectReference Include="$(UnityContainer)" />
37-
</ItemGroup>
30+
<ItemGroup>
31+
<ProjectReference Include="..\src\Unity.Configuration.csproj" />
3832

33+
<ProjectReference Include="$(UnityAbstractions)" Condition="Exists('$(UnityAbstractions)')" />
34+
<PackageReference Include="Unity.Abstractions" Version="$(UnityAbstractionsVersion)" Condition="!Exists('$(UnityAbstractions)')" />
3935

40-
<ItemGroup Condition="!Exists('$(UnityAbstractions)')">
41-
<PackageReference Include="Unity.Abstractions" Version="$(UnityAbstractionsVersion)" />
36+
<ProjectReference Include="$(UnityContainer)" Condition="Exists('$(UnityContainer)')" />
37+
<PackageReference Include="Unity.Container" Version="$(UnityContainerVersion)" Condition="!Exists('$(UnityContainer)')" />
4238
</ItemGroup>
4339

44-
<ItemGroup Condition="!Exists('$(UnityContainer)')">
45-
<PackageReference Include="Unity.Container" Version="$(UnityContainerVersion)" />
40+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netcoreapp2.0'">
41+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.*" />
4642
</ItemGroup>
4743

48-
<ItemGroup>
49-
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
44+
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0' AND '$(TargetFramework)' != 'netcoreapp2.0'">
45+
<Reference Include="System.Configuration" />
5046
</ItemGroup>
5147

5248
</Project>

0 commit comments

Comments
 (0)