Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed Security.Permission reference #9055

Merged
merged 6 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion eng/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<PackageVersion Include="System.Reflection.MetadataLoadContext" Version="$(SystemReflectionMetadataLoadContextVersion)" />
<PackageVersion Include="System.Resources.Extensions" Version="$(SystemResourcesExtensionsPackageVersion)" />
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafeVersion)" />
<PackageVersion Include="System.Security.Permissions" Version="$(SystemSecurityPermissionsVersion)" />
maridematte marked this conversation as resolved.
Show resolved Hide resolved
<PackageVersion Include="System.Security.Principal.Windows" Version="$(SystemSecurityPrincipalWindowsVersion)" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="$(SystemTextEncodingCodePagesVersion)" />
<PackageVersion Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
Expand Down
1 change: 0 additions & 1 deletion eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<UsagePattern IdentityGlob="System.Security.Cryptography.Pkcs/*7.0.2*" />
<UsagePattern IdentityGlob="System.Security.Cryptography.ProtectedData/*7.0.0*" />
<UsagePattern IdentityGlob="System.Security.Cryptography.Xml/*7.0.1*" />
<UsagePattern IdentityGlob="System.Security.Permissions/*7.0.0*" />
<UsagePattern IdentityGlob="System.Text.Encoding.CodePages/*7.0.0*" />
<UsagePattern IdentityGlob="System.Text.Encodings.Web/*7.0.0*" />
<UsagePattern IdentityGlob="System.Text.Json/*7.0.3*" />
Expand Down
4 changes: 0 additions & 4 deletions src/Framework/Microsoft.Build.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<PackageReference Include="Microsoft.CodeAnalysis.Collections" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
<PackageReference Include="System.Security.Permissions" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<!-- Promote CompilerServices.Unsafe from the old version we get from System.Memory on net472. -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" />
Expand Down
15 changes: 10 additions & 5 deletions src/Shared/ExceptionHandling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace Microsoft.Build.AppxPackage.Shared
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security;
using System.Text;
using System.Threading;
using System.Xml;
Expand Down Expand Up @@ -157,7 +156,9 @@ internal static bool IsIoRelatedException(Exception e)
return e is UnauthorizedAccessException
|| e is NotSupportedException
|| (e is ArgumentException && !(e is ArgumentNullException))
|| e is SecurityException
#if NETFRAMEWORK
|| e is System.Security.SecurityException
#endif
maridematte marked this conversation as resolved.
Show resolved Hide resolved
|| e is IOException;
}

Expand All @@ -167,7 +168,9 @@ internal static bool IsIoRelatedException(Exception e)
internal static bool IsXmlException(Exception e)
{
return e is XmlException
|| e is XmlSyntaxException
#if NETFRAMEWORK
maridematte marked this conversation as resolved.
Show resolved Hide resolved
|| e is System.Security.XmlSyntaxException
#endif
|| e is XmlSchemaException
|| e is UriFormatException; // XmlTextReader for example uses this under the covers
}
Expand Down Expand Up @@ -281,8 +284,10 @@ internal static bool NotExpectedSerializationException(Exception e)
/// </summary>
internal static bool NotExpectedRegistryException(Exception e)
{
if (e is SecurityException
|| e is UnauthorizedAccessException
if (e is UnauthorizedAccessException
#if NETFRAMEWORK
|| e is System.Security.SecurityException
#endif
maridematte marked this conversation as resolved.
Show resolved Hide resolved
|| e is IOException
|| e is ObjectDisposedException
|| e is ArgumentException)
Expand Down
1 change: 0 additions & 1 deletion src/Tasks/Microsoft.Build.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,6 @@
<PackageReference Include="System.CodeDom" />
<PackageReference Include="System.Security.Cryptography.Pkcs" />
<PackageReference Include="System.Security.Cryptography.Xml" />
<PackageReference Include="System.Security.Permissions" />

<Content Include="$(NuGetPackageRoot)microsoft.net.compilers.toolset\$(MicrosoftNetCompilersToolsetVersion)\tasks\netcore\**\*" CopyToOutputDirectory="PreserveNewest" LinkBase="Roslyn" />
</ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Utilities/Microsoft.Build.Utilities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'">
<PackageReference Include="System.Security.Permissions" />
<PackageReference Include="System.Text.Encoding.CodePages" />
</ItemGroup>

Expand Down
Loading