rr-wfm / MSBuild.Sdk.SqlProj

An MSBuild SDK that provides similar functionality to SQL Server Data Tools (.sqlproj) projects
MIT License
379 stars 42 forks source link

Add ability to update current rules or bring your own #530

Closed ErikEJ closed 3 months ago

ErikEJ commented 3 months ago

I now find myself fixing bugs to the SqlServer.Rules rule set and having a mechanism to update the ruleset out of band with a SDK update would be handy.

I am proposing the following simple approach, but let me hear what anyone else thinks.

Sample .csproj addition to copy .dll files the output folder

    <ItemGroup>
      <None Update="SqlServer.Dac.dll">
        <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      </None>
      <None Update="SqlServer.Rules.dll">
        <CopyToOutputDirectory>Always</CopyToOutputDirectory>
      </None>
    </ItemGroup>
ErikEJ commented 3 months ago

@jeffrosenberg @jmezach @tcartwright

ErikEJ commented 3 months ago

I did a POC, I think there are two issues;

Options.Output does not point to the bin folder.

Maybe the file copy of the .dll file happens too late.

ErikEJ commented 3 months ago

@jmezach Sorry to bother you, but is a 2.7.1 release possible?

jmezach commented 3 months ago

@ErikEJ Sure thing, unfortunately I was out sick a couple of days. But I'm back now, so I'll try to get a new release out today.

jmezach commented 3 months ago

@ErikEJ Version 2.7.1 is out now

ErikEJ commented 3 months ago

Wonderful thanks!