MSBuild.Sdk.SqlProj
MSBuild.Sdk.SqlProj copied to clipboard
2nd order dependencies
I managed to include master dacpac as reference by packing it into a nupkg and adding them as references to my project (let's call it Core) , I packed Core into a nupkg and got master.dacpac into its /tools directory and referenced in the nuspec file.
Core.nupkg is itself a reference in another project (let's call it Test.csproj ), but building fails because it can not find the master objects. If I include master.nupkg directly into Test.csproj, it works.
Thanks again for the project!
Yes, I can understand why this works as you describe. We don't currently traverse the entire dependency tree, but only the direct PackageReference
's of the project and include those .dacpac
's during the build phase. I guess I can understand why someone would expect this to behave like you described since that is what happens in regular .NET projects.
That being said I'm not even sure we're able to figure out the dependency tree at the place we would need this. I guess this could be investigated, but I'd rather not re-invent the wheel here.
@ErikEJ @jeffrosenberg Any thoughts on this?
For EF Core Power Tools, I attempt to resolve all .dacpac references: https://github.com/ErikEJ/EFCorePowerTools/blob/master/src/GUI/ErikEJ.EntityFrameworkCore.SqlServer.Dacpac/DacpacConsolidate/DacpacConsolidator.cs#L28 - but starting to do that always can be very brittle in my experience.
Not planned, and there is an easy workaround