Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How to add console application #5310


User avatar
0
xmarwin created

Hello. For our project we need import old data from MySQL database, so I have created new console application and added it among the projects. I have entered the AspZeroLicenseCode to my appsettings.json. Unfortunately I'm unable to start it, because it complains incorrect project name:

Failed to validate project name. Should not rename a project downloaded from aspnetzero.com.

Here is my solution structure:

What exactly are the rules that are being checked (regarding the project name)?

Thanks, Martin


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Have you set the license code in the PreInitialize method of your Adel.Portal.MigrateMySql project's module ?

    It must be set like this;

    public override void PreInitialize()
    {
    	// Other code blocks
    	
    	Configuration.Modules.AspNetZero().LicenseCode = _appConfiguration["AbpZeroLicenseCode"];
    	
    	// Other code blocks
    }
    
  • User Avatar
    0
    xmarwin created

    Hello. Thanks for quick reply. At the end it turned out that my appsettings.json file was configured not to copy to Debug folder, so the AbpZeroLicenseCode was always null. Thanks, Martin

  • User Avatar
    0
    alper created
    Support Team

    thanks for your feedback ;)