Skip to content

[dotnet-sdk-9.0.100-rc.2.24474.11] paint.netcore build with error "Missing partial modifier on declaration of type 'AffineTransform2DEffect3'; another partial declaration of this type exists" #43746

@Junjun-zhao

Description

@Junjun-zhao

Application Name: paint.netcore
OS: Windows 10 21H2
CPU: X64
.NET Build Number: dotnet-sdk-9.0.100-rc.2.24474.11
App & Source Location checking at:https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2264288

Verify Scenarios:
1). Windows 10 21H2 AMD64 + Default .NET 8 + 9.0.100-rc.1.24452.12 + WindowsSdkPackageVersion 10.0.26100.42: Pass
2). Windows 10 21H2 AMD64 + Default .NET 8 + 9.0.100-rc.1.24452.12 + WindowsSdkPackageVersion 10.0.26100.45: Pass
3). Windows 10 21H2 AMD64 + Default .NET 8 + 9.0.100-rc.2.24474.11 + WindowsSdkPackageVersion 10.0.26100.42: Fail
4). Windows 10 21H2 AMD64 + Default .NET 8 + 9.0.100-rc.2.24474.11 + WindowsSdkPackageVersion 10.0.26100.45: Fail

Description :
When verifying the bug [dotnet-sdk-9.0.100-rc.2.24474.11] paint.netcore build with errors about elements from Microsoft.Windows.SDK.NET are not found · Issue #43707 · dotnet/sdk (github.com), after update the WindowsSdkPackageVersion to 10.0.26100.45 as mentioned in this comment, the errors in that bug are all gone.
But we get a new build error:

CS0260 Missing partial modifier on declaration of type 'AffineTransform2DEffect3'; another partial declaration of this type exists Windows.Framework

App Repro Steps: (You can try it on the repro machine provided in devdiv bug)

The machine has dotnet-sdk-9.0.100-rc.2.24474.11 installed and add its internal feed to Nuget.config file. And the Visual Studio has native libraries like ATL, MFC installed.
1.Copy \SourceShare\paint.net to local machine
2. Open command prompt window and navigate to ...\paint.net folder.
3. Run "dotnet new globaljson" to create a global json file and make sure the dotnet-sdk-9.0.100-rc.2.24474.11 assigned:

{
  "sdk": {
    "version": "9.0.100-rc.2.24474.11"
  }
}
  1. Open "...\paint.net\TargetFramework.props" file to update the <WindowsSdkPackageVersion> to 10.0.26100.45:
    <WindowsSdkPackageVersion>10.0.26100.45</WindowsSdkPackageVersion>
  2. Open ...\paint.net\paintdotnet.sln with Visual Studio.
  3. Build the "AppVersion" project (Solution Explorer -> Solution -> Misc (it's the first item) -> AppVersion).
  4. Set the Solution Configuration to "Release"
  5. Build -> Rebuild All

Expected Result:
Build successfully except 2 arm64 related errors that we will ignore them.
image

Actual Result: (Please get the binlog and compiler log from attachment of devdiv bug), because the size is larger than 25M and can't be uploaded here)
Build failed with errors:

CS0260 Missing partial modifier on declaration of type 'AffineTransform2DEffect3'; another partial declaration of this type exists
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Windows.Framework\obj\Release\ref\PaintDotNet.Windows.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Windows.Framework\obj\Release\ref\PaintDotNet.Windows.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Windows.Framework\obj\Release\ref\PaintDotNet.Windows.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Windows.Framework\obj\Release\ref\PaintDotNet.Windows.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Windows.Framework\obj\Release\ref\PaintDotNet.Windows.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Windows.Framework\obj\Release\ref\PaintDotNet.Windows.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Windows.Framework\obj\Release\ref\PaintDotNet.Windows.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Windows.Framework\obj\Release\ref\PaintDotNet.Windows.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Windows.Framework\obj\Release\ref\PaintDotNet.Windows.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Windows.Framework\obj\Release\ref\PaintDotNet.Windows.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\UI\obj\Release\ref\PaintDotNet.UI.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\UI\obj\Release\ref\PaintDotNet.UI.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\UI\obj\Release\ref\PaintDotNet.UI.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\UI\obj\Release\ref\PaintDotNet.UI.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\UI\obj\Release\ref\PaintDotNet.UI.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\UI\obj\Release\ref\PaintDotNet.UI.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\SystemLayer\obj\Release\ref\PaintDotNet.SystemLayer.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\SystemLayer\obj\Release\ref\PaintDotNet.SystemLayer.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\SystemLayer\obj\Release\ref\PaintDotNet.SystemLayer.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\SystemLayer\obj\Release\ref\PaintDotNet.SystemLayer.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\SystemLayer\obj\Release\ref\PaintDotNet.SystemLayer.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\SystemLayer\obj\Release\ref\PaintDotNet.SystemLayer.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\SystemLayer\obj\Release\ref\PaintDotNet.SystemLayer.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\SystemLayer\obj\Release\ref\PaintDotNet.SystemLayer.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\SystemLayer\obj\Release\ref\PaintDotNet.SystemLayer.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Resources\obj\Release\ref\PaintDotNet.Resources.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Resources\obj\Release\ref\PaintDotNet.Resources.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Resources\obj\Release\ref\PaintDotNet.Resources.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Resources\obj\Release\ref\PaintDotNet.Resources.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Resources\obj\Release\ref\PaintDotNet.Resources.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Resources\obj\Release\ref\PaintDotNet.Resources.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Framework\obj\Release\ref\PaintDotNet.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Framework\obj\Release\ref\PaintDotNet.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Framework\obj\Release\ref\PaintDotNet.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Framework\obj\Release\ref\PaintDotNet.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Framework\obj\Release\ref\PaintDotNet.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Framework\obj\Release\ref\PaintDotNet.Framework.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Effects\obj\Release\ref\PaintDotNet.Effects.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Effects\obj\Release\ref\PaintDotNet.Effects.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Effects.Legacy\obj\Release\ref\PaintDotNet.Effects.Legacy.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Effects.Legacy\obj\Release\ref\PaintDotNet.Effects.Legacy.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Effects.Gpu\obj\Release\ref\PaintDotNet.Effects.Gpu.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Effects.Core\obj\Release\ref\PaintDotNet.Effects.Core.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Effects.Core\obj\Release\ref\PaintDotNet.Effects.Core.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Effects.Core\obj\Release\ref\PaintDotNet.Effects.Core.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Effects.Core\obj\Release\ref\PaintDotNet.Effects.Core.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Data\obj\Release\ref\PaintDotNet.Data.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Data\obj\Release\ref\PaintDotNet.Data.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Data\obj\Release\ref\PaintDotNet.Data.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Data\obj\Release\ref\PaintDotNet.Data.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Data\obj\Release\ref\PaintDotNet.Data.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Core\obj\Release\ref\PaintDotNet.Core.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Core\obj\Release\ref\PaintDotNet.Core.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Core\obj\Release\ref\PaintDotNet.Core.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Core\obj\Release\ref\PaintDotNet.Core.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Core\obj\Release\ref\PaintDotNet.Core.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Core\obj\Release\ref\PaintDotNet.Core.dll' could not be found
CS0006 Metadata file 'C:\Users\Test01\Desktop\paint.net\Core\obj\Release\ref\PaintDotNet.Core.dll' could not be found

Findings:
All the CS0006 error should be caused by CS0260 error which results to the projects build failed. It is also caused by codegen like #43680.

After clicking the definition from Visual Studio, it shows the "sealed class AffineTransform2DEffect3" is conflicting with source generated "partial class AffineTransform2DEffect3"
image

Dotnet Info:

.NET SDK:
 Version:           9.0.100-rc.2.24474.11
 Commit:            315e1305db
 Workload version:  9.0.100-manifests.82e6a096
 MSBuild version:   17.12.0-preview-24473-03+fea15fbd1

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\9.0.100-rc.2.24474.11\

.NET workloads installed:
There are no installed workloads to display.
Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.0-rc.2.24473.5
  Architecture: x64
  Commit:       990ebf52fc

.NET SDKs installed:
  10.0.100-rc.2.24474.11 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 9.0.0-rc.2.24474.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 9.0.0-rc.2.24473.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
 Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 9.0.0-rc.2.24474.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

@dotnet-actwx-bot @dotnet/compat

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-NetSDKArea-WindowsSDKIssues related to the Windows SDK and how it is included and managed in the .NET SDKuntriagedRequest triage from a team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions