Installing on server: The type or namespace ... does not exist in the namespace 'Umbraco.Web.PublishedModels'
Hi folks,
after developing a basic site locally (in VS 2019, Umbraco via NuGet) I'm trying to install Umbraco on a server. Locally everything works fine.
On the server I'm facing several problems.
Trying to show the site itself I'm getting the error:
The type or namespace name 'Homepage' does not exist in the namespace 'Umbraco.Web.PublishedModels'
Backoffice works at first glance, but on certain pages I get:
Request error: The URL returned a 404 (not found): /[MySite]/umbraco/backoffice/UmbracoApi/ContentType/GetPropertyTypeScaffold
and
No list view data type was found for this document type, ensure that the default list view data types exists and/or that your custom list
view data type exists
Are those files with the generated models part of your solution? If they are not part of your solution they won't get deployed. Find those first and add them to your solution. If you haven't changed anything you should find them by searching this file: models.generated.cs in your solution folder. Take all the files in the same folder where that one is, you will need them all, include them in your package to be deployed.
Now I get the following error when starting the site:
Compiler Error Message: CS0433: The type 'Homepage' exists in both 'App_Web_all.generated.cs.8f9494c4.chdfy6q3, Version=0.0.0.1,
Culture=neutral, PublicKeyToken=null' and 'CostaVerde,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
...
Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files\vs\90fe5919\ca1ff65\App_Web_homepage.cshtml.65a2d1ee.9bwocvkm.0.cs
Line: 42
Installing on server: The type or namespace ... does not exist in the namespace 'Umbraco.Web.PublishedModels'
Hi folks,
after developing a basic site locally (in VS 2019, Umbraco via NuGet) I'm trying to install Umbraco on a server. Locally everything works fine.
On the server I'm facing several problems.
Trying to show the site itself I'm getting the error:
Backoffice works at first glance, but on certain pages I get:
and
followed by a long stack trace.
What I did:
Following this and this thread
I changed
to this line
in the web.config.
Now I get
So, it doesn't work this way.
ModelsBuilder is installed.
Database connection works.
Any ideas how to solve this seemingly very basic problem?
Thanks in advance!
Peter
Hi Peter,
Are those files with the generated models part of your solution? If they are not part of your solution they won't get deployed. Find those first and add them to your solution. If you haven't changed anything you should find them by searching this file: models.generated.cs in your solution folder. Take all the files in the same folder where that one is, you will need them all, include them in your package to be deployed.
Let me know if you have further issues.
Thanks, bronzewind, for your help.
Good idea. I did it.
But now: it's not possible to build the project since we have a lot of "already declared" errors.
I excluded all other files from the App_Data folder. Almost all dublicate-errors are gone.
Except: //[assembly:System.Reflection.AssemblyVersion("0.0.0.6")]
I commented this line out.
Now I get the following error when starting the site:
...
I got the solution.
1.) The Database was not correctly installed. I had a lower SQL Server Version on my server as locally. So I followed this way:
https://stackoverflow.com/a/30593611
and it works.
2.) As described here:
https://our.umbraco.com/forum/using-umbraco-and-getting-started/87333-in-general-what-files-folders-can-be-excluded-when-publishing-umbraco#comment-276920
I excluded the whole App_Data folder (as I did at first) from my project. Otherwise it's not possible to build the solution.
is working on a reply...