Base solution for your next web application

Activities of "amrsaafan"

Answer

Hi,

After creating the migration branch from dev branch , yes AppVersionHelper is 10.2 , but after copy my existing project to the migration brnach, the version became 10.1 because AppVersionHelper at my existing project is 10.1

The documentation is saying: Copy your existing project's source code to the migration branch

Question

Hi,

I am using this article to aspnetzero version https://docs.aspnetzero.com/en/common/latest/Version-Updating

I have an existing project, so I followed this section :

• First, create a new repository • Create an empty project from AspNet Zero website using your existing project name but select the version when you started development for your project. If you don't remember the initial AspNet Zero version you have started your project, you can check [*.Core/AppVersionHelper.cs]. • Add downloaded source code to your new repository and push to master branch. • Create a branch named dev from master branch. • Create two branches named aspnetzero and migrate from dev branch. • Copy your existing project's source code to migrate branch. • Switch to dev branch and update it from migrate branch. In this step, you will face conflicts. You have to resolve those conflicts manually.

at the last point I use : $ git checkout dev $ git merge migrate

and it comes back will all changes from migrate to dev branch, BUT it also overrides dev branch.

AppVersionHelper at dev branch before the update from migrate branch

AppVersionHelper at dev branch after update from migrate branch So, I think there is no Upgrade done after following the documentation !

Thanks, Amr Saafan https://www.nilebits.com/

HI @ismcagdas,

1-yes I am running the Migrator.exe after publishing it. 2- no the log4net.config file is there in the root folder as the exe file

Hello,

I am configuring aspnetzero project on Azure DevOps CI/CD Pipelines I am tring to run the Migrator.exe file but I am getting this error:

2020-12-28T15:21:29.2264374Z ##[section]Starting: Migrator 2020-12-28T15:21:29.2443195Z ============================================================================== 2020-12-28T15:21:29.2443556Z Task : Command Line 2020-12-28T15:21:29.2443800Z Description : Run a command line with arguments 2020-12-28T15:21:29.2444035Z Version : 1.1.3 2020-12-28T15:21:29.2444267Z Author : Microsoft Corporation 2020-12-28T15:21:29.2444595Z Help : More Information 2020-12-28T15:21:29.2444952Z ============================================================================== 2020-12-28T15:21:29.2526635Z ##[command]path\myCI\migrator\my.Migrator.exe -s 2020-12-28T15:21:33.8986190Z Unhandled exception. System.IO.FileNotFoundException: Could not find file 'path\log4net.config'. 2020-12-28T15:21:33.8986844Z File name: 'pathlog4net.config' 2020-12-28T15:21:33.8987187Z at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle) 2020-12-28T15:21:33.8988077Z at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options) 2020-12-28T15:21:33.8988552Z at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) 2020-12-28T15:21:33.8989267Z at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 2020-12-28T15:21:33.8989604Z at System.IO.File.OpenRead(String path) 2020-12-28T15:21:33.8989903Z at Abp.Castle.Logging.Log4Net.Log4NetLoggerFactory..ctor(String configFileName) 2020-12-28T15:21:33.8990193Z at lambda_method1(Closure , Object[] ) 2020-12-28T15:21:33.8990525Z at Castle.Core.Internal.ReflectionUtil.Instantiate(ConstructorInfo ctor, Object[] ctorArgs) 2020-12-28T15:21:33.8990932Z at Castle.Core.Internal.ReflectionUtil.Instantiate[TBase](Type subtypeofTBase, Object[] ctorArgs) 2020-12-28T15:21:33.8991346Z at Castle.Core.Internal.ReflectionUtil.CreateInstance[TBase](Type subtypeofTBase, Object[] ctorArgs) 2020-12-28T15:21:33.8991786Z at Castle.Facilities.Logging.LoggingFacility.CreateProperLoggerFactory(LoggerImplementation loggerApi) 2020-12-28T15:21:33.8992190Z at Castle.Facilities.Logging.LoggingFacility.ReadConfigurationAndCreateLoggerFactory() 2020-12-28T15:21:33.8992518Z at Castle.Facilities.Logging.LoggingFacility.Init() 2020-12-28T15:21:33.8992931Z at Castle.MicroKernel.Facilities.AbstractFacility.Castle.MicroKernel.IFacility.Init(IKernel kernel, IConfiguration facilityConfig) 2020-12-28T15:21:33.8993339Z at Castle.MicroKernel.DefaultKernel.AddFacility(IFacility facility) 2020-12-28T15:21:33.8993664Z at Castle.MicroKernel.DefaultKernel.AddFacility[T](Action1 onCreate) 2020-12-28T15:21:33.8994006Z at Castle.Windsor.WindsorContainer.AddFacility[T](Action1 onCreate) 2020-12-28T15:21:33.8994406Z at my.Migrator.Program.Main(String[] args) in path\src\my.Migrator\Program.cs:line 22 2020-12-28T15:21:38.0688578Z ##[error]Process completed with exit code -532462766. 2020-12-28T15:21:38.0716340Z ##[section]Finishing: Migrator

any ideas?

Thanks, Amr Saafan https://www.nilebits.com/

Hello,

I would like to show a message to the user telling him that we lost connection to SignalR Server and we are connected again to SignalR server. I can see in this script file abp.signalr-client.js tryReconnect method is logging this message but I can't modify this script file because it will be overwritten when I publish.

So, the question is how to extend the functionality of SignalR to know when it is disconnected and reconnected.

Regards, Amr Saafan https://www.nilebits.com/

Hello,

https://docs.aspnetzero.com/en/aspnet-core-angular/latest/ website is down. When it will be back online again?

Regards, Amr Saafan https://www.nilebits.com/

Thank you @ismcagdas for your reply but this only answer one of my questions which is where but what about my other questions?

Yes how can I do that? is there an example of how to do this? how to reflect the assembly and what about the naming rules? is it related to the assembly name or the types names?

I already did research and I think this is the code you are talking about: var assemblies = AppDomain.CurrentDomain.GetAssemblies(); configuration.AddMaps(assemblies);

This works only for AutoMapper.Profile definitions and classes decorated with AutoMapper.AutoMapAttribute. But the legacy code that exisits in version 6.0, is not having profiles or AutoMapAttribute.

How can we do the assembly scan in this case?

Thanks, Amr Saafan https://www.nilebits.com/

Yes how can I do that? is there an example of how to do this? how to reflect the assembly and what about the naming rules? is it related to the assembly name or the types names?

Thanks, Amr Saafan https://www.nilebits.com/

Hello,

I am doing a migration from version 6.0 to version 8.6, I know that

AutoMapper.Mapper.Map<entityX, entityXDto>(result);

is no longer working and you have to use this instead:

ObjectMapper.Map<entityXDto>(result);

but in the run time when I call this line

ObjectMapper.Map<entityXDto>(result);

I get this error: Error mapping types. AutoMapper.AutoMapperMappingException: Error mapping types. AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.

The fix is to create a map in CustomDtoMapper

configuration.CreateMap<entityX, entityXDto>();

Now I have like hundreds of mapping in my application and I want a dynamic way to do the mapping instead of create a custom map for each type which will take forever to do.

Thank you, Amr Saafan https://www.nilebits.com/

Hello,

We faced lots of build errors on Visual Studio CI/CD for .net core project but this is our last error and we can't figure it out. Our project is based on .net core v1.1 and the last error asked us to upgrade to .net core v2.0 and we did that. All of the CI steps are succeed expect dotnet ef migrations:

This is error message:

Method 'get_Properties' does not have an implementation. in type 'Microsoft.Extensions.Configuration.ConfigurationBuilder' from assembly 'Microsoft.Extensions.Configuration, Version=1.1.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

Note: The project is building local machine and on Visual Studio CI [attachment=0:1zkwv4n0]1.png[/attachment:1zkwv4n0]

Showing 1 to 10 of 28 entries