Skip to content

Commit 89ac6ea

Browse files
committed
Updates to release the SDK 1.22319.1
1 parent e998e7d commit 89ac6ea

File tree

14 files changed

+44
-18
lines changed

14 files changed

+44
-18
lines changed

src/CodeFactoryVisualStudio/CodeFactory.DotNet/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
3535
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.22318.0.3")]
36+
[assembly: AssemblyFileVersion("1.22319.0.1")]

src/CodeFactoryVisualStudio/CodeFactory.Formatting.CSharp/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
3535
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.22318.0.3")]
36+
[assembly: AssemblyFileVersion("1.22319.0.1")]

src/CodeFactoryVisualStudio/CodeFactory.Logging/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
3535
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.22318.0.3")]
36+
[assembly: AssemblyFileVersion("1.22319.0.1")]

src/CodeFactoryVisualStudio/CodeFactory.VisualStudio.Loader/CodeFactoryConfigurationLoader.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,11 @@ public static IVsCodeFactoryLoadStatus LoadCodeFactoryConfiguration(string codeF
431431
}
432432

433433
}
434+
catch (UnsupportedSdkLibraryException)
435+
{
436+
//Throwing to the caller to notify which library could not be loaded due to SDK being out of date.
437+
throw;
438+
}
434439
catch (Exception loadPackageError)
435440
{
436441
_logger.Error("An unhandled exception has occurred see the exception for details", loadPackageError);

src/CodeFactoryVisualStudio/CodeFactory.VisualStudio.Loader/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
3535
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.22318.0.3")]
36+
[assembly: AssemblyFileVersion("1.22319.0.1")]

src/CodeFactoryVisualStudio/CodeFactory.VisualStudio.Loader/SdkSupport.cs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
//*****************************************************************************
55

66
using System;
7+
using System.Linq;
78
using System.Reflection;
89

910
namespace CodeFactory.VisualStudio.Loader
@@ -21,12 +22,12 @@ public static class SdkSupport
2122
/// <summary>
2223
/// The maximum version of the SDK that can be loaded and used.
2324
/// </summary>
24-
public const string MaxVersion = "1.22318.0.3";
25+
public const string MaxVersion = "1.22319.0.1";
2526

2627
/// <summary>
2728
/// The target version of the NuGet package this SDK is deployed from.
2829
/// </summary>
29-
public const string NuGetSdkVersion = "1.22318.3";
30+
public const string NuGetSdkVersion = "1.22319.1";
3031

3132
/// <summary>
3233
/// Checks the assembly to see if it was created by a CodeFactory SDK. If so it checks the version to confirms it can be used by the runtime.
@@ -36,10 +37,23 @@ public static void SupportedAssembly(Assembly sourceAssembly)
3637
{
3738
if (sourceAssembly == null) return ;
3839

40+
bool cfAssembly = false;
3941
try
4042
{
41-
var sdkVersion =
42-
sourceAssembly.GetCustomAttributes(typeof(AssemblyCFSdkVersion), false)[0] as AssemblyCFSdkVersion;
43+
cfAssembly = sourceAssembly.GetReferencedAssemblies().Any( a=> a.Name == "CodeFactory");
44+
45+
var sdkVersionObject = sourceAssembly.GetCustomAttributes(typeof(AssemblyCFSdkVersion), false);
46+
47+
if (sdkVersionObject == null)
48+
{
49+
if(cfAssembly) throw new UnsupportedSdkLibraryException(sourceAssembly.FullName, "0.0.0.0", MinVersion,
50+
MaxVersion);
51+
52+
return;
53+
}
54+
55+
56+
var sdkVersion = sdkVersionObject[0] as AssemblyCFSdkVersion;
4357

4458
if (sdkVersion == null) return;
4559

@@ -63,7 +77,8 @@ public static void SupportedAssembly(Assembly sourceAssembly)
6377
}
6478
catch (Exception)
6579
{
66-
return;
80+
if(cfAssembly) throw new UnsupportedSdkLibraryException(sourceAssembly.FullName, "0.0.0.0", MinVersion,
81+
MaxVersion);
6782
}
6883

6984
}

src/CodeFactoryVisualStudio/CodeFactory.VisualStudio.Packager/CodeFactorySDK.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd" >
33
<metadata>
44
<id>CodeFactorySDK</id>
5-
<version>1.22318.3</version>
5+
<version>1.22319.1</version>
66
<title>CodeFactory Software Development Kit</title>
77
<authors>CodeFactory, LLC.</authors>
88
<owners>CodeFactory, LLC.</owners>
@@ -11,7 +11,7 @@
1111
<requireLicenseAcceptance>true</requireLicenseAcceptance>
1212
<description>Software factory automation library used with the CodeFactory for Visual Studio.</description>
1313
<releaseNotes>
14-
SDK Update for CodeFactory 1.22318.3
14+
SDK Update for CodeFactory 1.22319.1
1515

1616
This release of the SDK focuses on the following.
1717
- Have updated the injection process of code into files. You no longer have to provide the file path, framework determines this.

src/CodeFactoryVisualStudio/CodeFactory.VisualStudio.Packager/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ private static int WriteNewAssemblyInfo(string assemblyPath)
354354
assemblyFileContents.Add("using System.Runtime.InteropServices;");
355355
assemblyFileContents.Add("");
356356
assemblyFileContents.Add("[assembly: AssemblyVersion(\"1.0.0.0\")]");
357-
assemblyFileContents.Add("[assembly: AssemblyFileVersion(\"1.22318.0.3\")]");
357+
assemblyFileContents.Add("[assembly: AssemblyFileVersion(\"1.22319.0.1\")]");
358358
assemblyFileContents.Add("[assembly: AssemblyCFEnvironment(\"CFVSW\")]");
359359
assemblyFileContents.Add($"[assembly: AssemblyCFSdkVersion(\"{LoadFileVersion()}\")]");
360360

src/CodeFactoryVisualStudio/CodeFactory.VisualStudio.Packager/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
// by using the '*' as shown below:
3535
// [assembly: AssemblyVersion("1.0.*")]
3636
[assembly: AssemblyVersion("1.0.0.0")]
37-
[assembly: AssemblyFileVersion("1.22318.0.3")]
37+
[assembly: AssemblyFileVersion("1.22319.0.1")]

src/CodeFactoryVisualStudio/CodeFactory.VisualStudio/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
5454
[assembly: AssemblyVersion("1.0.0.0")]
55-
[assembly: AssemblyFileVersion("1.22318.0.3")]
55+
[assembly: AssemblyFileVersion("1.22319.0.1")]
5656
[assembly: Guid("34699FC7-0F5E-4BDF-899F-6EBC55A4A6DA")]
5757

0 commit comments

Comments
 (0)