|
20 | 20 | <PackageTags>MVVM;Toolkit;MVVMToolkit;INotifyPropertyChanged;Observable;IOC;DI;Dependency Injection;Object Messaging;Extensions;Helpers</PackageTags> |
21 | 21 | </PropertyGroup> |
22 | 22 |
|
| 23 | + <!-- Necessary polyfills --> |
| 24 | + <PropertyGroup> |
| 25 | + <PolySharpIncludeGeneratedTypes> |
| 26 | + System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute; |
| 27 | + System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute; |
| 28 | + System.Diagnostics.CodeAnalysis.MemberNotNullAttribute; |
| 29 | + System.Diagnostics.CodeAnalysis.NotNullAttribute; |
| 30 | + System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute; |
| 31 | + System.Diagnostics.CodeAnalysis.NotNullWhenAttribute; |
| 32 | + System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute; |
| 33 | + System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute; |
| 34 | + System.Runtime.CompilerServices.CallerArgumentExpressionAttribute; |
| 35 | + System.Runtime.CompilerServices.IsExternalInit; |
| 36 | + System.Runtime.CompilerServices.SkipLocalsInitAttribute; |
| 37 | + </PolySharpIncludeGeneratedTypes> |
| 38 | + </PropertyGroup> |
| 39 | + |
| 40 | + <!-- Add the [InternalsVisibleTo] attribute for the test project --> |
| 41 | + <ItemGroup> |
| 42 | + <InternalsVisibleTo Include="CommunityToolkit.Mvvm.Internals.UnitTests, PublicKey=$(AssemblySignPublicKey)" /> |
| 43 | + </ItemGroup> |
| 44 | + |
| 45 | + <!-- |
| 46 | + Include the custom .targets file to check the source generator. |
| 47 | + .NET 6 is not needed as it guarantees Roslyn 4.x. |
| 48 | + --> |
| 49 | + <ItemGroup> |
| 50 | + <None Include="CommunityToolkit.Mvvm.targets" Pack="True" PackagePath="build\netstandard2.0" /> |
| 51 | + <None Include="CommunityToolkit.Mvvm.targets" Pack="True" PackagePath="build\netstandard2.1" /> |
| 52 | + <None Include="CommunityToolkit.Mvvm.targets" Pack="True" PackagePath="buildTransitive\netstandard2.0" /> |
| 53 | + <None Include="CommunityToolkit.Mvvm.targets" Pack="True" PackagePath="buildTransitive\netstandard2.1" /> |
| 54 | + </ItemGroup> |
| 55 | + |
23 | 56 | <!-- .NET Standard 2.0 doesn't have the Span<T> and IAsyncEnumerable<T> types --> |
24 | 57 | <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> |
25 | 58 | <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="7.0.0" /> |
|
40 | 73 | <ProjectReference Include="..\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.Roslyn43.csproj" ReferenceOutputAssembly="false" /> |
41 | 74 | </ItemGroup> |
42 | 75 |
|
43 | | - <!-- Add the [InternalsVisibleTo] attribute for the test project --> |
44 | | - <ItemGroup> |
45 | | - <InternalsVisibleTo Include="CommunityToolkit.Mvvm.Internals.UnitTests, PublicKey=$(AssemblySignPublicKey)" /> |
46 | | - </ItemGroup> |
47 | | - |
48 | | - <!-- Necessary polyfills --> |
49 | | - <PropertyGroup> |
50 | | - <PolySharpIncludeGeneratedTypes> |
51 | | - System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute; |
52 | | - System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute; |
53 | | - System.Diagnostics.CodeAnalysis.MemberNotNullAttribute; |
54 | | - System.Diagnostics.CodeAnalysis.NotNullAttribute; |
55 | | - System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute; |
56 | | - System.Diagnostics.CodeAnalysis.NotNullWhenAttribute; |
57 | | - System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute; |
58 | | - System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute; |
59 | | - System.Runtime.CompilerServices.CallerArgumentExpressionAttribute; |
60 | | - System.Runtime.CompilerServices.IsExternalInit; |
61 | | - System.Runtime.CompilerServices.SkipLocalsInitAttribute; |
62 | | - </PolySharpIncludeGeneratedTypes> |
63 | | - </PropertyGroup> |
64 | | - |
65 | | - <ItemGroup Label="Package"> |
66 | | - |
67 | | - <!-- Include the custom .targets file to check the source generator (.NET 6 is not needed as it guarantees Roslyn 4.x) --> |
68 | | - <None Include="CommunityToolkit.Mvvm.targets" PackagePath="buildTransitive\netstandard2.0" Pack="true" /> |
69 | | - <None Include="CommunityToolkit.Mvvm.targets" PackagePath="buildTransitive\netstandard2.1" Pack="true" /> |
70 | | - <None Include="CommunityToolkit.Mvvm.targets" PackagePath="build\netstandard2.0" Pack="true" /> |
71 | | - <None Include="CommunityToolkit.Mvvm.targets" PackagePath="build\netstandard2.1" Pack="true" /> |
72 | | - |
73 | | - <!-- |
| 76 | + <!-- |
74 | 77 | Pack the source generator to the right package folders (each matching the target Roslyn version). |
75 | 78 | Roslyn will automatically load the highest version compatible with Roslyn's version in the SDK. |
76 | | - --> |
| 79 | + --> |
| 80 | + <ItemGroup> |
77 | 81 | <None Include="..\CommunityToolkit.Mvvm.SourceGenerators\bin\$(Configuration)\netstandard2.0-roslyn4.0\CommunityToolkit.Mvvm.SourceGenerators.dll" PackagePath="analyzers\dotnet\roslyn4.0\cs" Pack="true" Visible="false" /> |
78 | 82 | <None Include="..\CommunityToolkit.Mvvm.SourceGenerators\bin\$(Configuration)\netstandard2.0-roslyn4.3\CommunityToolkit.Mvvm.SourceGenerators.dll" PackagePath="analyzers\dotnet\roslyn4.3\cs" Pack="true" Visible="false" /> |
79 | 83 | </ItemGroup> |
|
0 commit comments