为什么我的Web部署项目在编译时会在发布和调试文件夹中创建一个Visual Studio项目文件和一堆其他不需要/不需要的文件?
即使我在发布模式下未选中"生成调试信息"选项,也会包含调试文件.
我还得到一些obj包含另一组调试和发布文件夹的文件夹,这些文件夹似乎不合适.
简而言之,它创建了许多非发布文件.我正在使用ASP.NET MVC项目,但我不认为这应该有所作为.
我正在使用Web部署项目在我正在部署的网站上执行一些后期构建任务.
我想使用FileUpdate任务来更新我的web.config并将编译模式从更改debug="true"为debug="false".
所以,从此
<compilation defaultLanguage="c#"
debug="true" />
Run Code Online (Sandbox Code Playgroud)
对此
<compilation defaultLanguage="c#"
debug="false" />
Run Code Online (Sandbox Code Playgroud)
我的FileUpdateTask看起来像这样
<FileUpdate Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU'"
Files="$(Configuration)\Web.Config"
Regex="debug=\"true\""
ReplacementText="debug=\"false\"" />
Run Code Online (Sandbox Code Playgroud)
但这完全无效,因为你无法逃避XML中的引用.
我怎么能匹配正则表达式中的调试属性并具有有效的ReplacementText值?
干杯
asp.net msbuild web-deployment-project web-config fileupdate
在Eclipse中,我创建动态Web项目时的文件夹结构是
[srikanth@hana Sample]$ ls -R
.:
build src WebContent
./build:
classes
./build/classes:
./src:
./WebContent:
index.html META-INF scripts WEB-INF
./WebContent/META-INF:
MANIFEST.MF
./WebContent/scripts:
jquery-1.7.1.js
./WebContent/WEB-INF:
lib web.xml
./WebContent/WEB-INF/lib:
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,有一个WebContent目录,当我从Eclipse工作区复制目录结构并放入Tomcat的webapps目录时,它无效.但是,如果我将WebContent目录下的所有目录和文件移动到上面的级别,它就可以正常工作.
这是应用程序下Tomcat的webapps目录中的文件夹结构:
[srikanth@hana Sample]$ ls -R
.:
build index.html META-INF scripts src WEB-INF
./build:
classes
./build/classes:
./META-INF:
MANIFEST.MF
./scripts:
jquery-1.7.1.js
./src:
./WEB-INF:
lib web.xml
./WEB-INF/lib:
Run Code Online (Sandbox Code Playgroud)
所以,现在我可以去,http://localhost:8080/Sample并可以正确地去index.html
我究竟做错了什么?为什么不直接将应用程序从Eclipse复制到tomcat webapps目录呢?为什么我要更改目录结构?
我正在尝试上传一个包含多个解决方案的asp.net网站项目,例如一个解决方案用于数据访问层,其他解决方案是业务逻辑层,UI,commonUtilities ..
在本地它工作正常,但是当我在远程服务器上传文件时,如果我只在存储了aspx文件的地方单独上传用户界面,它就没有任何期待.当我右键单击主解决方案时,它也不显示发布选项.
我正在创建一个网站,我选择在AJ中进行.我有两个文件夹:
Gateways =>一些php文件,它们从mysql数据库中检索数据并将数据作为json回显.
Views =>部分html文件,基本上是每个页面的模板.例如用户,物品等
然后我有一个index.js文件,它处理请求进程和路由:
angular.module('Index',['addon'],function($routeProvider,$locationProvider){
$locationProvider.html5Mode(true).hashPrefix("!");
$routeProvider.otherwise({
templateUrl: '/views/index.html',
controller: "index"
}).when("/items/",{
templateUrl: '/views/items.html',
controller: "items"
})
}).
controller("index",function($scope,$http){
$scope.users = [];
$http.get("gateways/list.php").
success(function(d){
console.log(d);
if(angular.isArray(d)){
$scope.users = d;
}
});
}).
controller("items",function($scope,$http,$routeParams){
$scope.items = [];
$http.get("gateways/single.php").
success(function(d){
if(angular.isArray(d)){
$scope.items = d;
}
});
}).
Run Code Online (Sandbox Code Playgroud)
除了优雅之外,AJ中所有这些路线提供商的重点是什么?他们不是因为请求的数量而放慢了网站的速度?我可以直接在模板文件中从网关文件中编写php代码吗?我是以错误的方式做的吗?
这是一个真正考虑我的耐心.我有一个简单的Spring 3.1 + Jersey应用程序,我正在尝试使用ojdbc6.jar作为我的数据源.不幸的是,无论我尝试什么,它都永远找不到"oracle.jdbc.driver.OracleDriver"类.
我打开了类加载器跟踪,我可以看到正在加载的ojdbc6.jar:
[Loaded oracle.jdbc.driver.OracleDriver from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded oracle.jdbc.OracleDriver from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded java.sql.SQLException from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded java.sql.Wrapper from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded java.sql.Connection from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded javax.management.InstanceAlreadyExistsException from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded oracle.jdbc.driver.OracleDriverExtension from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded java.sql.DriverInfo from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded oracle.jdbc.driver.OracleDriver$1 from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded oracle.jdbc.driver.ClassRef from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded oracle.jdbc.driver.ClassRef$XMLTypeClassRef from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded oracle.jdbc.driver.DiagnosabilityMXBean from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded oracle.jdbc.driver.OracleDiagnosabilityMBean from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded javax.management.StandardMBean$MBeanInfoSafeAction from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded oracle.jdbc.driver.DatabaseError from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded oracle.jdbc.driver.OracleSQLException from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded java.lang.StringIndexOutOfBoundsException from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar]
[Loaded oracle.jdbc.driver.SQLStateMapping from file:/opt/tomcat7/lib/ojdbc6.jar]
[Loaded java.sql.SQLNonTransientException from …Run Code Online (Sandbox Code Playgroud) asp.net ×2
asp.net-mvc ×2
tomcat ×2
angularjs ×1
deployment ×1
eclipse ×1
fileupdate ×1
jdbc ×1
msbuild ×1
msdeploy ×1
oracle11g ×1
spring ×1
web-config ×1