I can create the packages fine. But want clarification on best practice for creating them.
My issue is how/can you have your whole project in one package.
eg if you have *.cs files and App_Plugins you can create a package in Razor which means everything is loaded inside the dll and the end user cannot see the code. Great good solution is a step towards IP protection.
How ever how do yo then add your templates and partial views *.cshtml files without them being compiled into the dll but copied to the correct location with out creating a separate non Razor package.
It seems looking at a few packages that this is the accepted solution to have
a package (Non Razor that uses a buildTransitive) that then has a referance to a second package and it seems most people wile call it package.core (This is the Razor package).
Surly there is a way to combine these into one package.
2nd question in the buildTransitive how do you create a empty folder ie wwwroot/emptyfolder
But want clarification on best practice for creating them.
I can't comment on what best practice should be.
How ever how do yo then add your templates and partial views *.cshtml
files without them being compiled into the dll but copied to the
correct location with out creating a separate non Razor package.
Even though they are in the razor lib package, you can still copy the cshtml files to your web project using the targets file, local versions will be used instead of the ones in the dll, allowing end user to then make changes. This is what I do for my Forum package, the main templates although part of the package(for ease of maintenance) are copied to the views folder of the web project, if not then you can't register them as node templates in the web project.
2nd question in the buildTransitive how do you create a empty folder
ie wwwroot/emptyfolder
You could use a migration class to do this in code, why would you want/need to create an empty folder?
Creating packages and including all parts of project
I have been playing around with creating packages. But just stuck at on point.
I have been following this link from a previous question I asked,
https://umbraco.themediawizards.co.uk/the-grimoire/umbraco-10-razor-class-library-packages/
I can create the packages fine. But want clarification on best practice for creating them.
My issue is how/can you have your whole project in one package.
eg if you have *.cs files and App_Plugins you can create a package in Razor which means everything is loaded inside the dll and the end user cannot see the code. Great good solution is a step towards IP protection.
How ever how do yo then add your templates and partial views *.cshtml files without them being compiled into the dll but copied to the correct location with out creating a separate non Razor package.
It seems looking at a few packages that this is the accepted solution to have a package (Non Razor that uses a buildTransitive) that then has a referance to a second package and it seems most people wile call it package.core (This is the Razor package).
Surly there is a way to combine these into one package.
2nd question in the buildTransitive how do you create a empty folder ie wwwroot/emptyfolder
I can't comment on what best practice should be.
Even though they are in the razor lib package, you can still copy the cshtml files to your web project using the targets file, local versions will be used instead of the ones in the dll, allowing end user to then make changes. This is what I do for my Forum package, the main templates although part of the package(for ease of maintenance) are copied to the views folder of the web project, if not then you can't register them as node templates in the web project.
You could use a migration class to do this in code, why would you want/need to create an empty folder?
is working on a reply...