Reputation: 645
I have an assembly generated from DSL, and I need to make a reference to it from my project.
However, I'd like to have reference to Debug assembly from Debug project config, and to Release from Release.
Is it possible to achieve?
Upvotes: 1
Views: 957
Reputation: 645
Okay, so what I've found... assembly reference can be edited manually in the project file, putting $(Configuration) instead of "Debug"/"Release" path part. It works without problems.
Upvotes: 3
Reputation: 49195
Well, add assembly generation from DSL as a build event - that way, you can generate correct version (debug/release) of assembly. Configuration Name is available as macro [$(ConfigurationName)
]. Also, you have to be smart in such command line to skip assembly generation if its already generated and DSL has not been modified - it means you need to have different intermediate target location based on configuration and then copy from that location to some other main location (if file is modified). This other location is the one from where you will reference the assembly in your project.
Upvotes: 0