I have a web app started in .Net Core 3.1 and upgraded to NET 7 almost year ago. I use the mentioned package because I use the below routing strategy:

I need areas and subareas in my routings to a better organization. So, for have subareas working I had to build a custom RouteValueAttribute:

This was working fine in .net core 3.1, NET 5 and even in NET 7 for some time, however when I tried to publish the web app, I started facing problems due to libraries deprecation, such as:

SicotX.Business.Shared is a dependency of my project, and this dependency, also, depends on SicotX.Global, which is the place where SubAreaAttribute resides. To use these classes, RouteValueAttribute class and AttributeUsage Attribute I have to add the beforementioned package.
I'm not been able to publish, also, there's none info about the new package or relocation Microsoft will put those ones, just marked as deprecated and that's it.
Any idea about this? There's any idea on how to tackle the area management for routes by using a different strategy?
Thanks
For those running into this error, I did the following.
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
To confirm I got what I wanted, I went into the definition for the keyword Route which was previously redlined, and then I saw the following at the top of the file, which made me comfortable. Also, there may be issues with Blazor apps, but I was upgrading an old API class library project so this worked for me.
#region Assembly Microsoft.AspNetCore.Mvc.Core, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 // C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\8.0.3\ref\net8.0\Microsoft.AspNetCore.Mvc.Core.dll #endregion
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With