Skip to content

Commit 3fe6168

Browse files
authored
fix bug with image reference custom constructors (Azure#46086)
1 parent 037e32f commit 3fe6168

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

sdk/batch/Microsoft.Azure.Batch/CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Release History
22

3-
## 16.4.0-beta.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
3+
## 16.3.1 (2024-09-19)
84

95
### Bugs Fixed
106

11-
### Other Changes
7+
- Fixed `ImageReference` constructor null reference exception.
128

139
## 16.3.0 (2024-07-01)
1410

sdk/batch/Microsoft.Azure.Batch/src/ImageReference.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public ImageReference(
1616
string offer,
1717
string publisher,
1818
string sku,
19-
string version = default(string))
19+
string version = default(string)) : this()
2020
{
2121
this.Offer = offer;
2222
this.Publisher = publisher;
@@ -33,7 +33,7 @@ public ImageReference(
3333
/// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId}.
3434
/// </param>
3535
public ImageReference(
36-
string virtualMachineImageId)
36+
string virtualMachineImageId) : this()
3737
{
3838
this.VirtualMachineImageId = virtualMachineImageId;
3939
}

sdk/batch/Microsoft.Azure.Batch/src/Microsoft.Azure.Batch.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Description>This client library provides access to the Microsoft Azure Batch service.</Description>
4-
<Version>16.4.0-beta.1</Version>
5-
<ApiCompatVersion>16.3.0</ApiCompatVersion>
4+
<Version>16.3.1</Version>
65
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
76
<DefineConstants>$(DefineConstants);CODESIGN</DefineConstants>
87
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

sdk/batch/Microsoft.Azure.Batch/tools/ObjectModelCodeGenerator/Spec/ImageReference.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
"SummaryComment": "The specific version of the platform image or marketplace image used to create the node. This read-only field differs from 'version' only if the value specified for 'version' when the pool was created was 'latest'.",
6666
"RemarksComment": null,
6767
"BoundAccess": "read",
68-
"UnboundAccess": "read"
68+
"UnboundAccess": "read",
69+
"HideSetter": true
6970
},
7071
"Value": null
7172
},

0 commit comments

Comments
 (0)