ArxOne / MrAdvice

.NET aspect weaver (build task under NuGet package)
MIT License
308 stars 45 forks source link

Failed to emit module #171

Open wuliwux opened 3 years ago

wuliwux commented 3 years ago

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!

picrap commented 3 years ago

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

wuliwux commented 3 years ago

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

picrap commented 3 years ago

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

picrap commented 2 years ago

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