-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow overriding dacpac filename for a package reference #396
Comments
@ErikEJ @jeffrosenberg Any thoughts on this? |
Seems slightly Odd having to specify the tools folder, otherwise LGTM |
Yeah, I guess we could just stick with |
Makes sense to me, we can always add a path parameter if that comes up at some point |
<ItemGroup>
<PackageReference Include="Microsoft.SqlServer.Dacpacs" Version="160.0.0" />
<DacpacName>msdb</DacpacName>
</PackageReference>
</ItemGroup>
</Project>
|
This is how MS does it. |
Yeah, that looks good to me. I'll see if I can implement something like that for MSBuild.Sdk.SqlProj. |
Fixing this will fix #64 |
@jmezach Notice that there are multiple packages published: microsoft/DacFx#83 (comment) |
This is now released in version 2.5.0. |
When adding a
PackageReference
to a project, MSBuild.Sdk.SqlProj currently assumes that this package contains a.dacpac
in thetools
folder which has the same name as the package. So for example, if I add a<PackageReference Include="MyPackage">
to the project file, it will look for a file calledtools\MyPackage.dacpac
and use that as a reference. If such a file does not exist, the package reference is essentially ignored.While that is a fair assumption that works for most scenarios, and is in fact also the result of doing a
dotnet pack
on an MSBuild.Sdk.SqlProj project, there are some scenarios where this doesn't hold up. One example is the newly released Microsoft.SqlServer.Dacpacs package, which holds the.dacpac
for themaster
andmsdb
databases. Ideally you should be able to reference those in anMSBuild.Sdk.SqlProj
project, but you can't do that currently.I would therefore like to introduce the possibility to override the name of the
.dacpac
on a perPackageReference
basis. For example, something like this:The text was updated successfully, but these errors were encountered: