{"id":57,"date":"2020-09-22T18:33:00","date_gmt":"2020-09-22T23:33:00","guid":{"rendered":"https:\/\/cynthiamcmahon.ca\/blog\/index.php\/2020\/09\/project-migration\/"},"modified":"2020-09-22T18:33:00","modified_gmt":"2020-09-22T23:33:00","slug":"project-migration","status":"publish","type":"post","link":"https:\/\/cynthiamcmahon.ca\/blog\/2020\/09\/project-migration\/","title":{"rendered":"Project Migration"},"content":{"rendered":"<p>Today I migrated my Shadow Monsters from MonoGame 3.7.1 to 3.8. I ended up having to create a new user profile to do it. It&#8217;s because of a bug in MonoGame 3,8 where if there is a space in the folder name the content builder is in it breaks. I used my full name so there was a space.<\/p>\n<p>After I had a working profile and could run a test game it was time to migrate. The recommended process is to create a new project then copy over your .csproj files. I ended up going a different route. I decide that because everything was in one project and I wanted to reuse the code in other projects to split the project in two. I created a new project. I added all of the GameStates from the old project to the game and replaced the Game1 class with that. I created a new .NET Library and added the NuGet Packaages for MonoGame.Framework.DesktopGL and MonoGame.Framework.Content.Pipeline because I use the intermediate serializer for some custom content. I then added all of the other .cs files to this project. I added a reference for the library to the project. Then I needed to fix the bugs from splitting the solution but I got it working.<\/p>\n<p>I have a custom tool that I use for building sprites. I added that project to the solution but when adding a reference for the library Visual Studio complained that .NET 4.7.1 cannot reference .NET Core 3,1, which MonoGame 3.8 is built with. Fortunately there is a workaround that was introduced in Visual Studio 2017. That is a project can target multiple frameworks. This isn&#8217;t a perfect solution because there are differences between the different frameworks but I got it to work by targeting Core 3.0 and Standard 2.0.<\/p>\n<p>That was my adventure for today. I&#8217;m happy with the end result and look forward to working with MonoGame 3.8.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I migrated my Shadow Monsters from MonoGame 3.7.1 to 3.8. I ended up having to create a new user profile to do it. It&#8217;s because of a bug in MonoGame 3,8 where if there is a space in the folder name the content builder is in it breaks. I used my full name so &hellip; <\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-57","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/cynthiamcmahon.ca\/blog\/wp-json\/wp\/v2\/posts\/57","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cynthiamcmahon.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cynthiamcmahon.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cynthiamcmahon.ca\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cynthiamcmahon.ca\/blog\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":0,"href":"https:\/\/cynthiamcmahon.ca\/blog\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"wp:attachment":[{"href":"https:\/\/cynthiamcmahon.ca\/blog\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cynthiamcmahon.ca\/blog\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cynthiamcmahon.ca\/blog\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}