nvh Posted July 13, 2021 Share Posted July 13, 2021 I want to add a new random stat for item, but get this error. please help me  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 More sharing options...
0 nvh Posted July 14, 2021 Author Share Posted July 14, 2021 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 More sharing options...
0 nvh Posted July 14, 2021 Author Share Posted July 14, 2021 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 More sharing options...
0 Cheshire Posted July 14, 2021 Share Posted July 14, 2021 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 More sharing options...
0 nvh Posted July 14, 2021 Author Share Posted July 14, 2021 1 minute ago, Cheshire said: Â Yes, follow the steps as usual. Â Â Might need a bit more info, sorry. lol sorry, i don't know what info :)) Link to comment Share on other sites More sharing options...
0 Cheshire Posted July 14, 2021 Share Posted July 14, 2021 The reason it's failing would be a primary suspect. Link to comment Share on other sites More sharing options...
0 nvh Posted July 14, 2021 Author Share Posted July 14, 2021 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 More sharing options...
0 Cheshire Posted July 14, 2021 Share Posted July 14, 2021 Does it work now that it has restored Nuget packages? Link to comment Share on other sites More sharing options...
0 nvh Posted July 14, 2021 Author Share Posted July 14, 2021 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 More sharing options...
0 Cheshire Posted July 14, 2021 Share Posted July 14, 2021 Could you manually restore nuget packages and then restart visual studio before trying again? It shouldn't do that. Link to comment Share on other sites More sharing options...
0 nvh Posted July 14, 2021 Author Share Posted July 14, 2021 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 More sharing options...
0 Cheshire Posted July 14, 2021 Share Posted July 14, 2021 Cool! Migrations are a bit tricky to work with the first time but when you've got it set up they're pretty convenient! nvh 1 Link to comment Share on other sites More sharing options...
0 nvh Posted July 14, 2021 Author Share Posted July 14, 2021 Is this worrisome? Link to comment Share on other sites More sharing options...
0 nvh Posted July 14, 2021 Author Share Posted July 14, 2021 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 More sharing options...
0 Cheshire Posted July 14, 2021 Share Posted July 14, 2021 3 minutes ago, nvh said: Is this worrisome? Â Not really, just means it generated a brand new configuration file. I'm guessing you didn't have anything in the folder the server runs from there. nvh 1 Link to comment Share on other sites More sharing options...
Question
nvh
I want to add a new random stat for item, but get this error. please help me
Â
line code when debug server.exe
maybe because the database. I don't know how to fix it!! thank you!
Â
Link to comment
Share on other sites
39 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now