Replies: 2 comments 1 reply
-
Does the same code work with .NET Framework 4.8? Could you create a minimal repro on GH (if possible with a failing GH action build)? |
Beta Was this translation helpful? Give feedback.
-
I had trouble getting it to work with the "old-style" csproj format, so I converted it to the newer SDK project format: TestWebApplication1-master.zip. This way, Mapperly works without issues. Changing the target framework to .NET 4.7.2 should also work. It seems like hooking up Mapperly in "old-style" csproj formats is much more difficult (is it even supported?). Sadly, I couldn't find more information on how to accomplish this. But since the newer SDK format is easier and much more compact, I would suggest everyone to just switch to the new format. To clarify, with "old-style" csproj formats, I mean this: <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{49C6A4B3-8FB9-468B-BEC9-00047A05F0E9}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ClassLibrary1</RootNamespace>
<AssemblyName>ClassLibrary1</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<!-- Many more lines omitted -->
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
</Project> And the more compact SDK style format: <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<LangVersion>9</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Riok.Mapperly" Version="3.6.0" PrivateAssets="all" />
</ItemGroup>
</Project> |
Beta Was this translation helpful? Give feedback.
-
Hello, I have been trying to integrate Mapperly to a .Net Framework 4.7.2 project and I am running into issues. I have modified the project to force it to use C# 9.0 and added roslyn 4.4 nuget package to the project but i have no luck. I keep getting the error - CS0757 A partial method may not have multiple implementing declarations. Was anyone successful with integrating Mapperly with a .Net framework 4.7.2?
I have replicated the exact same code in a .Net 6.0 application, and I have no issues. It works fine.
Beta Was this translation helpful? Give feedback.
All reactions