Cannot locate My Surface Controller when publishing to cloud
Creating a custom surface controller and publishing as a webapp to the cloud. My models and surface controllers cannot be referenced in partial views on the cloud. Any ideas?
Umbraco Cloud comes with a git repository, you should use that one 🙂
So: build your controller code, test it. Take the dll that you've produced andb commit it to the Cloud git repository after dropping the dll into the bin folder. Push your changes from local to your Cloud project.
So maybe this is not actually Umbraco Cloud. This is the UmbracoCMS library (available from nuget) added to an empty Web MVC project. I build locally then deploy/publish it to an azure resource group.
Maybe this is the wrong way to go about it, but I do not see an option for git.
What fixed this issue for me was a Visual Studio setting to wipe out existing source files when publishing. It is a setting on Visual Studio's Azure publishing explorer.
I think the real trick was to make sure that the new surface controller was part of the visual studio project. If, as in my case, the Controller was added as part of a 3rd party Nuget library, then it may not automatically be added to the visual studio solution. So when you push the solution to Azure, that file will not be included.
Cannot locate My Surface Controller when publishing to cloud
Creating a custom surface controller and publishing as a webapp to the cloud. My models and surface controllers cannot be referenced in partial views on the cloud. Any ideas?
Make sure to commit and push the dll containing the controller to your Cloud git repository!
And if I am not using source control for this project? Is there another way to push dlls?
Umbraco Cloud comes with a git repository, you should use that one 🙂
So: build your controller code, test it. Take the dll that you've produced andb commit it to the Cloud git repository after dropping the dll into the bin folder. Push your changes from local to your Cloud project.
So maybe this is not actually Umbraco Cloud. This is the UmbracoCMS library (available from nuget) added to an empty Web MVC project. I build locally then deploy/publish it to an azure resource group.
Maybe this is the wrong way to go about it, but I do not see an option for git.
What fixed this issue for me was a Visual Studio setting to wipe out existing source files when publishing. It is a setting on Visual Studio's Azure publishing explorer.
I think the real trick was to make sure that the new surface controller was part of the visual studio project. If, as in my case, the Controller was added as part of a 3rd party Nuget library, then it may not automatically be added to the visual studio solution. So when you push the solution to Azure, that file will not be included.
is working on a reply...