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

Warning: EventBus conflicts with imported type EventBus #65

Open
vorban opened this issue Feb 10, 2024 · 2 comments
Open

Warning: EventBus conflicts with imported type EventBus #65

vorban opened this issue Feb 10, 2024 · 2 comments
Labels
question Further information is requested

Comments

@vorban
Copy link

vorban commented Feb 10, 2024

I have a fresh Monogame project with Arch and all Arch.Extended plugins:

<ItemGroup>
    <PackageReference Include="Arch" Version="1.2.7" />
    <PackageReference Include="Arch.AOT.SourceGenerator" Version="1.0.0" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
    <PackageReference Include="Arch.EventBus" Version="1.0.2" />
    <PackageReference Include="Arch.LowLevel" Version="1.1.0" />
    <PackageReference Include="Arch.Persistence" Version="1.0.3" />
    <PackageReference Include="Arch.Relationships" Version="1.0.1" />
    <PackageReference Include="Arch.System" Version="1.0.2" />
    <PackageReference Include="Arch.System.SourceGenerator" Version="1.1.2" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
    <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.1.303" />
  </ItemGroup>

I try to dispatch an event exactly like in the sample project:

var @event = (Main.World, key);
EventBus.Send(ref @event);

I get a warning on compilation:

warning CS0436: The type 'EventBus' in 'Arch.EventBus\Arch.Bus.QueryGenerator\EventBus.g.cs' conflicts with the imported type 'EventBus' in 'Arch.EventBus, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'Arch.EventBus\Arch.Bus.QueryGenerator\EventBus.g.cs'.

It compiles and works fine but I like it when there is no warning. I've tinkered with the .csproj without success.

Did I fail to configure something ?

@genaray genaray added the question Further information is requested label Feb 15, 2024
@genaray
Copy link
Owner

genaray commented Feb 15, 2024

Hey, thanks for the issue!

I actually have no idea where the warning comes from, I'm gonna check that out!

@metaphist
Copy link

I had a different issue where EventBus.Send wasn't being detected at all. After changing to Arch.Bus.EventBus.Send I start to get the same warning described here, but code was now working. My packages are all newer than the OP, but all the Arch packages are there

<ItemGroup>
    <PackageReference Include="Arch" Version="1.2.8" />
    <PackageReference Include="Arch.AOT.SourceGenerator" Version="1.0.1" />
    <PackageReference Include="Arch.EventBus" Version="1.0.2" />
    <PackageReference Include="Arch.LowLevel" Version="1.1.0" />
    <PackageReference Include="Arch.Persistence" Version="1.0.4" />
    <PackageReference Include="Arch.Relationships" Version="1.0.1" />
    <PackageReference Include="Arch.System" Version="1.0.5" />
    <PackageReference Include="Arch.System.SourceGenerator" Version="1.1.4" />
    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.1.303" />
    <PackageReference Include="NUnit" Version="4.1.0" />
    <PackageReference Include="Utf8Json" Version="1.3.7" />
  </ItemGroup>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Todo
Development

No branches or pull requests

3 participants