No analysis results after running inline analysis
class Program
{
int inli(string f)
{
return int.Parse(f);
}
int ninli(string f)
{
try
{
return int.Parse(f);
}
catch (Exception e)
{
return 0;
}
}
void Main(string[] args)
{
inli("s");
ninli("h");
}
}
<OutputType>Library</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
the configuration of inlining analyzer has not been modified.
when the output window outputs finished inlining analyzer, there is no change on the code view.
so, I want to know what I missed.
thanks
I think I can reproduce the issue. Looks like a bug with the handling of multiple installed .Net Core versions. I don't have a fix yet, need to investigate this further.
I am experiencing the same issue, but want to try the extension still. Do you think nuking Core runtimes and SDKs for good is a viable workaround?
I could get it to work with 2.x runtimes, but not with 3.1, so this is something you could try:
Open "Tools" -> "Inlining Analyzer" -> "Options" and specify a ".NET Core Version". This is the explicit runtime version the analyzer will be run with. 2.1.14 worked for me, while 3.1.0 didn't. I guess a 2.2.x and possibly 3.0.x should work as well if you have it installed (see dotnet --info).
I didn't get around to investigate why 3.1 doesn't work yet.
Thank you! That (setting .NET Core version to 2.1.14) solved the issue.
I fixed this problem by setting .net core version to 2.1.5
My .net core framework is 2.1.0, but when I specify 2.1.0, I will be prompted with an error: the specified framework 'Microsoft. NETCORE. App', version '2.1.0' was not found.
It does look like an error caused by inconsistent versions of .net core.
Are you sure you have a 2.1.0 runtime installed? You can check which runtimes you have by running dotnet --info and look for all "Microsoft.NetCore.App" versions. These are the ones you can specify in the Inlining Analyzer options.