Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 在处理路径问题时,如何避免VisualStudio项目中的文件重复?_Jquery_Visual Studio 2010_Path - Fatal编程技术网

Jquery 在处理路径问题时,如何避免VisualStudio项目中的文件重复?

Jquery 在处理路径问题时,如何避免VisualStudio项目中的文件重复?,jquery,visual-studio-2010,path,Jquery,Visual Studio 2010,Path,我们的供应商创建的平台是基于asp.net的,我正在以web用户控件(ascx)的形式开发定制,该产品将作为主机 我的dev pc上有此web产品的web部分,它看起来类似于以下通用表示: C:\Inetpub\wwwroot\VendorApp\WebParts\ServiceModule [ascx files here] C:\Inetpub\wwwroot\VendorApp\WebParts\ServiceModule\Scripts [js files here] C:\Inetp

我们的供应商创建的平台是基于asp.net的,我正在以web用户控件(ascx)的形式开发定制,该产品将作为主机

我的dev pc上有此web产品的web部分,它看起来类似于以下通用表示:

C:\Inetpub\wwwroot\VendorApp\WebParts\ServiceModule  [ascx files here]
C:\Inetpub\wwwroot\VendorApp\WebParts\ServiceModule\Scripts [js files here]
C:\Inetpub\wwwroot\VendorApp\WebParts\ServiceModule\StyleSheets[css files here]
我决定这样创建我的VS 2010项目:

C:\Inetpub\wwwroot\VendorApp\WebParts\CustomControls.sln
C:\Inetpub\wwwroot\VendorApp\WebParts\ServiceModule\CustomControls.csproj
C:\Inetpub\wwwroot\VendorApp\WebParts\ServiceModule\ [custom ascx and code behind]
我将其创建为一个web应用程序,这样VS就可以很好地使用ascx designer/intellisense,尽管我删除了web.config等,因为我实际上是在IIS中通过供应商的站点进行测试和调试的

这工作得相当好,但我必须参考与此路径相关的js和css:

<script type="text/javascript" src="WebParts/ServiceModule/Scripts/jquery-1.6.2.min.js"></script>
有没有更好的办法来解决这个问题?这并不是什么大问题,因为实际上只有一个脚本/css副本将部署到生产环境中,但从project/TFS的角度来看,这仍然是不整洁的


我已经查看了jquery vsdoc文件,但我认为我不需要它们,因为只要VS认为路径正确,intellisense就可以完美地工作。我也考虑过sym链接,但至少在今年晚些时候之前我一直使用XP。

我没有找到避免重复的方法,但我意识到我可以通过在robocopy的另一个位置添加一个构建后事件来让它更容易接受

C:\Inetpub\wwwroot\VendorApp\WebParts\ServiceModule\WebParts\ServiceModule\Scripts\ [copy of any js I use]
C:\Inetpub\wwwroot\VendorApp\WebParts\ServiceModule\WebParts\ServiceModule\StyleSheets\ [copy of any css I use]