Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sator-imaging committed Jul 14, 2024
1 parent f194b85 commit fd4c446
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,48 @@
# What's `Csproj.Sdk`?

`Csproj.Sdk` is msbuild's SDK package that can be used for `.csproj` file to migrate legacy-style project to newer SDK-style format.
`Csproj.Sdk` is msbuild's SDK package collection that can be used for `.csproj` file to migrate legacy-style project to newer SDK-style format.

[![Csproj.Sdk.Void](https://img.shields.io/nuget/v/csproj.sdk.void?label=Csproj.Sdk.Void)](https://www.nuget.org/packages/Csproj.Sdk.Void/)



# How to Migrate `.csproj` to SDK-Style

To migrate, use `Csproj.Sdk.Void` as an SDK for your `.csproj`.
For example, use `Csproj.Sdk.Void` as an SDK for your `.csproj`.

```xml
<Project Sdk="Csproj.Sdk.Void/1.0.0">
<Project Sdk="Csproj.Sdk.Void/1.0.1">
...
... original file contents except for <Project> tag ...
...
</Project>
```

> [!NOTE]
> Version prefix (`/1.0.0`) must be specified to activate internal nuget resolver.
> Version prefix (`/1.0.1`) must be specified to activate internal nuget resolver.
This will allow setting nullability for whole project by adding `<Nullable>enable</Nullable>` to .csproj.
This will make project sdk-style and allow setting nullability for whole project by adding `<Nullable>enable</Nullable>` to .csproj.
Surprisingly, nullability setting is not recognized by Visual Studio if `Project` tag doesn't have `Sdk` attribute!!

See: [\<Nullable> has no effect in old-style csproj](https://github.com/dotnet/project-system/issues/5551)



# Available SDKs

## `Csproj.Sdk.Void`

[src/Csproj.Sdk.Void/](src/Csproj.Sdk.Void/)

This SDK will not do anything, is just for converting legacy-style project to sdk-style.


## `Csproj.Sdk.Unity.VisualStudio`

T.B.D.



# Unity Integration

To migrate Unity project to sdk-style format, see [Unity/README.md](Unity/README.md)
Expand Down

0 comments on commit fd4c446

Please sign in to comment.