Visual Studio 2012でASP.NET(webforms)Webサイトを公開すると、常にすべてのファイルがアップロードされます。画像も?Visual Studio 2012部分公開
変更されたファイルのみを公開する方法はありますか?
Visual Studio 2012でASP.NET(webforms)Webサイトを公開すると、常にすべてのファイルがアップロードされます。画像も?Visual Studio 2012部分公開
変更されたファイルのみを公開する方法はありますか?
いいえ、Visual Studioのパブリッシュウィザードはこれを提供しません。
ローカルに公開し、変更されたファイルのみを手動で更新することをお勧めします。
私はdownvoteしたい:ここ
は(私は実際にそれをクリーンアップ)から供給された私の一気のスクリプトは、ですこれはひどい。そのような機能を削除するのはなぜですか?!?!?! –
@ScottBeeson VS 2012 Update 2でこの機能を追加しました - http://www.west-wind.com/weblog/posts/2013/May/10/Publish-Individual-Files-to-your-Server-in-Visual -Studio-20122 –
これは唯一の良い方法でも、VS 2012 Update#2を使用すると便利ではないと感じています。マイクロソフトでは、このために強力なFTP GUIアプリケーションを追加する必要があります。 – qakmak
VS2012の公開プロファイルにあった「変更されたファイルのみを公開する」チェックボックスは、VS2012の公開プロファイルから削除されました。一歩前進、二歩後退。
さらに、記録のために、VS2012 Web Deployオプション(FTPオプションとは対照的に)が実際に行った変更だけを展開することが判明しました。ファンシーな "変更を表示する" GUIもあり、http(またはftp)の代わりにhttpsを使って公開しています。あなたのホスティング会社はこれをサポートしなければならず、幸いにも私は(DiscountASP.netに感謝します)。 Web配置を使用できないクライアントサイトを除いて、すべてが有効です。 Zoidbergi、多分Web Deployはあなたのケースで動作します。 – gdoten
私は今Azureに移動しました。Azureでは変更されたファイルのみがアップロードされているようです。多分MSはIIS8でデプロイメントシステムを更新しましたか? – daniel
利用ノード - > NPM->ゴクゴクそれらを追跡するために見て:マイクロソフトは、VS 2012アップデート#2でその機能を追加しました。これにより、ファイルが変更されたときにのみアップロードされ、チェンジセットはまったく追跡する必要はありません。とにかく、最近は、すべてが麻薬を使用しているはずです。
すべてのアセットを個別に管理したり、公開されたパッケージ全体を強制的にアップロードしたりすることはちょっと面倒です。 私は1つは、ビジュアルスタジオ、さらに最新の2015年版は、より良いものを持っていないと信じることはできません。本当に悲しい。
`
var gulp = require('gulp'),
gutil = require('gulp-util'),
vftp = require('vinyl-ftp');
var fconfig {
host: "127.0.0.1",
port: "21",
user: "root",
password: "top-secret-tacos",
simultaneous_connections: 5,
file_lock_delay: 450, // ms to wait for lock release. "meh".
local_path: ".",
remote_path: "/my_path/as_seen/in_ftp/",
globs: {
"/assets/src/**/*.*css",
"/assets/src/**/*.js",
"/assets/dist/**/*",
"/**/*.ascx", // track .net changes and upload instantly when saved.
// don't track visual studio stuff.
"!./obj/**/*",
"!./bin/**/*",
"!./packages/",
"!./App_LocalResources/**/*",
"!./vs/**/*",
"!./properties/**/*",
"!./node_modules/**/*"
}
};
// Add debounce to gulp watch for FTP
(function ftp_debounce_fix(){
var watch = gulp.watch;
// Overwrite the local gulp.watch function
gulp.watch = function(glob, opt, fn){
var _this = this, _fn, timeout;
// This is taken from the gulpjs file, but needed to
// qualify the "fn" variable
if (typeof opt === 'function' || Array.isArray(opt)) {
fn = opt;
opt = null;
}
// Make a copy of the callback function for reference
_fn = fn;
// Create a new delayed callback function
fn = function(){
if(timeout){
clearTimeout(timeout);
}
console.log("Delayed Task setup[450].");
timeout = setTimeout(Array.isArray(_fn) ? function(){
_this.start.call(_this, _fn);
} : _fn, fconfig.file_lock_delay);
};
return watch.call(this, glob, opt, fn);
};
})();
function getFtpConnection() {
return vftp.create({
host: fconfig.host,
port: fconfig.port,
user: fconfig.user,
password: fconfig.pass,
parallel: fconfig.simultaneous_connections,
log: gutil.log
});
}
gulp.task('deploy', function() {
var conn = getFtpConnection();
return gulp.src(fconfig.globs, { base: fconfig.local_path, buffer: false })
.pipe(conn.newer(fconfig.remote_root)) // only upload newer files
.pipe(conn.dest(fconfig.remote_root))
;
});
gulp.task('deploy-watch', function() {
var conn = getFtpConnection();
gulp.watch(fconfig.globs)
.on('change', function(event) {
console.log('Changes detected! Uploading file "' + event.path + '", ' + event.type);
return gulp.src([event.path], { base: fconfig.local_path, buffer: false })
.pipe(conn.newer(fconfig.remote_root)) // only upload newer files
.pipe(conn.dest(fconfig.remote_root))
;
});
});`
gulp 4.0はまだalphaなので、私はgulp-watchに切り替えました。それはずっと速く、イベントをより良く処理します(追加とリンク解除もサポートしています)。 gulp-watchのインプリメントのために、あなたがそれを使うつもりなら上記を修正することをお勧めします。 – Barry
それは2013年にも適用されます! –