You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tested the new release with an ASP.NET Core 3.0 project, but R4MVC throws an error while generating the code. I've also tested with the AspNetSimple.NetCore3 project, but with the same result. Then I checked the source code and found out that the ReferencedAssemblyNames do not contain the Microsoft.AspNetCore.Mvc reference, nor any similar values. So this code
// Get MVC version
var mvcAssembly = compilation.ReferencedAssemblyNames
.Where(a => a.Name == "Microsoft.AspNetCore.Mvc")
.FirstOrDefault();
will always assign mvcAssembly a null value for 3.0 projects, then throw a NullReferenceException. I wonder if there is any other way to get the framework's version?
The text was updated successfully, but these errors were encountered:
I have installed the full 3.0 SDK with the Visual Studio 2019, however I also have the 2017 version installed on my machine. I've figured out that the R4Mvc tool was using the old Visual Studio instance, but I've managed to specify the proper version via the -vsi command line argument. Now it seems to be working properly.
I've tested the new release with an ASP.NET Core 3.0 project, but R4MVC throws an error while generating the code. I've also tested with the AspNetSimple.NetCore3 project, but with the same result. Then I checked the source code and found out that the
ReferencedAssemblyNames
do not contain the Microsoft.AspNetCore.Mvc reference, nor any similar values. So this codewill always assign
mvcAssembly
a null value for 3.0 projects, then throw aNullReferenceException
. I wonder if there is any other way to get the framework's version?The text was updated successfully, but these errors were encountered: