Skip to content

Commit 3877e24

Browse files
committed
Respond to PR feedback
1 parent b4b7c48 commit 3877e24

File tree

2 files changed

+53
-5
lines changed

2 files changed

+53
-5
lines changed

dir.targets

+13-3
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,24 @@
110110
<Message Importance="High" Condition="'$(ConfigurationErrorMsg)' != ''" Text="$(MSBuildProjectFullPath) ConfigurationErrorMessage: $(ConfigurationErrorMsg)" />
111111
</Target>
112112

113-
<Target Name="GenerateReferenceAssembly">
113+
<Target Name="GenerateReferenceSource">
114114
<PropertyGroup>
115115
<_GenApiExePath>$(ToolsDir)GenApi.exe</_GenApiExePath>
116116
<_RefSourceFileOutputPath>$(MSBuildProjectDirectory)/../ref/$(AssemblyName).cs</_RefSourceFileOutputPath>
117-
<_DefaultDocIdsTxtPath>$(MSBuildThisFileDirectory)tools-local/DefaultGenApiDocIds.txt</_DefaultDocIdsTxtPath>
117+
<_ExcludeAPIList>$(MSBuildThisFileDirectory)tools-local/DefaultGenApiDocIds.txt</_ExcludeAPIList>
118118
<_LicenseHeaderTxtPath>$(MSBuildThisFileDirectory)tools-local/LicenseHeader.txt</_LicenseHeaderTxtPath>
119119
</PropertyGroup>
120-
<Exec Command="$(DotnetToolCommand) $(_GenApiExePath) -assembly:$(TargetPath) -libPath:$(RefPath) -out:$(_RefSourceFileOutputPath) -excludeAttributesList:$(_DefaultDocIdsTxtPath) -headerFile:$(_LicenseHeaderTxtPath)" />
120+
121+
<PropertyGroup>
122+
<_GenAPICmd>$(DotnetToolCommand) $(_GenApiExePath)</_GenAPICmd>
123+
<_GenAPICmd>$(_GenAPICmd) -assembly:$(TargetPath)</_GenAPICmd>
124+
<_GenAPICmd>$(_GenAPICmd) -libPath:$(RefPath)</_GenAPICmd>
125+
<_GenAPICmd>$(_GenAPICmd) -out:$(_RefSourceFileOutputPath)</_GenAPICmd>
126+
<_GenAPICmd>$(_GenAPICmd) -excludeAttributesList:$(_ExcludeAPIList)</_GenAPICmd>
127+
<_GenAPICmd>$(_GenAPICmd) -headerFile:$(_LicenseHeaderTxtPath)</_GenAPICmd>
128+
</PropertyGroup>
129+
130+
<Exec Command="$(_GenAPICmd)" />
121131
<Message Text="Generated reference assembly source code: $(_RefSourceFileOutputPath)" />
122132
</Target>
123133

tools-local/DefaultGenApiDocIds.txt

+40-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
11
// These attributes should be excluded from reference assemblies.
22

3+
T:System.ComponentModel.DesignerAttribute
4+
T:System.ComponentModel.Design.Serialization.DesignerSerializerAttribute
5+
T:System.ComponentModel.Design.Serialization.RootDesignerSerializerAttribute
6+
T:System.ComponentModel.EditorAttribute
7+
T:System.ComponentModel.TypeConverterAttribute
8+
T:System.Configuration.ConfigurationPropertyAttribute
9+
T:System.Diagnostics.CodeAnalysis.SuppressMessageAttribute
310
T:System.Diagnostics.DebuggerBrowsableAttribute
411
T:System.Diagnostics.DebuggerDisplayAttribute
5-
T:System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute
6-
T:System.Runtime.CompilerServices.CompilerGeneratedAttribute
12+
T:System.Diagnostics.DebuggerHiddenAttribute
13+
T:System.Diagnostics.DebuggerNonUserCodeAttribute
14+
T:System.Diagnostics.DebuggerStepThroughAttribute
15+
T:System.Diagnostics.DebuggerTypeProxyAttribute
16+
T:System.Diagnostics.MonitoringDescriptionAttribute
17+
T:System.IO.IODescriptionAttribut
18+
T:System.Runtime.CompilerServices.AsyncStateMachineAttribute
19+
T:System.Runtime.CompilerServices.CompilerGeneratedAttribute
20+
T:System.Runtime.CompilerServices.IteratorStateMachineAttribute
21+
T:System.Runtime.CompilerServices.TypeForwardedFromAttribute
22+
T:System.Runtime.CompilerServices.MethodImpl
23+
T:System.Runtime.ConstrainedExecution.ReliabilityContractAttribute
24+
T:System.Runtime.InteropServices.ClassInterfaceAttribute
25+
T:System.Runtime.InteropServices.ComDefaultInterfaceAttribute
26+
T:System.Runtime.InteropServices.ComVisibleAttribute
27+
T:System.Runtime.InteropServices.GuidAttribute
28+
T:System.Runtime.InteropServices.InterfaceTypeAttribute
29+
T:System.Runtime.Serialization.KnownTypeAttribute
30+
T:System.Security.Permissions.EnvironmentPermissionAttribute
31+
T:System.Security.Permissions.FileIOPermissionAttribute
32+
T:System.Security.Permissions.HostProtectionAttribute
33+
T:System.Security.Permissions.IsolatedStorageFilePermissionAttribute
34+
T:System.Security.Permissions.PermissionSetAttribute
35+
T:System.Security.Permissions.ReflectionPermissionAttribute
36+
T:System.Security.Permissions.SecurityPermissionAttribute
37+
T:System.Security.Permissions.StrongNameIdentityPermissionAttribute
38+
T:System.Security.SecurityCriticalAttribute
39+
T:System.Security.SecuritySafeCriticalAttribute
40+
T:System.Security.SuppressUnmanagedCodeSecurityAttribute
41+
T:System.Xml.Serialization.XmlAttributeAttribute
42+
T:System.Xml.Serialization.XmlEnumAttribute
43+
T:System.Xml.Serialization.XmlIgnoreAttribute
44+
T:System.Xml.Serialization.XmlRootAttribute

0 commit comments

Comments
 (0)