MrAdvice icon indicating copy to clipboard operation
MrAdvice copied to clipboard

Failed to emit module

Open wuliwux opened this issue 4 years ago • 4 comments

Hi, when MrAdvice is installed in: netcoreapp3.1 and an Aspect is active. no LIVE sourcecode changes are possible.

Error: CS7038 Failed to emit module 'ConsoleApp2': Changing the version of an assembly reference is not allowed during debugging: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' changed version to '2.1.0.0'.

Build Log: Build started... 1>------ Build started: Project: ConsoleApp2, Configuration: Debug Any CPU ------ 1>MrAdvice 2.9/.NETCoreApp,Version=v5.0 weaved module 'ConsoleApp2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' (targeting framework ) in 196ms 1>ConsoleApp2 -> D:\tmp\MrAdvice\ConsoleApp2\bin\Debug\netcoreapp3.1\ConsoleApp2.dll ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Project File:

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.1</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="MrAdvice" Version="2.9.0" />
  </ItemGroup>
</Project>

thanks for help and best regards!

wuliwux avatar May 12 '21 12:05 wuliwux

What is the problem? Live debug or the fact that something changes .NET standard target?

picrap avatar May 12 '21 13:05 picrap

In debug mode you change the source and save the changes, this error occurs.

wuliwux avatar May 12 '21 15:05 wuliwux

This probably can not be fixed, but I’ll take a desperate look.

picrap avatar May 12 '21 15:05 picrap

Sorry, I don’t know how to fix this. Recent changes have been made, not sure they help anyway.

picrap avatar Sep 17 '21 20:09 picrap