LordFenris

Member
I am asking for advice from people experienced in ServUO.
With the new server build engine mechanism (compilator), we encountered numerous problems with custom files - which had not occurred before. I mean the current state # 4835 - compared to the version before the compiler mechanics changes.
One problem with a error refers to the custom Sickness system available here - https://www.servuo.com/threads/sickness-sys-20.12761/.

Custom\SicknessSys\ScreenTarget.cs(29,28): error CS0234: The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) [C:\ServerUO\UOMGGameTEST\Scripts\Scripts.csproj]
Custom\SicknessSys\ScreenTarget.cs(29,50): error CS0234: The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) [C:\ServerUO\UOMGGameTEST\Scripts\Scripts.csproj]

I talked about this yesterday with the author of this system - GoldDraco13, who suggested adding a line in the Data / Assemblies.cfg file
System.Windows.Forms.dll

It turns out, however, that this line is contained there. Unfortunately, he has no idea what other element in the changed compilation mechanism may cause the collision and the indicated error. He himself stopped at Publish 57.

Could I ask you to have a look at the attached file and the problematic line, maybe - you will find in a solution.
 

Attachments

  • ScreenTarget.cs
    8.2 KB · Views: 3
So, I solved this problem myself.
I added inside script.csproj file in the ItemGroup section a line
<Reference Include="System.Windows.Forms" />
Now build was completed sucessfuly.
 
Last edited:
Hopefully some one can help! Frustrating to say the least

It is frustrating when things are changed/removed for no reason, but on top of that, it is frustrating to be expected to keep up to the repo. I for one will not keep my systems up to the latest repo, my systems will always be updated on official releases! If you want to keep up to repos, then make sure you are willing to make changes yourself!
 
So, I solved this problem myself.
I added inside script.csproj file in the ItemGroup section a line
<Reference Include="System.Windows.Forms" />
Now build was completed sucessfuly.
Script.csproj, in the script folder, was changed few days ago. I cannot see any name of cs files now.
Could you tell me please how to insert the line?
 
Here is my current scripts.csproj with Forms update

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net48</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<ServerGarbageCollection>true</ServerGarbageCollection>
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RootNamespace>Server</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>NEWTIMERS;ServUO</DefineConstants>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Server\Server.csproj" />
<ProjectReference Include="..\Ultima\Ultima.csproj" />
</ItemGroup>

<ItemGroup>
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
</Project>
 
script.csprog is basically the new assembly, am I understanding this right? Is the old assembly even used in the newest repo of ServUO?
 

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back