Using aspects in non .net code


I split apart the serialization project into 2. One multi target library and the other with just the aspect into a .net 6 library.

I added the aspect myself to the elements file of a island darwin mac console app. It doesnt let you drag and drop. When I build I get

Project Reference 'Serialization.Aspect' has no matching target (Island Darwin macOS).

Is that the right way to go about it ? I was looking at some other ones I had used in .net apps and they dont appear to need a specific project reference. Currently I have

    <ProjectReference Include="..\Source\Serialization.Aspects.elements">


I probably don’t support this for project references. Cirrus references are handled a bit differently than the rest, because they are a different platform.

Probably not worth bothering to chnagefix/support, just add it as a .dll reference (and maybe manually set “Depends on”, to get the build order right for your test solution).

Make the aspect .NET Standard 2.0, to make sure ot will work with the compiler where running on .NET Core or on Classic .NET/Mono.

Thanks. It sees it as cirrus now in the island console app.

1 Like