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

ILMerged/Costura seems to prevent pipeline from building #4598

Closed
janpieterz opened this issue Apr 5, 2017 · 14 comments
Closed

ILMerged/Costura seems to prevent pipeline from building #4598

janpieterz opened this issue Apr 5, 2017 · 14 comments
Assignees
Labels
Milestone

Comments

@janpieterz
Copy link

Though with the flag scanner.ScanAppDomainAssemblies = true; one would assume it scans the assemblies in the app domain, the pipeline itself won't be sufficiently build up when, for example, the final exe is merged and the redundant assemblies have been removed from the final directory.

The NServiceBus assemblies have been loaded (confirmed in Debug->Modules) at the time of the endpoint.Start(), but the following exception is thrown:
https://github.com/Particular/NServiceBus/blob/develop/src/NServiceBus.Core/Pipeline/PipelineModelBuilder.cs#L96

To replicate, see this repository: https://github.com/janpieterz/NServiceBus-Pipeline-Error-V6.2/commits/master

There are two substantial commits, the 2nd commit (time) works, the CleanReferenceCopyLocalPaths target is not installed (though it's replicatable by removing the dll's manually).
The 3rd commit breaks by default when running.

@andreasohlund
Copy link
Member

Can you see if there are stages available?

We've seen cases where type comparisons start to fail when Costura is involved. Would you be able to change https://github.com/Particular/NServiceBus/blob/develop/src/NServiceBus.Core/Pipeline/PipelineModelBuilder.cs#L96 to compare on type.FullName and not the type it self?

@janpieterz
Copy link
Author

Any idea how I can easily step into this?

It runs in NSB host, so might need to get that repo and run that? I'll see if I can make some time available.

@janpieterz
Copy link
Author

janpieterz commented Apr 6, 2017 via email

@andreasohlund
Copy link
Member

Don't worry @janpieterz I've been able to run your repro, will report back my findings soon

@andreasohlund
Copy link
Member

Found the issue, when Costura is used our scanner can no longer find any types so we can't find any features to activate and that causes the exception you're hitting.

Not sure we can support this at all, what's your use case for Costura?

@andreasohlund andreasohlund self-assigned this Apr 6, 2017
@janpieterz
Copy link
Author

janpieterz commented Apr 6, 2017 via email

@andreasohlund
Copy link
Member

Why not Ilmerge them?

@janpieterz
Copy link
Author

janpieterz commented Apr 6, 2017 via email

@andreasohlund
Copy link
Member

We have some ideas, stay tuned cc @timbussmann

@andreasohlund
Copy link
Member

@janpieterz I didn't realized that we supported this in v5. We'll fix this, see #4603

What's your timeline? (when would you need the fix)

@janpieterz
Copy link
Author

No rush at all for this, for our internal tools we've disabled Costura, and for the on premise deployment it would be relevant in two months.

@andreasohlund
Copy link
Member

Seems just about right since we should have a 6.3.0 ready in that timeframe

@andreasohlund andreasohlund added this to the 6.3.0 milestone Apr 10, 2017
@andreasohlund
Copy link
Member

@Particular/nservicebus-maintainers I've added this to the 6.3.0 milestone

@timbussmann
Copy link
Contributor

@janpieterz with the 6.3 release, using ScanAppDomainAssemblies should now also work with assemblies inlined via costura. If you're interested in verifying this, we're happy to help you testing this with an unstable build.

I'm closing this issue for now., but if you're encountering any issues, please let us know. Thanks a lot for raising this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants