This works like a charm :) and its so frackin nice.
But when i then build my project and reloads a page it conflicts because its both in my web.dll(my web project is just named web) and also in my Models folder.
The error im getting is :
The type 'Umbraco.Web.PublishedContentModels.Forloeb' exists in both 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\d96a5e92\63a282db\assembly\dl3\9f27e43d\d7e6839f_cd73d101\Web.DLL' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\d96a5e92\63a282db\App_Web_all.generated.cs.8f9494c4.72tsgyk8.dll'
So i tried looking around and found out that i could set the ModelsBuilder to "Dll" mode in the web.config(i also removed the reference in my proj to the models folder) but now my views dosnt recognize the models.
With PureLive models, the views know about the models and that is all, you cannot use the models in Visual Studio ie have Intellisense. If you include the models in your VS solution, they are basically compiled and included twice: once in the solution, and once by PureLive.
If you do want Intellisense and the like, you want to move to eg Dll models which require that you explicitely generate models (button in the content type editor) and creates a DLL in ~/bin that you can then reference from Visual Studio.
Because it is referenced it is visible but not compiled again, so everything should work.
I am experiencing a similar problem on my live server.
I think the problem was caused by me changing the web.config
from Dll to PureLive.
To avoid this, do I have do delete the .dll in the bin?
Compiler Error Message: CS0433: The type 'Umbraco.Web.PublishedContentModels.Newsliste' exists in both 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\29c117be\c72cde02\AppWeball.generated.cs.8f9494c4.egkmkp-u.dll' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\29c117be\c72cde02\assembly\dl3\28db64f5\51e05a32_4c2ed401\Umbraco.Web.PublishedContentModels.DLL'
Modelsbuilder The type exists in both web.dll and temporary
Hey :)
I just started a new 7.4.1 project where i want to use the new buildin Modelsbuilder. But im seeing a pattern of errors i cannot get by.
So in my web.config its set to PureLive so that the appData/Models is being populated.
In my visual studio project i have included the Models.generated som that I in my views can inherit something like :
This works like a charm :) and its so frackin nice.
But when i then build my project and reloads a page it conflicts because its both in my web.dll(my web project is just named web) and also in my Models folder.
The error im getting is :
So i tried looking around and found out that i could set the ModelsBuilder to "Dll" mode in the web.config(i also removed the reference in my proj to the models folder) but now my views dosnt recognize the models.
Am i doing it wrong or ?
You are doing it wrong ;-)
With PureLive models, the views know about the models and that is all, you cannot use the models in Visual Studio ie have Intellisense. If you include the models in your VS solution, they are basically compiled and included twice: once in the solution, and once by PureLive.
If you do want Intellisense and the like, you want to move to eg Dll models which require that you explicitely generate models (button in the content type editor) and creates a DLL in ~/bin that you can then reference from Visual Studio.
Because it is referenced it is visible but not compiled again, so everything should work.
Hi Stephen,
I am experiencing a similar problem on my live server. I think the problem was caused by me changing the web.config from Dll to PureLive. To avoid this, do I have do delete the .dll in the bin?
Compiler Error Message: CS0433: The type 'Umbraco.Web.PublishedContentModels.Newsliste' exists in both 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\29c117be\c72cde02\AppWeball.generated.cs.8f9494c4.egkmkp-u.dll' and 'c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\29c117be\c72cde02\assembly\dl3\28db64f5\51e05a32_4c2ed401\Umbraco.Web.PublishedContentModels.DLL'
Thanks
ARh Stephen you are marvelous ! :D
Now it works.
Shifted to Dll mode, referenced the dll, clean/build and boom it works :=)
is working on a reply...