IntentArchitect / Support

A repository dedicated to handling issues and support queries
3 stars 0 forks source link

Latest CLI version doesn't work with certain Intent.OutputManager.RoslynWeaver versions #12

Closed jpseini closed 1 year ago

jpseini commented 1 year ago

What happened?

Running an Software Factory as part of the CI process. The latest version of the Intent CLI is being used, using the following step to install the CLI with each CI run:

dotnet new tool-manifest
dotnet tool install Intent.SoftwareFactory.CLI

The following error is encountered when running the Software factory via the CLI:

[ERR] Exception
System.Exception: Exception loading plugins from D:\CredB1\_w\66\s\intent\.intent\modules\Intent.OutputManager.RoslynWeaver.4.0.0\lib\Intent.Modules.OutputManager.RoslynWeaver.dll
 ---> System.TypeLoadException: Could not load type 'Intent.Plugins.FactoryExtensions.ITransformOutputV2' from assembly 'Intent.SoftwareFactory.SDK, Version=3.3.17.0, Culture=neutral, PublicKeyToken=null'.
   at System.Reflection.RuntimeAssembly.GetExportedTypes()
   at Intent.SoftwareFactory.ManifestLoader.GetExportedTypes() in D:\AzureDevOpsAgents\IntentProprietaryRepository\_work\1\s\Intent.IntentArchitect\IntentArchitect.SoftwareFactory\Intent.SoftwareFactory\ManifestLoader.cs:line 84
   --- End of inner exception stack trace ---
##[error]Exception System.Exception: Exception loading plugins from D:\CredB1\_w\66\s\intent\.intent\modules\Intent.OutputManager.RoslynWeaver.4.0.0\lib\Intent.Modules.OutputManager.RoslynWeaver.dll
 ---> System.TypeLoadException: Could not load type 'Intent.Plugins.FactoryExtensions.ITransformOutputV2' from assembly 'Intent.SoftwareFactory.SDK, Version=3.3.17.0, Culture=neutral, PublicKeyToken=null'.
   at System.Reflection.RuntimeAssembly.GetExportedTypes()
   at Intent.SoftwareFactory.ManifestLoader.GetExportedTypes() in D:\AzureDevOpsAgents\IntentProprietaryRepository\_work\1\s\Intent.IntentArchitect\IntentArchitect.SoftwareFactory\Intent.SoftwareFactory\ManifestLoader.cs:line 84
   --- End of inner exception stack trace ---

The latest version of Intent.OutputManager.RoslynWeaver which does work is 3.3.9. Versions 3.3.10 and 4.0.0 both result in the above error.

What version of Intent Architect are you using?

CLI

Additional information

No response

dandrejvv commented 1 year ago

Hi @jpseini. Are you able to replicate this issue locally on your developer machine? Could you confirm that the CI server is running this version of the CLI tool, 4.0.0+8a24f78cd2d2b39d2d5f044bd55d94225669b3ec? You can perform this check by either invoking in your terminal intent-cli --version or checking that the CI output log would have this line recorded: Intent.SoftwareFactory.CLI version 4.0.0+8a24f78cd2d2b39d2d5f044bd55d94225669b3ec

jpseini commented 1 year ago

Thanks for the assistance and suggestions @dandrejvv

This is now working on our build server - the suspicion is that an older cache version of the Intent-CLI was actually being used on the build server.

I was not able to replicate locally - it worked without issue. On the build server, the Intent CLI was being installed using dotnet tool install Intent.SoftwareFactory.CLI. It was confirmed that the correct/latest version was being installed (4.0.0 at time of this issue) To execute the CLI, the following command was being executed (and causing the error): intent-cli Changing the command from intent-cli to dotnet tool run intent-cli resolve the issue.

The assumption is that the intent-cli command was executing a "global" cached version of the CLI, while dotnet tool run intent-cli executes the local correct version installed as part of the build.