Over 500 ScrollableControl Errors

Closed
0
0

I am trying to migrate from C# Winforms to Web, but I get over 500 of the following errors. Does anyone know a fix? Thanks!

Error CS0012 The type ‘ScrollableControl’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’. WisejWebDesktopApplication1 (net48) C:\Users\Shadow\source\repos\WisejWebDesktopApplication1\WisejWebDesktopApplication1\ActiveState.cs 29 N/A

  • You must to post comments
0
0

fresh wisej web application was ok after create but after update wisej3 from 3.1 to 3.5 the scrollablecontrol problem came

csproj file has already this:

<ItemGroup Condition=”‘$(TargetFramework.TrimEnd(`0123456789`))’==’net'”>
<Reference Include=”Microsoft.CSharp” />
<Reference Include=”System.Windows.Forms”><Aliases>swf</Aliases></Reference>
<Reference Include=”System.Data.DataSetExtensions” />
<Compile Remove=”Startup.cs” />
<Content Include=”Startup.cs” />
</ItemGroup>

what can i do?

  • Alaa (ITG)
    Can you attach the csproj file here?
  • You must to post comments
0
0

Hi Anthony,

You need to reference System.Windows.Froms to be used only for .NET Framework 4.8, you need to add the following lines into your .csproj file:
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))'=='net'">
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Windows.Forms"><Aliases>swf</Aliases></Reference>
<Reference Include="System.Data.DataSetExtensions" />
<Compile Remove="Startup.cs" />
<Content Include="Startup.cs" />
</ItemGroup>

Best,
Alaa

  • You must to post comments
Showing 2 results