本文介绍了对于Asp.Net Core MVC应用程序,应在源代码管理中存储什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用新的Asp.net Core MVC项目,例如:

With the new Asp.net Core MVC projects such as:

那里有很多不熟悉的文件夹,例如bower_componentswwwrootDependencies等.

There are a lot of unfamiliar folders there, like bower_components, wwwroot, Dependencies, etc..

应在源代码管理中存储什么?

推荐答案

我去过

(绿色为是,红色为否)

(With green being yes, red being no)

唯一未列出的例外是.xproj(对于TFS,是.xproj.vspscc).

The only unlisted exception was the .xproj (and for TFS the .xproj.vspscc).

我从本地工作区中删除了该文件夹(备份到其他位置之后),并从源代码管理中还原了,一旦所有软件包都恢复了它们,一切似乎都应按其应有的方式运行.

I deleted the folder from my local workspace (after backing up to somewhere else) and restored from source control and everything seems to behave as it should, once all the packages restored themselves.

这假定gulpfile.js已配置为将所需的cssjsfont组件移动到wwwroot中.

This assumes that the gulpfile.js is configured to move the needed css, js, font components into wwwroot.

自从我写完这篇文章以来,在properties文件夹中有一个受源代码控制的launchSettings.json(不确定为什么只生成了它).

Also since I wrote this, there is a launchSettings.json within the properties folder that I've source controlled (Not sure why it's only just generated).

我的.tfsignore文件当前为:

project\wwwroot
!project\wwwroot\web.config
project\node_modules
project\bower_components

(到目前为止似乎还可以,但是如果添加了其他静态资源(例如JS,CSS和Images),则可能会发生变化.)

(which seems to be OK so far, but would potentially change if other static resources such as JS, CSS and Images were added in.)

这篇关于对于Asp.Net Core MVC应用程序,应在源代码管理中存储什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 23:12