Jump to content
  • 0

Error server when development, edit source code??


nvh

Question

I want to add a new random stat for item, but get this error. please help me

a640f629112d97d68b4646a9cd9830f9.png

 

line code when debug server.exe

line code when debug server.exe

public ICollection<string> PendingMigrations =>
            Database?.GetPendingMigrations()?.ToList() ?? new List<string>();

maybe because the database. I don't know how to fix it!! thank you!

 

Link to comment
Share on other sites

Recommended Posts

  • 0
3 minutes ago, Cheshire said:

Right, in that case using the Add-Migration command should do fine like this:

 

Add-Migration -Context GameContext AddRandomStatToItems

 

Then switch back to debug mode and compile/run as usual and it should upgrade your database.

"Set startup project to Intersect Server, and the build type to NoFody" 

Do I need to do this?

Link to comment
Share on other sites

  • 0
9 minutes ago, Cheshire said:

Right, in that case using the Add-Migration command should do fine like this:

 

Add-Migration -Context GameContext AddRandomStatToItems

 

Then switch back to debug mode and compile/run as usual and it should upgrade your database.

this build failed. 

Link to comment
Share on other sites

  • 0
7 minutes ago, nvh said:

"Set startup project to Intersect Server, and the build type to NoFody" 

Do I need to do this?

 

Yes, follow the steps as usual.

 

2 minutes ago, nvh said:

this build failed. 

 

Might need a bit more info, sorry. lol

Link to comment
Share on other sites

  • 0
Just now, Cheshire said:

The reason it's failing would be a primary suspect.

Spoiler

Severity    Code    Description    Project    File    Line    Suppression State
Error        Fody: No weavers found for the configuration entries Costura. Add the desired weavers via their nuget package.    Intersect.Client            
Severity    Code    Description    Project    File    Line    Suppression State
Error        The build restored NuGet packages. Build the project again to include these packages in the build.    Intersect.Editor    E:\DuAnGame\Intersect\TV(Delop)\Intersect-Engine-main\Intersect.Editor\Intersect.Editor.csproj    896    


 

Link to comment
Share on other sites

  • 0
3 minutes ago, Cheshire said:

Does it work now that it has restored Nuget packages?

when rebuild all solution with nofody.

 

only 1 error. 1 error left

Severity	Code	Description	Project	File	Line	Suppression State
Error		The build restored NuGet packages. Build the project again to include these packages in the build.	Intersect.Editor	E:\DuAnGame\Intersect\TV(Delop)\Intersect-Engine-main\Intersect.Editor\Intersect.Editor.csproj	896	

 

Link to comment
Share on other sites

  • 0
32 minutes ago, Cheshire said:

Right, in that case using the Add-Migration command should do fine like this:

 

Add-Migration -Context GameContext AddRandomStatToItems

 

Then switch back to debug mode and compile/run as usual and it should upgrade your database.

restart Visual Studio. It's work

Link to comment
Share on other sites

  • 0
3 minutes ago, Cheshire said:

Cool! Migrations are a bit tricky to work with the first time but when you've got it set up they're pretty convenient!

Today is a great day to have you! thank you

I will take a break to continue tomorrow

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...