One or more compilation references may be missing
# help-with-umbraco
d
When I run a new instance of UmBootstrap from dotnet new I get:
Copy code
An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately.
Generated Code
One or more compilation references may be missing. If you're seeing this in a published application, set 'CopyRefAssembliesToPublishDirectory' to true in your project file to ensure files in the refs directory are published.

The type or namespace name 'Home' does not exist in the namespace 'Umbraco.Cms.Web.Common.PublishedModels' (are you missing an assembly reference?)
+
    public class Views_Home : Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.Home>
I have added:
Copy code
<!-- Referenced assemblies (DLLs) will be copied to the publish directory when you build and publish your Umbraco project -->
    <CopyReferencedAssembliesToPublishDirectory>true</CopyReferencedAssembliesToPublishDirectory>
As instructed by the error message but I still get the same error. A full import in Usync then a Rebuild (not a build) fixes it. How can I prevent this in teh first place?
r
If you've got ModelsBuilder turned on, I wonder if a) those models are included in the package or b) there's a clash with the Umbraco namespace. Maybe you need to change the namespace to be something like
UmBootstrap.Models
d
I was getting an issue with pages not building on first build since we moved to Models Builder and strongly typed. In our original template.json that creates the dotnet template we had:
Copy code
"exclude": [
            "umbraco/**"
But we now need the models - we didn't know how to exclude an entire folder but include one within it so for now we have:
Copy code
"exclude": [
            "umbraco/Logs/**",
            "umbraco/Data/**",
            "umbraco/Licenses/**"
Just released it as 0.1.4 and testing now