Nested references between database projects in SSDT cannot be resolved - sql

I'm currently creating a huge database solution with over 40 projects and tons of references.
It's a very common situation that project A references project B, then project B references project C and so on like this:
A->B->C->D
When I'm trying to build project D it's all working correctly. Same for project C, it resolves reference to D and builds successfully.
When I try to build project B I get an error like this:
The reference to external elements from the source named D.dacpac' could not be resolved, because no such source is loaded.
I'm sure that all references are set up and nothing is missing. My dacpacs are stored for each project in bin/Debug folder.
Please help me with some hints or ideas on how to continue my investigation.

Even do I've answered in the comments already, it might be helpful for other with similar problem.
The solution is: you need to add reference to parent project of all other dacpacs. So in your case project B should have reference for both C and D projects.
Another possible option would be to tick the "Reference to external elements problem with nested database references" checkbox when you add reference to C project, but that's not always work.

Related

In Visual Studio 2013, is there a way to access classes in a DLL that is referenced within an included project DLL?

For Example, if I include a reference to Test1.DLL in my project and Test1.DLL references Test2.DLL is there a way I can access logic within Test2.DLL in my project without adding a reference to it directly in my project?
Yes u can do. Your project contains Test1.dll.
Ex: Your Project
reference->Test1.dll
Test1.dll refers to Test2.dll,Test3.dll,...
If any changes in Test2.dll,Test3.dll it will reflects the Your project. When ever Your building the project.
Regards,
Sekhar

Work around in circular dependency

Here's my question:
I have Project A which is referenced in Project B, but the problem is I also need to reference Project B in Project A. However, every time I try to do it there is an error which states that it cannot reference Project B to Project A because it will cause a circular dependency.
So can anyone suggest a workaround for my problem?
This is generally a bad idea. If there are some common things that might need to be shared by both assemblies, move it to a third assembly and have both projects reference that instead.

One Xcode project using another without making a static library

I just banged my head for a while and figured out a solution, but I want to make sure that I'm doing things right and that I actually know what I'm doing (I'm pretty sure I never know what I'm doing :)
I have two projects that I've been working on, each offering different functionality. I want one project (A) to be able to use the functionality of the other (B). I tried going about it by creating a workspace and putting both projects into it, but I couldn't "see" project B's files from project A (autocomplete after #import did work, but it gave a compiler error). So I tried adding it as a "sub-project" and found the same. I figured this would be easy, but guess not.
What I ended up doing was creating a new project (C) as a "Cocoa Touch Static Library" project, and put my files from Project B into it. I built it.
I then went back to project A and added project C into it as a sub-project.
Then I added the path on the filesystem of project C into the User Header Search Paths setting under Build Settings of project A.
Then I added the .a file from Project C into the Link Binary with Libraries section of Project A.
Then it worked.
But honestly I have no idea what the meaning of a static library is.
Is all this necessary? Or is there an easier way to just integrate two projects (without me having to copy the files from one project to another)?
Thanks in advance!
Jon
You were on the right track with workspaces. What I do is have three projects in the workspace. One with no targets just to hold the generic classes. A second for my iOS target Project. And a third for mac. Keep the original files in the one with no target, then drag the files to the other two projects that creates references, so when you edit one it changes all three.

msbuild projects build order

I am building a solution in visual studio 2005, it is working fine but when I build it from msbuild some files do not get copied in start up projects bin folder. Please tell me how to solve this problem.
You should add a reference to the projects which are required but not copied to bin folder. VS is more lenient about references then MSBuild is. If you have 3 projects A, B and C. A references B and B references C then you should add a reference to both B and C in project A.

Compiling and deploying assemblies that are used as references for other projects

Okay so here is my situation:
Project A is in solution A, lets call it's output a.dll.
Project B is in solution B, lets call it's output b.exe.
Project B references a.dll
Both solutions are under source code control in different repositories.
My question is: how can i assure that Project A's output gets redirected to project B's "External references" folder, overriding the previous version of a.dll, regardless of what the local developers path structure looks like, is there a way to do this? alternatively could solution A, invoke the build of solution B and then copy it's output locally?
To be brief, automating builds accross solutions without a 'common directory structure' is possible through the use of:
commandline parameters
environment variables
I would encourage you however to consider the "Convention over Configuration" mantra and think up a convention about the relative positions of solutions A and B.
Furthermore it's possible to build projects and solutions using the MSBuild task. The binaries can be copied to your "External references" folder using the Copy task.