使用visual studio和Umbraco NuGet package,我想设置一个基本的Umbraco安装包含:
这应该由git repo包装。
如果可能,我想通过将受影响的路径/文件扩展名添加到.gitignore
文件来排除生成/编译的文件。
我开始使用官方umbraco .gitignore,其中包含以下条目:
# Note: VisualStudio gitignore rules may also be relevant
# Umbraco
# Ignore unimportant folders generated by Umbraco
**/App_Data/Logs/
**/App_Data/[Pp]review/
**/App_Data/TEMP/
**/App_Data/NuGetBackup/
# Ignore Umbraco content cache file
**/App_Data/umbraco.config
# Don't ignore Umbraco packages (VisualStudio.gitignore mistakes this for a NuGet packages folder)
# Make sure to include details from VisualStudio.gitignore BEFORE this
!**/App_Data/[Pp]ackages/
!**/[Uu]mbraco/[Dd]eveloper/[Pp]ackages
# ImageProcessor DiskCache
**/App_Data/cache/
但是,这不包括数据库或已安装的软件包,因此我还添加了以下条目*:
!**/Aa]pp_[Dd]ata/packages
!**/Aa]pp_[Dd]ata/Umbraco.sdf
!**/[Bb]in/*.pdb
!**/[Uu]mbraco/[Cc]onfig
使用此配置,ReSharper将列出全局web.config文件中出现的3个错误:
my-umbraco-project\Web.config:87 Cannot resolve symbol 'Providers'
my-umbraco-project\Web.config:87 Cannot resolve symbol 'DefaultSessionStateProvider'
my-umbraco-project\Web.config:87 Invalid module qualification: Failed to resolve assembly System.Web.Providers
但是,我可以编译,登录到我的umbraco实例,甚至会出现预安装的插件。
这基本上留下了两个问题:
答案 0 :(得分:3)
所以我们使用的.gitignore没有任何问题:
[Oo]bj/
[Bb]in/
.nuget/
.vs/
_ReSharper.*
packages/
artifacts/
*.user
*.suo
*.userprefs
*.dbmdl
*DS_Store
*.sln.ide
# Umbraco
# Ignore unimportant folders generated by Umbraco
**/App_Data/Logs/
**/App_Data/[Pp]review/
**/App_Data/TEMP/
**/App_Data/NuGetBackup/
# Ignore Umbraco content cache file
**/App_Data/umbraco.config
# Don't ignore Umbraco packages (VisualStudio.gitignore mistakes this for a NuGet packages folder)
# Make sure to include details from VisualStudio.gitignore BEFORE this
!**/App_Data/[Pp]ackages/
!**/[Uu]mbraco/[Dd]eveloper/[Pp]ackages
!*UmbracoModelsBuilder.user
# ImageProcessor DiskCache
**/App_Data/cache/