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

Fix Build Warnings for Newer .NET SDK #632

Merged
merged 4 commits into from
Mar 10, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
<Choose>
<When Condition="$(MSBuildProjectName)!='Microsoft.Health.Extensions.BuildTimeCodeGenerator' AND !$(MSBuildProjectName.Contains('Test'))">
<PropertyGroup>
<AnalysisLevel>5.0</AnalysisLevel>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
</When>
</Choose>
Expand Down
4 changes: 2 additions & 2 deletions build/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start from the sdk image
FROM mcr.microsoft.com/dotnet/sdk:5.0.103-alpine3.12@sha256:3e31dfc4639dfc80fe38f40496eff7541f574edd1248b53eca7334f884cd5d4d AS build
FROM mcr.microsoft.com/dotnet/sdk:5.0.201-alpine3.12@sha256:b868e7c133fa9089a031ecc2766d5524c9a1a9a76602ef07d2e3ab4c7e0a5130 AS build

# Set the working directory to where the source is located
WORKDIR /src
Expand All @@ -12,7 +12,7 @@ RUN dotnet build --configuration Release
RUN dotnet publish "./src/Microsoft.Health.Dicom.Web/Microsoft.Health.Dicom.Web.csproj" -c Release -o "/build" --no-build

# Build the runtime image
FROM mcr.microsoft.com/dotnet/aspnet:5.0.3-alpine3.12@sha256:5de46fc04b1dc08994ea810d427536cbb2491604768cf665d2001634181937ab AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:5.0.4-alpine3.12@sha256:edf03b07bd084a8c98115416021bc1413ed3338ffb532800e8ea83286bb283bd AS runtime

RUN set -x && \
# See https://www.abhith.net/blog/docker-sql-error-on-aspnet-core-alpine/
Expand Down
4 changes: 2 additions & 2 deletions converter/dicom-cast/build/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Start from the sdk image
FROM mcr.microsoft.com/dotnet/sdk:5.0.103-alpine3.12@sha256:3e31dfc4639dfc80fe38f40496eff7541f574edd1248b53eca7334f884cd5d4d AS build
FROM mcr.microsoft.com/dotnet/sdk:5.0.201-alpine3.12@sha256:b868e7c133fa9089a031ecc2766d5524c9a1a9a76602ef07d2e3ab4c7e0a5130 AS build

# Set the working directory to where the source is located
WORKDIR /dicom-cast/src
Expand All @@ -12,7 +12,7 @@ RUN dotnet build "./converter/dicom-cast/src/Microsoft.Health.DicomCast.Hosting/
RUN dotnet publish "./converter/dicom-cast/src/Microsoft.Health.DicomCast.Hosting/Microsoft.Health.DicomCast.Hosting.csproj" -c Release -o "/.build" --no-build

# Build the runtime image
FROM mcr.microsoft.com/dotnet/aspnet:5.0.3-alpine3.12@sha256:5de46fc04b1dc08994ea810d427536cbb2491604768cf665d2001634181937ab AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:5.0.4-alpine3.12@sha256:edf03b07bd084a8c98115416021bc1413ed3338ffb532800e8ea83286bb283bd AS runtime

RUN set -x && \
addgroup nonroot && \
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "5.0.103"
"version": "5.0.201"
}
}
2 changes: 1 addition & 1 deletion samples/templates/default-azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
"[variables('appServiceResourceId')]"
],
"properties": {
"version": "5.0.3"
"version": "5.0.4"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Microsoft.Health.Dicom.Blob.Features.Storage
/// </summary>
public class BlobFileStore : IFileStore
{
private static readonly string GetFileStreamTagName = $"{nameof(BlobFileStore)}.{nameof(GetFileAsync)}";
private const string GetFileStreamTagName = nameof(BlobFileStore) + "." + nameof(GetFileAsync);
private readonly BlobContainerClient _container;
private readonly RecyclableMemoryStreamManager _recyclableMemoryStreamManager;
private readonly BlobDataStoreConfiguration _blobDataStoreConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Microsoft.Extensions.DependencyInjection
{
public static class DicomServerBuilderBlobRegistrationExtensions
{
private static readonly string DicomServerBlobConfigurationSectionName = $"DicomWeb:DicomStore";
private const string DicomServerBlobConfigurationSectionName = "DicomWeb:DicomStore";

/// <summary>
/// Adds the blob data store for the DICOM server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ namespace Microsoft.Health.Dicom.Metadata.Features.Storage
/// </summary>
public class BlobMetadataStore : IMetadataStore
{
private static readonly string GetInstanceMetadataStreamTagName = $"{nameof(BlobMetadataStore)}.{nameof(GetInstanceMetadataAsync)}";
private static readonly string StoreInstanceMetadataStreamTagName = $"{nameof(BlobMetadataStore)}.{nameof(StoreInstanceMetadataAsync)}";
private const string GetInstanceMetadataStreamTagName = nameof(BlobMetadataStore) + "." + nameof(GetInstanceMetadataAsync);
private const string StoreInstanceMetadataStreamTagName = nameof(BlobMetadataStore) + "." + nameof(StoreInstanceMetadataAsync);
private static readonly Encoding _metadataEncoding = Encoding.UTF8;

private readonly BlobContainerClient _container;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Microsoft.Extensions.DependencyInjection
{
public static class DicomServerBuilderMetadataRegistrationExtensions
{
private static readonly string DicomServerBlobConfigurationSectionName = $"DicomWeb:MetadataStore";
private const string DicomServerBlobConfigurationSectionName = "DicomWeb:MetadataStore";

/// <summary>
/// Adds the metadata store for the DICOM server.
Expand Down
2 changes: 1 addition & 1 deletion tools/scale-testing/templates/default-azuredeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"[variables('appServiceResourceId')]"
],
"properties": {
"version": "5.0.3"
"version": "5.0.4"
}
}
]
Expand Down