MSBuild.Sdk.SqlProj
MSBuild.Sdk.SqlProj copied to clipboard
ArtifactReference dacpac without using cmdvariables
I have a private Nuget package that contains AppLog.dacpac. This adds our standard enterprise logging tables to the database. I am getting warnings stating "an unresolved reference to object" How do I add ArtifactReferences ? this dacpac will be deployed inside this sql database.
I believe your use case is covered in our readme under the header Package References. In particular, you'll want something like the following:
<ItemGroup>
<PackageReference Include="MyDatabasePackage" Version="1.0.0" />
</ItemGroup>
Let me know if I'm misunderstanding and this isn't what you're trying to do!
I believe your use case is covered in our readme under the header Package References. In particular, you'll want something like the following:
<ItemGroup> <PackageReference Include="MyDatabasePackage" Version="1.0.0" /> </ItemGroup>
Let me know if I'm misunderstanding and this isn't what you're trying to do!
thanks jeff. I do have that, Also this is clarify it's just warning not errors <ItemGroup> <PackageReference Include="AppLog" Version="1.0.0" /> <PackageReference Include="TCC.Broker" Version="1.0.0.5" /> </ItemGroup>
2 examples: of this:
SQL71502 SqlProcedure: [dbo].[spInboundSherlockEventRequest] has an unresolved reference to object [tcc].[TransactionStageIn]
SQL71502 SqlProcedure: [dbo].[spInboundSherlockEventRequest] has an unresolved reference to object [app].[Log]
Oh, sorry, I overlooked that these were warnings. There are 2 ways to suppress these:
- Use the
SuppressTSqlWarnings
property in the project file - Use the
/nowarn
flag in MSBuild
@greektreat Does the name of the NuGet package match the name of the .dacpac
file contained within the package? I believe that is currently required for the <PackageReference>
to work as expected.
SuppressTSqlWarnings
sorry didn't respond. yes they are named the same
<ItemGroup>
<PackageReference Include="AppLog" Version="1.0.0" />
</ItemGroup>
<ItemGroup>
<None Update="AppLog.dacpac">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
</ItemGroup>
@greektreat Can you share a full repro?
Closing as the requested additional info was not provided. Feel free to re-open when you have it available.