Closed AlbertoMonteiro closed 4 years ago
I've changed the way to get the TF being used
using System;
using System.Reflection;
using System.Runtime.Versioning;
namespace Reflector
{
class Program
{
static void Main(string[] args)
{
var framework = Assembly
.GetEntryAssembly()
?.GetCustomAttribute<TargetFrameworkAttribute>()?
.FrameworkName;
System.Console.WriteLine(framework);
foreach (var type in typeof(Program).Assembly.GetTypes())
Console.WriteLine(type.FullName);
}
}
}
I've noticed that the filed was generated in 3.1, but with no class content, as you can see in the image below
I cannot reproduce using v0.7.43-alpha. Closing as deprecated.
In case you still experience problems @AlbertoMonteiro please reopen and provide a zip with the exact files you use.
I've followed the tutorial on readme, then I changed the netcoreapp2.1 to netcoreapp3.1, the app ran, but the class TestPassed were not generated.
My Program.cs
First run with
<TargetFramework>netcoreapp3.1</TargetFramework>
Second run with<TargetFramework>netcoreapp2.1</TargetFramework>
If I change to netcoreapp3.0 the app does not even build
Output
It is in portuguese(pt-br) but it says that the command dotnet codegen exited with code 3