Are you able to run the Umbraco site regardless of these errors?
I would try doing a dotnet run from the terminal inside the project that contains the Umbraco 9 website/project.
Yes the initial request of the frontend may error, but I would be curious if you are then able to browse to /umbraco backoffice and then goto the settings section and Models Builder tab to recreate the generated.cs models.
Let us know if that approach works or not and see what we can do to help get you back up and running..
Thank you for reaching back to me, I appreciate that a lot!
I tried the dotnet run and it returns a different list of errors but, pretty much the same:
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Models\SearchPage.generated.cs(23,36): error CS0246: The type or namespace name 'Page' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Extensions\PublishedContentExtensions.cs(18,23): error CS0246: The type or namespace name 'HomePage' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Extensions\PublishedContentExtensions.cs(33,55): error CS0246: The type or namespace name 'IProductComp' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Extensions\PublishedContentExtensions.cs(38,60): error CS0246: The type or namespace name 'IProductComp' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Extensions\PublishedContentExtensions.cs(43,60): error CS0246: The type or namespace name 'IProductComp' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Extensions\PublishedContentExtensions.cs(43,82): error CS0246: The type or namespace name 'IProductComp' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Extensions\PublishedContentExtensions.cs(48,49): error CS0246: The type or namespace name 'IProductComp' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Models\CategoryCollectionPage.cs(9,16): error CS0246: The type or namespace name 'CollectionPage' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Extensions\PublishedContentExtensions.cs(53,49): error CS0246: The type or namespace name 'IProductComp' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Extensions\PublishedContentExtensions.cs(53,71): error CS0246: The type or namespace name 'IProductComp' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Models\CheckoutConfirmationPage.cs(8,39): error CS0115: 'CheckoutConfirmationPage.Order': no suitable method found to override [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Models\Forside.cs(8,16): error CS0246: The type or namespace name 'SearchPage' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Models\Forside.cs(14,28): error CS0246: The type or namespace name 'CategoriesPage' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Models\ProductPage.cs(9,16): error CS0246: The type or namespace name 'CollectionPage' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Models\CheckoutReviewPage.cs(6,47): error CS0535: 'CheckoutReviewPage' does not implement interface member 'IOrderReviewPage.Order' [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\Vendr\Models\ProductPage.cs(13,28): error CS0246: The type or namespace name 'ProductVariant' could not be found (are you missing a using directive or an assembly reference?) [C:\Users\Mikes\RiderProjects\vendr_9\RSCS9\RSCS9.csproj]
dotnet :
At line:1 char:1
+ dotnet run
+ ~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
The build failed. Fix the build errors and run again.
PM>
If I ignore these errors and boot up Umbraco with the last successful build I get the following error which prevents me from accessing the backend to build the models.
Are your models in a different folder than your project is? Do you need to explicitly add a ModelsNamespace key to your appsettings.json? (I mean if it is a requirement of vendr or something, cause I'm not familiar with vendr)
I would not ignore these compile errors, they seem to break a lot of stuff here.
At first glance I guess your models aren't created yet. You might want to not compile razor before models are created.
Try to start project with <RazorCompileOnBuild>false</RazorCompileOnBuild>
<RazorCompileOnPublish>false</RazorCompileOnPublish>
If that helps running Umbraco Backoffice, rebuild your Models in ModelsBuilder tab in settings.
Otherwise exclude Vendr from project, start project to test if it works.
If so add package again, check if all references and namespaces are correct and compile without errors.
On success you should be able to run your site.
Moving to Umbraco 9 - Models fails (does not contain a definition of X)
I've installed Umbraco 9 and successfully migrated all pages from Umbraco 8 to the new version.
I have also moved all my Models to the new Umbraco 9 but they all fail as you can see in the image.
I tried to clone to Vendr Umbraco 9 version and pasted all their models (including the generated ones) to my project but they still fail.
Is it because I somehow need to rebuild the models and if so, how can I do this when I'm not able to boot into Umbraco backend?
My ModelsBuilder looks like this:
Hi MB ๐
Are you able to run the Umbraco site regardless of these errors?
I would try doing a
dotnet run
from the terminal inside the project that contains the Umbraco 9 website/project.Yes the initial request of the frontend may error, but I would be curious if you are then able to browse to /umbraco backoffice and then goto the settings section and Models Builder tab to recreate the generated.cs models.
Let us know if that approach works or not and see what we can do to help get you back up and running..
Cheers,
Warren ๐
Hi Warren,
Thank you for reaching back to me, I appreciate that a lot!
I tried the
dotnet run
and it returns a different list of errors but, pretty much the same:If I ignore these errors and boot up Umbraco with the last successful build I get the following error which prevents me from accessing the backend to build the models.
Just, out of curiosity. Could it be a setting in the .csproj file? My file looks like the:
Are your models in a different folder than your project is? Do you need to explicitly add a ModelsNamespace key to your appsettings.json? (I mean if it is a requirement of vendr or something, cause I'm not familiar with vendr)
I would not ignore these compile errors, they seem to break a lot of stuff here.
At first glance I guess your models aren't created yet. You might want to not compile razor before models are created.
Try to start project with
<RazorCompileOnBuild>false</RazorCompileOnBuild> <RazorCompileOnPublish>false</RazorCompileOnPublish>
If that helps running Umbraco Backoffice, rebuild your Models in ModelsBuilder tab in settings.
Otherwise exclude Vendr from project, start project to test if it works. If so add package again, check if all references and namespaces are correct and compile without errors.
On success you should be able to run your site.
hth
is working on a reply...