Closed HallCraig closed 9 months ago
Hi @HallCraig
I've taken a quick look around and have some answers,
1) The first screen shot seems to be a deserialization issue, I know we did address a serialization issue around command names, this fix was in 3.3.31. In versions prior to 3.3.31 the commandName in launchsettings.json needs to be one of the following (with the corresponding casing) [DebugRoslynComponent, Docker, DockerCompose, Executable, Iis, IisExpress, MsixPackage, Project] It's probably the Iis one.
If you share the launchSetting,json with me I can also check this for you.
2) I am still looking into this ans will revert.
3) I can see our side we've made the XmlNameSpaceHelper class internal in 3.4. Let me justy double check and get back to you but I think we should be able to release a hotfix making this public again.
Yes, it is :) need to add support WSL2
100% that's an Issue, we don't have that value on the Enum which is used for deserialization. We will definitely add it as an Option.
Joel, 1 other thing, I have to review all my files in v4 because of this change...this will be complained about from every dev team. Any reason
Joel, 1 other thing, I have to review all my files in v4 because of this change...this will be complained about from every dev team. Any reason
Hi @HallCraig,
For consistency this now orders the attributes, but I can fully see this being a bit of a pain for some teams. We can absolutely make it an option to "leave it alone", then these teams can just enable that option?
On the second issue
I can't exactly see what is happening as it's happening mostly within your modules, Either the outputTarget is null or the outputTarget.Applciation is null Could you share the code for TFG.Modules.Diagnostics.FactoryExtensions.HealthCheckEndpointEvent
Lets leave it for now . I will communicate and try manage from this end.
On the second issue
I can't exactly see what is happening as it's happening mostly within your modules, Either the outputTarget is null or the outputTarget.Applciation is null Could you share the code for TFG.Modules.Diagnostics.FactoryExtensions.HealthCheckEndpointEvent
using Intent.Engine; using Intent.Modules.Common; using Intent.Modules.Common.Templates; using Intent.Modules.Common.VisualStudio; using Intent.Modules.VisualStudio.Projects.Api; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TFG.Modules.Common; using TFG.Modules.Diagnostics.Api;
namespace TFG.Modules.Diagnostics.FactoryExtensions { public class HealthCheckEndpointEvent : IBaseEvent, IEndpointEvent, IReferenceEvent, IServiceEntryEvent, IOutputTargetEvent { private ASPNETCoreWebApplicationModel _target;
public string Name => "HealthCheckEndpointEvent";
public IOutputTarget OutputTarget { get; set; }
public IEnumerable<(int Order, string Entry)> GetConfigureServiceEntries(IntentTemplateBase templateBase)
{
if (_target.HasDiagnostics() &&
_target.GetDiagnostics().HealthChecks().Length == 0)
{
yield return (700, $".AddHealthChecks()");
}
if (_target.HasDiagnostics() &&
_target.GetDiagnostics().HealthChecks().Length > 0)
{
yield return (700, $".AddHealthChecks(builder => builder");
yield return (701, $" .AddSql(\"tfg.{OutputTarget.ApplicationName().ToLowerInvariant() }\")");
yield return (702, $")");
}
}
public IEnumerable<string> GetEndpoints()
{
yield break;
}
public IEnumerable<(string Role, INugetPackageInfo PackageInfo)> GetPackageReferences()
{
yield return (Roles.Infrastructure, NugetPackages.TfgPatternsAppHealthHelper);
}
public IEnumerable<string> GetTemplateReferences()
{
yield break;
}
public IEnumerable<(int Order, string Entry)> GetUseServiceEntries()
{
yield return (410, ".UseHealthChecks()");
}
public bool IsEnabled(IVisualStudioProject target)
{
if (target is ASPNETCoreWebApplicationModel model
&& model.HasDiagnostics()
&& model.GetDiagnostics().AddHealthChecks())
{
_target = model;
return true;
}
return false;
}
}
}
On the second issue I can't exactly see what is happening as it's happening mostly within your modules, Either the outputTarget is null or the outputTarget.Applciation is null Could you share the code for TFG.Modules.Diagnostics.FactoryExtensions.HealthCheckEndpointEvent
using Intent.Engine; using Intent.Modules.Common; using Intent.Modules.Common.Templates; using Intent.Modules.Common.VisualStudio; using Intent.Modules.VisualStudio.Projects.Api; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TFG.Modules.Common; using TFG.Modules.Diagnostics.Api;
namespace TFG.Modules.Diagnostics.FactoryExtensions { public class HealthCheckEndpointEvent : IBaseEvent, IEndpointEvent, IReferenceEvent, IServiceEntryEvent, IOutputTargetEvent { private ASPNETCoreWebApplicationModel _target;
public string Name => "HealthCheckEndpointEvent"; public IOutputTarget OutputTarget { get; set; } public IEnumerable<(int Order, string Entry)> GetConfigureServiceEntries(IntentTemplateBase templateBase) { if (_target.HasDiagnostics() && _target.GetDiagnostics().HealthChecks().Length == 0) { yield return (700, $".AddHealthChecks()"); } if (_target.HasDiagnostics() && _target.GetDiagnostics().HealthChecks().Length > 0) { yield return (700, $".AddHealthChecks(builder => builder"); yield return (701, $" .AddSql(\"tfg.{OutputTarget.ApplicationName().ToLowerInvariant() }\")"); yield return (702, $")"); } } public IEnumerable<string> GetEndpoints() { yield break; } public IEnumerable<(string Role, INugetPackageInfo PackageInfo)> GetPackageReferences() { yield return (Roles.Infrastructure, NugetPackages.TfgPatternsAppHealthHelper); } public IEnumerable<string> GetTemplateReferences() { yield break; } public IEnumerable<(int Order, string Entry)> GetUseServiceEntries() { yield return (410, ".UseHealthChecks()"); } public bool IsEnabled(IVisualStudioProject target) { if (target is ASPNETCoreWebApplicationModel model && model.HasDiagnostics() && model.GetDiagnostics().AddHealthChecks()) { _target = model; return true; } return false; } }
}
Sorry ignore second issue resolved...now I'm on 3.3.32 of module
Only issue now moving to 3.4.0
I have put a pre-release out for you. Intent.VisualStudio.Projects v3.4.1-pre.1 This includes the Command Name option WSL2 and I made the XmlNameSpaceHelper class public.
Give a try and let me know if this resolves all the issues.
You sure? I'm still getting both issues upgrading to your pre version
I see I missed the namespace also changed, I've rolled that back too, will have a new patch out as soon as our build is finished.
I put out another pre-release Intent.VisualStudio.Projects v3.4.1-pre.2
This aligning the namessapce of XmlNameSpaceHelper class.
Let me know if this sorts it all out.
Still have issue with WSL2
XmlNameSpaceHelper issue resolved
Let me take a closer look at the WSL2 and revert.
I have a new pre-release out for you, Intent.VisualStudio.Projects v3.4.1-pre.3
This should be it all sorted, let me know if there are any other issues.
Thanks, all sorted.
What happened?
Getting few errors when upgrading a TFG project from 3.3.29 to 3.3.30.
! have another project that works on 3.3.32 but fails on 3.4.0
issue: on 3.4.0
Thanks Craig
What version of Intent Architect are you using?
v4
Additional information
No response