|
15 | 15 | <SignAssembly>true</SignAssembly> |
16 | 16 | <NeutralLanguage>en-US</NeutralLanguage> |
17 | 17 | <!-- Frameworks and language features --> |
18 | | - <TargetFrameworks>netstandard2.0</TargetFrameworks> |
| 18 | + <TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks> |
19 | 19 | <LangVersion>latest</LangVersion> |
20 | 20 | <Nullable>enable</Nullable> |
21 | 21 | <GenerateDocumentationFile>true</GenerateDocumentationFile> |
22 | 22 | <CodeAnalysisRuleSet>../../build/Analyzers.ruleset</CodeAnalysisRuleSet> |
| 23 | + <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> |
23 | 24 | <AnalysisMode>AllEnabledByDefault</AnalysisMode> |
24 | 25 | <ImplicitUsings>enable</ImplicitUsings> |
25 | 26 | <!-- Packaging --> |
|
37 | 38 | <EmbedAllSources>true</EmbedAllSources> |
38 | 39 | <IncludeSymbols>true</IncludeSymbols> |
39 | 40 | <SymbolPackageFormat>snupkg</SymbolPackageFormat> |
| 41 | + <!-- OmniSharp/VS Code resource generation --> |
| 42 | + <CoreCompileDependsOn>PrepareResources;$(CompileDependsOn)</CoreCompileDependsOn> |
40 | 43 | </PropertyGroup> |
41 | 44 |
|
42 | 45 | <ItemGroup> |
43 | 46 | <Using Include="System.Diagnostics.CodeAnalysis" /> |
44 | 47 | </ItemGroup> |
45 | 48 |
|
| 49 | + <!-- Disable nullability warnings in netstandard2.0 --> |
| 50 | + <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> |
| 51 | + <NoWarn>$(NoWarn);8600;8601;8602;8603;8604</NoWarn> |
| 52 | + </PropertyGroup> |
| 53 | + |
46 | 54 | <ItemGroup> |
47 | 55 | <None Include="..\..\build\icon.png" Pack="true" PackagePath="\" /> |
48 | 56 | <None Include="..\..\README.md" Pack="true" PackagePath="\" /> |
|
53 | 61 | </ItemGroup> |
54 | 62 |
|
55 | 63 | <ItemGroup> |
56 | | - <PackageReference Include="Autofac" Version="6.4.0" /> |
57 | | - <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" Condition="Exists('$(MSBuildThisFileDirectory)../../.git')"> |
| 64 | + <PackageReference Include="Autofac" Version="8.0.0" /> |
| 65 | + <PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" Condition="Exists('$(MSBuildThisFileDirectory)../../.git')"> |
58 | 66 | <PrivateAssets>all</PrivateAssets> |
59 | 67 | </PackageReference> |
60 | | - <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.406"> |
| 68 | + <PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556"> |
61 | 69 | <PrivateAssets>all</PrivateAssets> |
62 | 70 | </PackageReference> |
63 | | - <PackageReference Include="System.ComponentModel.Composition" Version="4.5.0" /> |
| 71 | + <PackageReference Include="System.ComponentModel.Composition" Version="8.0.0" /> |
64 | 72 | </ItemGroup> |
65 | 73 |
|
66 | | - <ItemGroup> |
67 | | - <!-- |
68 | | - Magic embedded resource incantation based on https://github.com/dotnet/msbuild/issues/4751 |
| 74 | + <ItemDefinitionGroup> |
| 75 | + <EmbeddedResource> |
| 76 | + <Generator>MSBuild:Compile</Generator> |
| 77 | + <StronglyTypedLanguage>CSharp</StronglyTypedLanguage> |
| 78 | + <StronglyTypedFileName>$(IntermediateOutputPath)%(Filename).Designer.cs</StronglyTypedFileName> |
| 79 | + <StronglyTypedClassName>%(Filename)</StronglyTypedClassName> |
| 80 | + </EmbeddedResource> |
| 81 | + </ItemDefinitionGroup> |
69 | 82 |
|
70 | | - The EmbeddedResource entry seems to add the Designer files to Compile, so |
71 | | - if you don't first remove them from Compile you get warnings about |
72 | | - double-including source. |
73 | | - --> |
74 | | - <Compile Remove="**/*.Designer.cs" /> |
| 83 | + <ItemGroup> |
75 | 84 | <EmbeddedResource Update="ContractBasedServiceResources.resx"> |
76 | | - <Generator>ResXFileCodeGenerator</Generator> |
77 | | - <LastGenOutput>ContractBasedServiceResources.Designer.cs</LastGenOutput> |
78 | | - <StronglyTypedFileName>ContractBasedServiceResources.Designer.cs</StronglyTypedFileName> |
79 | | - <StronglyTypedLanguage>CSharp</StronglyTypedLanguage> |
80 | 85 | <StronglyTypedNamespace>Autofac.Integration.Mef</StronglyTypedNamespace> |
81 | | - <StronglyTypedClassName>ContractBasedServiceResources</StronglyTypedClassName> |
82 | 86 | </EmbeddedResource> |
83 | 87 | <EmbeddedResource Update="LazyWithMetadataRegistrationSourceResources.resx"> |
84 | | - <Generator>ResXFileCodeGenerator</Generator> |
85 | | - <LastGenOutput>LazyWithMetadataRegistrationSourceResources.Designer.cs</LastGenOutput> |
86 | | - <StronglyTypedFileName>LazyWithMetadataRegistrationSourceResources.Designer.cs</StronglyTypedFileName> |
87 | | - <StronglyTypedLanguage>CSharp</StronglyTypedLanguage> |
88 | 88 | <StronglyTypedNamespace>Autofac.Integration.Mef</StronglyTypedNamespace> |
89 | | - <StronglyTypedClassName>LazyWithMetadataRegistrationSourceResources</StronglyTypedClassName> |
90 | 89 | </EmbeddedResource> |
91 | 90 | <EmbeddedResource Update="StronglyTypedMetadataRegistrationSourceResources.resx"> |
92 | | - <Generator>ResXFileCodeGenerator</Generator> |
93 | | - <LastGenOutput>StronglyTypedMetadataRegistrationSourceResources.Designer.cs</LastGenOutput> |
94 | | - <StronglyTypedFileName>StronglyTypedMetadataRegistrationSourceResources.Designer.cs</StronglyTypedFileName> |
95 | | - <StronglyTypedLanguage>CSharp</StronglyTypedLanguage> |
96 | 91 | <StronglyTypedNamespace>Autofac.Integration.Mef</StronglyTypedNamespace> |
97 | | - <StronglyTypedClassName>StronglyTypedMetadataRegistrationSourceResources</StronglyTypedClassName> |
98 | 92 | </EmbeddedResource> |
99 | 93 | <EmbeddedResource Update="RegistrationExtensionsResources.resx"> |
100 | | - <Generator>ResXFileCodeGenerator</Generator> |
101 | | - <LastGenOutput>RegistrationExtensionsResources.Designer.cs</LastGenOutput> |
102 | | - <StronglyTypedFileName>RegistrationExtensionsResources.Designer.cs</StronglyTypedFileName> |
103 | | - <StronglyTypedLanguage>CSharp</StronglyTypedLanguage> |
104 | 94 | <StronglyTypedNamespace>Autofac.Integration.Mef</StronglyTypedNamespace> |
105 | | - <StronglyTypedClassName>RegistrationExtensionsResources</StronglyTypedClassName> |
106 | 95 | </EmbeddedResource> |
107 | 96 | <EmbeddedResource Update="Util\ReflectionExtensionsResources.resx"> |
108 | | - <Generator>ResXFileCodeGenerator</Generator> |
109 | | - <LastGenOutput>ReflectionExtensionsResources.Designer.cs</LastGenOutput> |
110 | | - <StronglyTypedFileName>Util\ReflectionExtensionsResources.Designer.cs</StronglyTypedFileName> |
111 | | - <StronglyTypedLanguage>CSharp</StronglyTypedLanguage> |
112 | 97 | <StronglyTypedNamespace>Autofac.Integration.Mef.Util</StronglyTypedNamespace> |
113 | | - <StronglyTypedClassName>ReflectionExtensionsResources</StronglyTypedClassName> |
114 | 98 | </EmbeddedResource> |
115 | 99 | </ItemGroup> |
116 | 100 |
|
|
0 commit comments