Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Guidance2022.1.2.13) When adding an interface project, the project is not referenced in the host project. #72

Open
vvdb-architecture opened this issue Aug 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@vvdb-architecture
Copy link
Contributor

If you add an interface project, it is referenced in appsettings.json, just like the facade:

  "Application.Dependency": {
    "Assemblies": [
     ...
      {
        "Assembly": "AuthorizationViewer.Service.Interface"
      }
    ],
    ...
    }

However, the project is not referenced in the host project. When the host starts, you get the following error:

System.IO.FileNotFoundException: Could not load file or assembly 'AuthorizationViewer.Service.Interface, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'AuthorizationViewer.Service.Interface, Culture=neutral, PublicKeyToken=null'
   at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly)
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext)
   at System.Reflection.Assembly.Load(String assemblyString)
   at Arc4u.Dependency.ContainerInitializerExtention.GetAssembliesFromConfig(ICollection`1 assemblies, List`1& types) in /_/src/Arc4u.Standard.Dependency/ContainerInitializerExtention.cs:line 44
   at Arc4u.Dependency.ContainerInitializerExtention.LoadFromConfig(Dependencies dependencies, IContainer container) in /_/src/Arc4u.Standard.Dependency/ContainerInitializerExtention.cs:line 35
   at Arc4u.Dependency.ContainerInitializerExtention.InitializeFromConfig(IContainer container, IConfiguration configuration) in /_/src/Arc4u.Standard.Dependency/ContainerInitializerExtention.cs:line 19
   at Program.<Main>$(String[] args) in C:\PRJ\HappyFlow\AuthorizationViewer\BE\Service\AuthorizationViewer.Service.Host\Program.cs:line 179

The interface project should be referenced in the host project.

@rdarko rdarko added the bug Something isn't working label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants