138 строки
6.0 KiB
XML
138 строки
6.0 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<TargetFrameworks Condition="'$(TargetFramework)' == '' AND '$(IncludeDev)' == ''">net462;net471;net6.0</TargetFrameworks>
|
|
<TargetFrameworks Condition="'$(TargetFramework)' == '' AND '$(IncludeDev)' != ''">net462;net471;net481;net6.0</TargetFrameworks>
|
|
|
|
<LangVersion>latest</LangVersion>
|
|
<SignAssembly>false</SignAssembly>
|
|
<IsPackable>false</IsPackable>
|
|
</PropertyGroup>
|
|
|
|
<!-- Well known locations for project files -->
|
|
|
|
<PropertyGroup>
|
|
<UnityContainer>..\..\src\Unity.Container.csproj</UnityContainer>
|
|
<UnityLegacy>..\..\unity\source\Unity\Src\Unity.csproj</UnityLegacy>
|
|
</PropertyGroup>
|
|
|
|
|
|
<!-- Unity v4.x -->
|
|
|
|
<Choose>
|
|
<When Condition="$(TargetFramework.StartsWith('net46'))">
|
|
<PropertyGroup>
|
|
<DefineConstants>$(DefineConstants);UNITY_V4</DefineConstants>
|
|
<DefineConstants Condition="'$(TargetFrameworks)' == ''">$(DefineConstants);BEHAVIOR_V4</DefineConstants>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<ProjectReference Condition="Exists('$(UnityLegacy)') " Include="$(UnityLegacy)" />
|
|
<PackageReference Condition="!Exists('$(UnityLegacy)')" Include="Unity" Version="4.0.1" />
|
|
<PackageReference Condition="$(TargetFramework.StartsWith('net4'))" Include="System.ValueTuple" Version="4.5.0" />
|
|
|
|
<Compile Remove="Patterns\Abstractions\Resolvers\ValidatingResolverFactory.cs" />
|
|
<Compile Remove="Patterns\Abstractions\Resolvers\ValidatintResolver.cs" />
|
|
<Compile Remove="Patterns\Abstractions\FixtureBase.Fields.cs" />
|
|
<Compile Remove="Patterns\Abstractions\Data\Fields\**" />
|
|
<Compile Remove="Patterns\Dependency\DefaultValue.cs" />
|
|
<Compile Remove="Patterns\Dependency\DefaultAttribute.cs" />
|
|
<Compile Remove="Patterns\Dependency\Data\Fields\**" />
|
|
<Compile Remove="Patterns\Dependency\Implementation\Fields\**" />
|
|
<Compile Remove="Patterns\Injection\Implementation\Fields\**" />
|
|
<Compile Remove="Patterns\Injection\Data\Fields\**" />
|
|
<Compile Remove="Patterns\Injection\Annotation\Overrides\Dependency.Import.cs" />
|
|
<Compile Remove="Patterns\Injection\Annotation\Overrides\OptionalParameter.cs" />
|
|
<Compile Remove="Patterns\Injection\Annotation\Overrides\ResolvedParameter.cs" />
|
|
<Compile Remove="Patterns\Lifetime\LifetimeManager.cs" />
|
|
<Compile Remove="Patterns\Lifetime\LifetimeManager\Disposable.cs" />
|
|
<Compile Remove="Patterns\Selection\Implementation\Fields\Annotated.cs" />
|
|
<Compile Remove="Patterns\Selection\Implementation\Fields.cs" />
|
|
<Compile Remove="Resolution\Enumerable\**" />
|
|
<Compile Remove="Resolution\Generic\Constrained.cs" />
|
|
<Compile Remove="Registration\Validation\Factory.cs" />
|
|
<Compile Remove="Registration\BuiltIn\IServiceProvider.cs" />
|
|
<Compile Remove="Registration\BuiltIn\IUnityContainerAsync.cs" />
|
|
<Compile Remove="Container\Extension\BuilderAware\BuilderAwareStrategy.cs" />
|
|
<Compile Remove="Container\Extension\BuilderAware\IBuilderAware.cs" />
|
|
<Compile Remove="Registration\Validation\Factory.cs" />
|
|
</ItemGroup>
|
|
</When>
|
|
<Otherwise> <!-- NOT v4.x -->
|
|
<ItemGroup>
|
|
<Compile Remove="Patterns\Abstractions\Resolvers\ValidatintResolver.v4.cs" />
|
|
<Compile Remove="Patterns\Injection\Implementation\Methods\Override.v4.cs" />
|
|
</ItemGroup>
|
|
</Otherwise>
|
|
</Choose>
|
|
|
|
|
|
<!-- Unity v5.x -->
|
|
|
|
<Choose>
|
|
<When Condition="$(TargetFramework.StartsWith('net47')) OR $(TargetFramework.StartsWith('net48'))">
|
|
<PropertyGroup>
|
|
<DefineConstants>$(DefineConstants);UNITY_V5</DefineConstants>
|
|
<DefineConstants Condition="'$(TargetFrameworks)' == ''">$(DefineConstants);BEHAVIOR_V5</DefineConstants>
|
|
</PropertyGroup>
|
|
<ItemGroup Condition="Exists('$(UnityContainer)') ">
|
|
<ProjectReference Include="$(UnityContainer)" />
|
|
</ItemGroup>
|
|
<ItemGroup Condition="!Exists('$(UnityContainer)') ">
|
|
<PackageReference Condition="$(TargetFramework.StartsWith('net47'))" Include="Unity.Container" Version="5.11.*" />
|
|
<PackageReference Condition="$(TargetFramework.StartsWith('net48'))" Include="Unity.Container" Version="5.12.*-*" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
|
|
<Compile Remove="Patterns\Abstractions\Resolvers\ValidatingResolverFactory.cs" />
|
|
<Compile Remove="Patterns\Abstractions\Resolvers\ValidatintResolver.cs" />
|
|
<Compile Remove="Patterns\Dependency\DefaultAttribute.cs" />
|
|
<Compile Remove="Patterns\Lifetime\LifetimeManager.cs" />
|
|
<Compile Remove="Registration\Validation\Factory.cs" />
|
|
<Compile Remove="Registration\BuiltIn\IServiceProvider.cs" />
|
|
<Compile Remove="Registration\BuiltIn\IUnityContainerAsync.cs" />
|
|
<Compile Remove="Registration\Validation\Factory.cs" />
|
|
</ItemGroup>
|
|
</When>
|
|
<Otherwise> <!-- NOT v5.x -->
|
|
<ItemGroup>
|
|
<Compile Remove="Patterns\Abstractions\Resolvers\ValidatintResolver.v5.cs" />
|
|
<Compile Remove="Patterns\Abstractions\Resolvers\ValidatingResolverFactory.v5.cs" />
|
|
</ItemGroup>
|
|
</Otherwise>
|
|
</Choose>
|
|
|
|
|
|
|
|
<!-- Unity v6.x -->
|
|
|
|
<Choose>
|
|
<When Condition="$(TargetFramework.StartsWith('net6'))">
|
|
<PropertyGroup>
|
|
<DefineConstants>$(DefineConstants);UNITY_V6</DefineConstants>
|
|
</PropertyGroup>
|
|
<ItemGroup>
|
|
<ProjectReference Condition="Exists('$(UnityContainer)') " Include="$(UnityContainer)" />
|
|
<PackageReference Condition="!Exists('$(UnityContainer)')" Include="Unity.Container" Version="6.0.*-*" />
|
|
</ItemGroup>
|
|
</When>
|
|
<Otherwise>
|
|
<!-- NOT v6.x -->
|
|
<ItemGroup>
|
|
</ItemGroup>
|
|
</Otherwise>
|
|
</Choose>
|
|
|
|
|
|
<!-- Packages -->
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
|
|
<PackageReference Include="MSTest.TestAdapter" Version="2.2.*-*" />
|
|
<PackageReference Include="MSTest.TestFramework" Version="2.2.*-*" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<None Remove=".gitignore" />
|
|
</ItemGroup>
|
|
|
|
</Project> |