You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-1Lines changed: 28 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,10 @@ Run `netcode-patch --help` for usage information and available options.
64
64
### MSBuild
65
65
66
66
> [!IMPORTANT]
67
-
> Due to issues with Visual Studio the MSBuild plugin is not currently working properly with it, using the CLI tool and post build event is recommended if you are using Visual Studio.
67
+
> Since Visual Studio still uses 'full' MSBuild (which is based on .NET Framework), some dependencies targeting .NET Standard 2.1
68
+
> cannot be loaded into the build host process.
69
+
> Using the CLI tool and post build event is recommended if you are using Visual Studio.
70
+
> You can use both the SDK and CLI tool depending on your build environemnt. See the example under "Usage with Visual Studio" below.
68
71
> *Alternatively you can manually run `dotnet build` from commandline if you do want to use MSBuild.*
69
72
70
73
NetcodePatcher has an MSBuild plugin that can be applied with minimal configuration.
@@ -101,6 +104,30 @@ to automatically netcode patch the project's output assemblies.
101
104
102
105
</details>
103
106
107
+
<details>
108
+
<summary>Usage with Visual Studio</summary>
109
+
110
+
If you want to support building in both environments (e.g. Visual Studio and `dotnet`) you can use CLI tool for Visual Studio builds, with a `Condition="'$(MSBuildRuntimeType)' != 'Core'"`.
111
+
112
+
```xml
113
+
<Project>
114
+
<ItemGroup>
115
+
<!-- will be automatically skipped for Visual Studio -->
116
+
<NetcodePatchInclude="$(TargetPath)" />
117
+
</ItemGroup>
118
+
<PropertyGroup>
119
+
<!-- silence the warning message that should have led you to this documentation -->
0 commit comments