[nem-en] Multiple project solutions
vc
vc at rsdn.ru
Tue Jan 9 20:35:09 CET 2007
Hi,
> Now in the "fallback" mode, when macro is not run, what will happen
> with my references to generated stuff? I will get tons of errors. My
> opinion is that we should not have this fallback mode and always
> require macro library to be compiled before we start editing project,
> which uses it.
> I know it might be quite disturbing for a user... but macro must be
> somehow compiled to be executed - may it be the actual compilation
> done by compiler or maybe some "hidden" temporary compilation by VS
> itself.
Yes, I agree. Exactly for this reason I suggest to toughen division assembly
on macro-assembly and simple code assembly.
Also I suggest forbid add top level code for expression macro. We compile
methods bodies on demand. And if body will contain macro which add class
(for example), we get big problems.
Top level code must be added only by macro-attributes.
> Note that there is similar issue with VS designer - it must have the
> compiled version of your Form to show it in designer. It does some
> magic to achieve it (which unfortunately fails VERY often for me), but
> the issue is essentially the same.
No. VS Forms Designer don't compile anything. It only read code. Transform
it to CodeDom. And interpret CodeDom. Really in Forms Designer form always
represent by System.Windows.Forms.Form class. It's behavior create some
problems, but designer can work even if user code of form damaged.
> This difference exists on the compiler level right now - you can use
> /r with to reference a library and /m to just load macros from
> specified assembly. But it is sometimes useful to load macro library
> with /r, for example macro might generate uses of utility classes,
> which are defined in the same assembly.
I know. But it does encourage users use macro assembly via normal assembly
references.
More information about the devel-en
mailing list