Skip to content
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

Add refactor log docs #641

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,8 @@ EXEC (@Query)

## Reference `MSBuild.Sdk.SqlProj` from class library
The output of `MSBuild.Sdk.SqlProj` is not an assembly, but a `.dacpac`. In order to correctly reference a `MSBuild.Sdk.SqlProj` based project from a class library, the `ReferenceOutputAssembly` hint needs to be set to `False`:
```

```xml
<ItemGroup>
<ProjectReference
Include="../MyDacpacProj/MyDacpacProj.csproj"
Expand All @@ -592,5 +593,15 @@ The output of `MSBuild.Sdk.SqlProj` is not an assembly, but a `.dacpac`. In orde
```
Now, upon compilation of the class library, the relevant `.dacpac` files get copied to the output directory.

## Refactor Log support

While the SDK does not help you maintain a [refactor log](https://learn.microsoft.com/sql/ssdt/how-to-use-rename-and-refactoring-to-make-changes-to-your-database-objects), you can use an existing one during build by referring to it in your project:

```xml
<ItemGroup>
<RefactorLog Include="RefactorLog\TestProjectWithPrePost.refactorlog" />
jmezach marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>
```

## Known limitations
Since this is not an entire project system but only an MSBuild SDK we cannot provide IntelliSense for objects defined within the project. This limitation can be circumvented by connecting the SQL editor to a live database that is used for development purposes.