Skip to content

Commit 8ceee8a

Browse files
authored
Include project references in the nuget package (#478)
* Include project references in the nuget package Signed-off-by: Victor Chang <[email protected]>
1 parent 047406b commit 8ceee8a

File tree

10 files changed

+88
-76
lines changed

10 files changed

+88
-76
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ jobs:
394394
if: ${{ (matrix.os == 'ubuntu-latest') }}
395395
run: |
396396
mkdir ~/nupkg
397-
dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o ~/nupkg -p:PackageVersion=${{ env.NUGETVER }}
397+
dotnet pack -c ${{ env.BUILD_CONFIG }} -o ~/nupkg -p:PackageVersion=${{ env.NUGETVER }}
398398
ls -lR ~/nupkg
399399
working-directory: ./src/Api
400400

src/Api/Monai.Deploy.InformaticsGateway.Api.csproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@
2727
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
2828
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
2929
</PropertyGroup>
30-
30+
31+
<PropertyGroup>
32+
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
33+
</PropertyGroup>
34+
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="ResolveReferences">
35+
<ItemGroup>
36+
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" />
37+
</ItemGroup>
38+
</Target>
39+
3140
<PropertyGroup>
3241
<PackageId>Monai.Deploy.InformaticsGateway.Api</PackageId>
3342
<Version>0.4.1</Version>

src/Client/Test/packages.lock.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@
18081808
"dependencies": {
18091809
"DotNext.Threading": "[4.7.4, )",
18101810
"HL7-dotnetcore": "[2.36.0, )",
1811-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
1811+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
18121812
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )",
18131813
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
18141814
"Monai.Deploy.InformaticsGateway.Database": "[1.0.0, )",
@@ -1837,7 +1837,7 @@
18371837
"monai.deploy.informaticsgateway.client": {
18381838
"type": "Project",
18391839
"dependencies": {
1840-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
1840+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
18411841
"Monai.Deploy.InformaticsGateway.Client.Common": "[1.0.0, )"
18421842
}
18431843
},
@@ -1857,7 +1857,7 @@
18571857
"monai.deploy.informaticsgateway.configuration": {
18581858
"type": "Project",
18591859
"dependencies": {
1860-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
1860+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
18611861
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )"
18621862
}
18631863
},
@@ -1867,7 +1867,7 @@
18671867
"AspNetCore.HealthChecks.MongoDb": "[6.0.2, )",
18681868
"Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore": "[6.0.22, )",
18691869
"Microsoft.Extensions.Options.ConfigurationExtensions": "[6.0.0, )",
1870-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
1870+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
18711871
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
18721872
"Monai.Deploy.InformaticsGateway.Database.Api": "[1.0.0, )",
18731873
"Monai.Deploy.InformaticsGateway.Database.EntityFramework": "[1.0.0, )",
@@ -1877,7 +1877,7 @@
18771877
"monai.deploy.informaticsgateway.database.api": {
18781878
"type": "Project",
18791879
"dependencies": {
1880-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
1880+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
18811881
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
18821882
"NLog": "[5.2.4, )"
18831883
}
@@ -1886,10 +1886,10 @@
18861886
"type": "Project",
18871887
"dependencies": {
18881888
"Microsoft.EntityFrameworkCore": "[6.0.22, )",
1889-
"Microsoft.EntityFrameworkCore.Sqlite": "[6.0.21, )",
1889+
"Microsoft.EntityFrameworkCore.Sqlite": "[6.0.22, )",
18901890
"Microsoft.Extensions.Configuration.FileExtensions": "[6.0.0, )",
18911891
"Microsoft.Extensions.Configuration.Json": "[6.0.0, )",
1892-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
1892+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
18931893
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
18941894
"Monai.Deploy.InformaticsGateway.Database.Api": "[1.0.0, )",
18951895
"Polly": "[7.2.4, )"
@@ -1921,7 +1921,7 @@
19211921
"Microsoft.Extensions.Configuration": "[6.0.1, )",
19221922
"Microsoft.Extensions.Configuration.FileExtensions": "[6.0.0, )",
19231923
"Microsoft.Extensions.Configuration.Json": "[6.0.0, )",
1924-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
1924+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
19251925
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
19261926
"Monai.Deploy.InformaticsGateway.Database.Api": "[1.0.0, )",
19271927
"MongoDB.Driver": "[2.21.0, )",

src/Database/EntityFramework/Test/packages.lock.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@
124124
},
125125
"Microsoft.Data.Sqlite.Core": {
126126
"type": "Transitive",
127-
"resolved": "6.0.21",
128-
"contentHash": "9S+kvYcPyGBqH5KX7sL0d7xYADTUrUVaBz+GZsSx4N4jKh/0mka6IFdeuFYzs3T6wdtHTvzdltcRwucwuTFpdw==",
127+
"resolved": "6.0.22",
128+
"contentHash": "gtIGHbGnRq/h4mFSJYr9BdMObvJV/a67nBubs50VjPDusQARtWJzeVTirDWsbL1qTvGzbbZCD7VE7+s2ixZfow==",
129129
"dependencies": {
130130
"SQLitePCLRaw.core": "2.1.2"
131131
}
@@ -156,29 +156,29 @@
156156
},
157157
"Microsoft.EntityFrameworkCore.Relational": {
158158
"type": "Transitive",
159-
"resolved": "6.0.21",
160-
"contentHash": "Ev5FM2KpXJu7+Dm9qvLf1FhSJMytrhSXho92Vompmgeiz3p4InldluidmKKmv8nZQAjs9dTCUUyvk1pxQjysaQ==",
159+
"resolved": "6.0.22",
160+
"contentHash": "W7yfdEbEuS1OPPxU0EOA6haqI4uvzs7OwHKh81DiJFn3NFNP2ztSovkOzBDhTwHX0j+OySsAj3BEJhuzTVYIVw==",
161161
"dependencies": {
162-
"Microsoft.EntityFrameworkCore": "6.0.21",
162+
"Microsoft.EntityFrameworkCore": "6.0.22",
163163
"Microsoft.Extensions.Configuration.Abstractions": "6.0.0"
164164
}
165165
},
166166
"Microsoft.EntityFrameworkCore.Sqlite": {
167167
"type": "Transitive",
168-
"resolved": "6.0.21",
169-
"contentHash": "iAs1F5gxEQRRGNHDKJ6ZtoSbOAWcjdk+mABEIy2vRLeACp7xBPdQRQdJnENmxykkBgOVef73RpU3xVdDcn8Omg==",
168+
"resolved": "6.0.22",
169+
"contentHash": "EDKnYZtxq7P131xxLsEokda86WnFRiVAveLVAYR8kzyWl/UwTpf/RS2m2FrbH/U8vX3A+IQNpabtxcjtCUrY0g==",
170170
"dependencies": {
171-
"Microsoft.EntityFrameworkCore.Sqlite.Core": "6.0.21",
171+
"Microsoft.EntityFrameworkCore.Sqlite.Core": "6.0.22",
172172
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.2"
173173
}
174174
},
175175
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
176176
"type": "Transitive",
177-
"resolved": "6.0.21",
178-
"contentHash": "2If1Lt04gD+KrKPFbMUeUzB8Av/EGJJFxNLGfC/CKLgy8+jAYsamyQ/Hux+93XCajJxFLnJimqSg+bBBvXX+2g==",
177+
"resolved": "6.0.22",
178+
"contentHash": "xSU77ORQgwlD+s5Cmlk9DzoSCu5oxlHLuQl+v5zAZ0Uv5yH17hp02TBfz3x9nBA+CrIsqaLjGEuyZmLDf/5ATw==",
179179
"dependencies": {
180-
"Microsoft.Data.Sqlite.Core": "6.0.21",
181-
"Microsoft.EntityFrameworkCore.Relational": "6.0.21",
180+
"Microsoft.Data.Sqlite.Core": "6.0.22",
181+
"Microsoft.EntityFrameworkCore.Relational": "6.0.22",
182182
"Microsoft.Extensions.DependencyModel": "6.0.0"
183183
}
184184
},
@@ -1467,14 +1467,14 @@
14671467
"monai.deploy.informaticsgateway.configuration": {
14681468
"type": "Project",
14691469
"dependencies": {
1470-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
1470+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
14711471
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )"
14721472
}
14731473
},
14741474
"monai.deploy.informaticsgateway.database.api": {
14751475
"type": "Project",
14761476
"dependencies": {
1477-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
1477+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
14781478
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
14791479
"NLog": "[5.2.4, )"
14801480
}
@@ -1483,10 +1483,10 @@
14831483
"type": "Project",
14841484
"dependencies": {
14851485
"Microsoft.EntityFrameworkCore": "[6.0.22, )",
1486-
"Microsoft.EntityFrameworkCore.Sqlite": "[6.0.21, )",
1486+
"Microsoft.EntityFrameworkCore.Sqlite": "[6.0.22, )",
14871487
"Microsoft.Extensions.Configuration.FileExtensions": "[6.0.0, )",
14881488
"Microsoft.Extensions.Configuration.Json": "[6.0.0, )",
1489-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
1489+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
14901490
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
14911491
"Monai.Deploy.InformaticsGateway.Database.Api": "[1.0.0, )",
14921492
"Polly": "[7.2.4, )"

src/Database/EntityFramework/packages.lock.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929
},
3030
"Microsoft.EntityFrameworkCore.Sqlite": {
3131
"type": "Direct",
32-
"requested": "[6.0.21, )",
33-
"resolved": "6.0.21",
34-
"contentHash": "iAs1F5gxEQRRGNHDKJ6ZtoSbOAWcjdk+mABEIy2vRLeACp7xBPdQRQdJnENmxykkBgOVef73RpU3xVdDcn8Omg==",
32+
"requested": "[6.0.22, )",
33+
"resolved": "6.0.22",
34+
"contentHash": "EDKnYZtxq7P131xxLsEokda86WnFRiVAveLVAYR8kzyWl/UwTpf/RS2m2FrbH/U8vX3A+IQNpabtxcjtCUrY0g==",
3535
"dependencies": {
36-
"Microsoft.EntityFrameworkCore.Sqlite.Core": "6.0.21",
36+
"Microsoft.EntityFrameworkCore.Sqlite.Core": "6.0.22",
3737
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.2"
3838
}
3939
},
@@ -132,8 +132,8 @@
132132
},
133133
"Microsoft.Data.Sqlite.Core": {
134134
"type": "Transitive",
135-
"resolved": "6.0.21",
136-
"contentHash": "9S+kvYcPyGBqH5KX7sL0d7xYADTUrUVaBz+GZsSx4N4jKh/0mka6IFdeuFYzs3T6wdtHTvzdltcRwucwuTFpdw==",
135+
"resolved": "6.0.22",
136+
"contentHash": "gtIGHbGnRq/h4mFSJYr9BdMObvJV/a67nBubs50VjPDusQARtWJzeVTirDWsbL1qTvGzbbZCD7VE7+s2ixZfow==",
137137
"dependencies": {
138138
"SQLitePCLRaw.core": "2.1.2"
139139
}
@@ -159,11 +159,11 @@
159159
},
160160
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
161161
"type": "Transitive",
162-
"resolved": "6.0.21",
163-
"contentHash": "2If1Lt04gD+KrKPFbMUeUzB8Av/EGJJFxNLGfC/CKLgy8+jAYsamyQ/Hux+93XCajJxFLnJimqSg+bBBvXX+2g==",
162+
"resolved": "6.0.22",
163+
"contentHash": "xSU77ORQgwlD+s5Cmlk9DzoSCu5oxlHLuQl+v5zAZ0Uv5yH17hp02TBfz3x9nBA+CrIsqaLjGEuyZmLDf/5ATw==",
164164
"dependencies": {
165-
"Microsoft.Data.Sqlite.Core": "6.0.21",
166-
"Microsoft.EntityFrameworkCore.Relational": "6.0.21",
165+
"Microsoft.Data.Sqlite.Core": "6.0.22",
166+
"Microsoft.EntityFrameworkCore.Relational": "6.0.22",
167167
"Microsoft.Extensions.DependencyModel": "6.0.0"
168168
}
169169
},
@@ -471,14 +471,14 @@
471471
"monai.deploy.informaticsgateway.configuration": {
472472
"type": "Project",
473473
"dependencies": {
474-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
474+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
475475
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )"
476476
}
477477
},
478478
"monai.deploy.informaticsgateway.database.api": {
479479
"type": "Project",
480480
"dependencies": {
481-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
481+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
482482
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
483483
"NLog": "[5.2.4, )"
484484
}

src/Database/packages.lock.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
},
103103
"Microsoft.Data.Sqlite.Core": {
104104
"type": "Transitive",
105-
"resolved": "6.0.21",
106-
"contentHash": "9S+kvYcPyGBqH5KX7sL0d7xYADTUrUVaBz+GZsSx4N4jKh/0mka6IFdeuFYzs3T6wdtHTvzdltcRwucwuTFpdw==",
105+
"resolved": "6.0.22",
106+
"contentHash": "gtIGHbGnRq/h4mFSJYr9BdMObvJV/a67nBubs50VjPDusQARtWJzeVTirDWsbL1qTvGzbbZCD7VE7+s2ixZfow==",
107107
"dependencies": {
108108
"SQLitePCLRaw.core": "2.1.2"
109109
}
@@ -143,20 +143,20 @@
143143
},
144144
"Microsoft.EntityFrameworkCore.Sqlite": {
145145
"type": "Transitive",
146-
"resolved": "6.0.21",
147-
"contentHash": "iAs1F5gxEQRRGNHDKJ6ZtoSbOAWcjdk+mABEIy2vRLeACp7xBPdQRQdJnENmxykkBgOVef73RpU3xVdDcn8Omg==",
146+
"resolved": "6.0.22",
147+
"contentHash": "EDKnYZtxq7P131xxLsEokda86WnFRiVAveLVAYR8kzyWl/UwTpf/RS2m2FrbH/U8vX3A+IQNpabtxcjtCUrY0g==",
148148
"dependencies": {
149-
"Microsoft.EntityFrameworkCore.Sqlite.Core": "6.0.21",
149+
"Microsoft.EntityFrameworkCore.Sqlite.Core": "6.0.22",
150150
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.2"
151151
}
152152
},
153153
"Microsoft.EntityFrameworkCore.Sqlite.Core": {
154154
"type": "Transitive",
155-
"resolved": "6.0.21",
156-
"contentHash": "2If1Lt04gD+KrKPFbMUeUzB8Av/EGJJFxNLGfC/CKLgy8+jAYsamyQ/Hux+93XCajJxFLnJimqSg+bBBvXX+2g==",
155+
"resolved": "6.0.22",
156+
"contentHash": "xSU77ORQgwlD+s5Cmlk9DzoSCu5oxlHLuQl+v5zAZ0Uv5yH17hp02TBfz3x9nBA+CrIsqaLjGEuyZmLDf/5ATw==",
157157
"dependencies": {
158-
"Microsoft.Data.Sqlite.Core": "6.0.21",
159-
"Microsoft.EntityFrameworkCore.Relational": "6.0.21",
158+
"Microsoft.Data.Sqlite.Core": "6.0.22",
159+
"Microsoft.EntityFrameworkCore.Relational": "6.0.22",
160160
"Microsoft.Extensions.DependencyModel": "6.0.0"
161161
}
162162
},
@@ -585,14 +585,14 @@
585585
"monai.deploy.informaticsgateway.configuration": {
586586
"type": "Project",
587587
"dependencies": {
588-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
588+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
589589
"Monai.Deploy.InformaticsGateway.Common": "[1.0.0, )"
590590
}
591591
},
592592
"monai.deploy.informaticsgateway.database.api": {
593593
"type": "Project",
594594
"dependencies": {
595-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
595+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
596596
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
597597
"NLog": "[5.2.4, )"
598598
}
@@ -601,10 +601,10 @@
601601
"type": "Project",
602602
"dependencies": {
603603
"Microsoft.EntityFrameworkCore": "[6.0.22, )",
604-
"Microsoft.EntityFrameworkCore.Sqlite": "[6.0.21, )",
604+
"Microsoft.EntityFrameworkCore.Sqlite": "[6.0.22, )",
605605
"Microsoft.Extensions.Configuration.FileExtensions": "[6.0.0, )",
606606
"Microsoft.Extensions.Configuration.Json": "[6.0.0, )",
607-
"Monai.Deploy.InformaticsGateway.Api": "[1.0.0, )",
607+
"Monai.Deploy.InformaticsGateway.Api": "[0.4.1, )",
608608
"Monai.Deploy.InformaticsGateway.Configuration": "[1.0.0, )",
609609
"Monai.Deploy.InformaticsGateway.Database.Api": "[1.0.0, )",
610610
"Polly": "[7.2.4, )"

src/InformaticsGateway/Services/Scp/ScpServiceInternal.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ public async Task OnReceiveAssociationRequestAsync(DicomAssociation association)
148148

149149
if (_associationDataProvider is null)
150150
{
151+
_associationInfo.Errors = $"Internal error: association data provider not found.";
151152
throw new ServiceException($"{nameof(UserState)} must be an instance of IAssociationDataProvider");
152153
}
153154

@@ -165,7 +166,7 @@ public async Task OnReceiveAssociationRequestAsync(DicomAssociation association)
165166

166167
if (!await IsValidSourceAeAsync(association.CallingAE, association.RemoteHost).ConfigureAwait(false))
167168
{
168-
_associationInfo.Errors = "Invalid source";
169+
_associationInfo.Errors = $"Invalid source. Called AE: {association.CalledAE}. Calling AE: {association.CallingAE}. IP: {association.RemoteHost}.";
169170

170171
await SendAssociationRejectAsync(
171172
DicomRejectResult.Permanent,
@@ -175,7 +176,7 @@ await SendAssociationRejectAsync(
175176

176177
if (!await IsValidCalledAeAsync(association.CalledAE).ConfigureAwait(false))
177178
{
178-
_associationInfo.Errors = "Invalid MONAI AE Title";
179+
_associationInfo.Errors = "Invalid MONAI AE Title. Called AE: {association.CalledAE}. Calling AE: {association.CallingAE}. IP: {association.RemoteHost}.";
179180

180181
await SendAssociationRejectAsync(
181182
DicomRejectResult.Permanent,
@@ -189,6 +190,7 @@ await SendAssociationRejectAsync(
189190
{
190191
if (!_associationDataProvider.Configuration.Value.Dicom.Scp.EnableVerification)
191192
{
193+
_associationInfo.Errors = "Verification service disabled. Called AE: {association.CalledAE}. Calling AE: {association.CallingAE}. IP: {association.RemoteHost}.";
192194
_logger?.VerificationServiceDisabled();
193195
await SendAssociationRejectAsync(
194196
DicomRejectResult.Permanent,
@@ -202,6 +204,7 @@ await SendAssociationRejectAsync(
202204
{
203205
if (!_associationDataProvider.CanStore)
204206
{
207+
_associationInfo.Errors = "Disk pressure. Called AE: {association.CalledAE}. Calling AE: {association.CallingAE}. IP: {association.RemoteHost}.";
205208
await SendAssociationRejectAsync(
206209
DicomRejectResult.Permanent,
207210
DicomRejectSource.ServiceUser,

0 commit comments

Comments
 (0)