xdaniel00x Posted August 12, 2020 Posted August 12, 2020 Hello everyone, After I updated my server to 1.1.0-DP1-2 and converted my C# Code to that version, I got an error in console telling me: -> Starting RageZ resource.. RageZ: loading scripts.. found 6 script(s) RageZ: reading referenced assemblies.. found 7 reference(s) RageZ: compiling scripts.. /scripts/World.cs(24,28): error CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert' CS0656: Missing compiler required member 'Microsoft.CSharp.RuntimeBinder.Binder.Convert' -> /scripts/World.cs:23 Value cannot be null. (Parameter 'source') -> Error starting RageZ due compilation error(s). Exception message: Value cannot be null. (Parameter 'source') And part of the World.cs: 23: { 24: int sec = NAPI.Data.GetWorldData("second"); 25: int min = NAPI.Data.GetWorldData("minute"); 26: int hr = NAPI.Data.GetWorldData("hour"); It looks like it has problems converting it from dynamic into int. the return value of this method is dynamic: public dynamic GetWorldData(string key); But the Microsoft.Csharp.dll is in my Nuget dependencies and also as dll in my dependecies folder: 17: <assembly ref="/dependencies/Microsoft.CSharp.dll"/> 18: 19: </meta> I didn't have that problem before I upgraded to 1.1.0-DP1-2. I hope you guys can figure it out I thank you in advance
TarkLeMonde Posted August 12, 2020 Posted August 12, 2020 Hi, I'm wondering that you have this inside your meta.xml. Normaly this dll are included by the NETCore.App. Is your Project a NET Core Class Library Project?
xdaniel00x Posted August 13, 2020 Author Posted August 13, 2020 Hey, thanks for the reply. Yes it is a NET Core Class Libary Porject. Normally I won't put it in my meta.xml but I thought that could be a workaround. The Problem is that before 1.1 it worked properly. That's why I'm wondering.
Xabi Posted August 13, 2020 Posted August 13, 2020 1.1 is using .NET Core 3.1 while 0.3.7 bridge used 2.0.x, make sure you have the correct version.
TarkLeMonde Posted August 13, 2020 Posted August 13, 2020 Yes, Xabi thats right, but I think this is not the problem. It's inside since Version 1.0 and a elemtary core function. docs.microsoft.com/de-de/dotnet/csharp/programming-guide/types/using-type-dynamic xdaniel00x can you post your Project Setup please. So the csproj file. In my case it's look like <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp3.1</TargetFramework> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <RootNamespace>Test-Server</RootNamespace> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PlatformTarget>x64</PlatformTarget> <OutputPath>F:\Games\RAGEMP\server-files\dotnet\resources\roleplay\</OutputPath> </PropertyGroup> <ItemGroup> <Reference Include="Bootstrapper"> <HintPath>F:\Games\RAGEMP\server-files\dotnet\runtime\Bootstrapper.dll</HintPath> <Private>false</Private> </Reference> <Reference Include="Newtonsoft.Json"> <HintPath>F:\Games\RAGEMP\server-files\dotnet\runtime\Newtonsoft.Json.dll</HintPath> <Private>false</Private> </Reference> </ItemGroup> </Project> the next intresting think is the meta.xml... in my case meta script src="roleplay.dll" /> info name="RageMpSandbox" type="gamemode" description="metadescription" meta Next.... which folder you are using??? - bridge - dotnet This was changed too, from 0.3.7 to 1.1 And...what do you mean with Zitat converted my C# Code Do you upgraded it... so included all the changes like Client to Player or API to NAPI?? or mean this you used a script/program to do this?
xdaniel00x Posted August 13, 2020 Author Posted August 13, 2020 (edited) I will do when I'm home Edited August 13, 2020 by xdaniel00x
xdaniel00x Posted August 14, 2020 Author Posted August 14, 2020 (edited) don't ask me why but when I post my code or too much text here I get blocked from CloudFlare xd Edited August 14, 2020 by xdaniel00x
TarkLeMonde Posted August 15, 2020 Posted August 15, 2020 hehe... yes had the same problem, but found out the forum software dont like the meta.xml.😁
xdaniel00x Posted August 16, 2020 Author Posted August 16, 2020 Am 15.8.2020 um 11:34 schrieb TarkLeMonde: hehe... yes had the same problem, but found out the forum software dont like the meta.xml.😁 still have it.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now