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

Make sure that single-file apps can find assemblies that contains sinks #353

Merged
merged 13 commits into from May 5, 2023

Commits on Mar 27, 2023

  1. Make sure that single-file apps can find assemblies that contains sinks

    Before this commit, when single-file app was detected, the behaviour was to fallback on DLL scanning. But DLL scanning would not find anything for an app published as a single-file, by sheer definition of single-file app!
    
    After this commit, an exception is thrown if the app is published as a single-file AND no `Serilog:Using` section is defined in the configuration. The error message explains that either a `Serilog:Using` section must be added or show how to explicitly configure assemblies through the `ConfigurationReaderOptions`.
    0xced committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    e8b2a39 View commit details
    Browse the repository at this point in the history
  2. Add integration tests

    0xced committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    ecddb13 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a812ab1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9a28018 View commit details
    Browse the repository at this point in the history
  5. Run tests on the TestApp when published as self-contained

    This is when the default DependencyContext is actually null.
    
    Also run all the tests on .NET 6 which is a Long Term Support (LTS) release.
    0xced committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    92d37fc View commit details
    Browse the repository at this point in the history
  6. Simplify loading assemblies

    Use a HashSet instead of a Dictionary keyed by the assembly full name. If an assembly is loaded twice with the same AssemblyName it will be the same instance so a HashSet (without even a custom IEqualityComparer<Assembly>) is the perfect solution.
    
    Also, Assembly.Load can throw many exceptions but won't return null.
    0xced committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    74402f8 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2b6c040 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e71c549 View commit details
    Browse the repository at this point in the history
  9. Use a nuget.config file instead of specifying multiple sources on the…

    … command line
    
    This works around dotnet/sdk#27202
    It also has the benefit of using settings _only_ from the specified config file, ignoring the global nuget.config where package source mapping could interfere with the local source.
    0xced committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    4828123 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2023

  1. Refactor the TestApp fixture

    Add a new PublishAsync(PublishMode) method and also add a comment explaining why it would not work to publish multiple apps in parallel.
    0xced committed Apr 2, 2023
    Configuration menu
    Copy the full SHA
    2cb45f5 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. Configuration menu
    Copy the full SHA
    895f83d View commit details
    Browse the repository at this point in the history

Commits on May 4, 2023

  1. Configuration menu
    Copy the full SHA
    ac1b8c8 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2023

  1. Configuration menu
    Copy the full SHA
    e87d4e8 View commit details
    Browse the repository at this point in the history