Skip to content

Commit dd5e332

Browse files
Merge pull request #49 from FabianTerhorst/dev
Update README.md
2 parents 80a70ff + 23c5bfe commit dd5e332

File tree

1 file changed

+6
-30
lines changed

1 file changed

+6
-30
lines changed

README.md

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ resources/
2525
├── index.mjs
2626
├── client.mjs
2727
└── resource.cfg
28+
AltV.Net.Host.dll
29+
AltV.Net.Host.runtimeconfig.json
2830
server.cfg
2931
altv-server.exe
3032
```
@@ -105,32 +107,30 @@ but require full path import like ```import * as auth from 'client/auth.mjs';```
105107

106108
.NET Core SDK can be found [here](https://dotnet.microsoft.com/download). You have to install the sdk, the runtime isn't needed.
107109

108-
## Assembly setup (more control for server developers, probably better performance as well)
110+
## Setup
109111

110112
### Create a project with Visual Studio 17 (Windows)
111113

112114
* Go to "File -> New -> Project..." now the Project Wizard should appear.
113115
* In the left Column select "Installed -> Visual C# -> .NET Core".
114-
* Now select "Console Application (.NET Core)" and choose "Name", "Location" and the "Solution name".
116+
* Now select "Class Library (.NET Core)" and choose "Name", "Location" and the "Solution name".
115117
* To setup the correct NuGet Packages open the Manager under "Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution..."
116118
* Select Browse and search for AltV.Net and install the packages "AltV.Net", ("AltV.Net.Async" when you need async thread save api access)
117119
* Now go to "Project -> {Your Project Name} Properties... -> Build", here you can select the Output path where the dll should be saved.
118120

119121
To get the Resource running on the server, you have to create a "resource.cfg" file. Copy the resource.cfg, AltV.Net.dll and all other dependencied with your resource dll file to altv-server/resources/{YourResourceName}/.
120122

121-
- (For now) create empty assembly.cfg in your resource.
122123
Boilerplate AltV.Net.Example.csproj:
123124
```
124125
<Project Sdk="Microsoft.NET.Sdk">
125126
126127
<PropertyGroup>
127-
<TargetFramework>netcoreapp2.2</TargetFramework>
128-
<OutputType>Exe</OutputType>
128+
<TargetFramework>netcoreapp3.0</TargetFramework>
129129
</PropertyGroup>
130130
131131
<ItemGroup>
132132
<!--Use latest version from https://www.nuget.org/packages/AltV.Net-->
133-
<PackageReference Include="AltV.Net" Version="1.8.1" />
133+
<PackageReference Include="AltV.Net" Version="1.13.0" />
134134
</ItemGroup>
135135
136136
<!--This copies the publish directory to the resource folder which is named "my-server"-->
@@ -150,16 +150,6 @@ Boilerplate AltV.Net.Example.csproj:
150150
151151
</Project>
152152
```
153-
Program.cs
154-
```csharp
155-
namespace My.Package
156-
{
157-
internal static class Program
158-
{
159-
private static void Main(string[] args) => new MyResource().Start(args);
160-
}
161-
}
162-
```
163153
MyResource.cs
164154
```csharp
165155
using System;
@@ -184,20 +174,6 @@ namespace My.Package
184174
}
185175
```
186176

187-
## Class Library setup (less control for server developers (don't support mysql))
188-
189-
### Create a project with Visual Studio 17 (Windows)
190-
191-
* Go to "File -> New -> Project..." now the Project Wizard should appear.
192-
* In the left Column select "Installed -> Visual C# -> .NET Core".
193-
* Now select "Class Library (.NET Core)" and choose "Name", "Location" and the "Solution name".
194-
* To setup the correct NuGet Packages open the Manager under "Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution..."
195-
* Select Browse and search for AltV.Net and install the packages "AltV.Net", ("AltV.Net.Async" when you need async thread save api access)
196-
* Now go to "Project -> {Your Project Name} Properties... -> Build", here you can select the Output path where the dll should be saved.
197-
198-
To get the Resource running on the server, you have to create a "resource.cfg" file. Copy the resource.cfg, AltV.Net.dll and all other dependencied with your resource dll file to altv-server/resources/{YourResourceName}/.
199-
200-
201177
### Events
202178

203179
There is currently a single limitation that dictionaries aren't working in windows but on linux.

0 commit comments

Comments
 (0)