Lacuna Corporation
Topic Author
Posts: 2
Joined: 30 Aug 2018, 20:52

[Unity] Potentially Critical Failure With Assembly Definitions

07 Nov 2018, 13:43

So, I'm hoping that this is an oversight on my part, as it seems that this is a critical issue and I have no idea how to work around it.

Due to several unity modules, I have to use assembly definitions to work with their structure. To reference certain modules, my source code has it's own asmdef; this is where my XAML also resides.

I'm aware that this is a well-documented issue, but I'm encountering problems with VS being unable to resolve a type (the name "X" does not exist in the namespace "clr-namespace:Y"), and I've done everything from ensuring CPU config for build targets to stripping the whole thing out and moving the definition around.

As a test, I explicitly added a reference to the output of the asmdef where the source is contained, and forced my local namespace to point to this assembly, and the issue was fixed. Obviously the issue is that this assembly is actually the current working assembly, it's just the compiled output, so there are duplicate definitions for everything. So it seems that VS is unable to pick up this reference without an explicit assembly reference for reasons I'm not clear on (does the Unity integration control this for example, pointing the the base C# asm? I don't see how this would affect the source, but I haven't looked into it yet).

Just to confirm, should we be able to use assembly definitions natively with Noesis, and I'm just missing something here?
 
User avatar
sfernandez
Site Admin
Posts: 2991
Joined: 22 Dec 2011, 19:20

Re: [Unity] Potentially Critical Failure With Assembly Definitions

09 Nov 2018, 02:11

We haven't worked with Unity Assembly Definition files, but I guess that it would be similar to structuring a WPF project in different assemblies.

What exactly is the problem you are getting in VS? You mean Blend? doesn't compile the project?
One thing I noticed is that Blend would notify a lot of false compilation errors until all the xaml and c# is correct, because it cannot generate the assembly and xaml wouldn't find the classes defined in code.

If you can explain your problems with some minimal example maybe we can understand better how to help you solve it.

Thanks for your feedback.
 
User avatar
jsantos
Site Admin
Posts: 3918
Joined: 20 Jan 2012, 17:18
Contact:

Re: [Unity] Potentially Critical Failure With Assembly Definitions

10 Nov 2018, 19:59

Is this related to viewtopic.php?f=3&t=1444 ?

Who is online

Users browsing this forum: Ahrefs [Bot], DHSven, Google [Bot], maherne and 40 guests