Sends for the fellow dear visitors:welcome to dongpad!


 Welcome to DongPad!

 msn


预览模式: 普通 | 列表

WCF中的Binding模型简介

This Article is Published by Live Writer。

image

image

image

参见:http://dotnet.cnblogs.com/page/43947/

Tags: DongPad

分类:C# | 固定链接 |评论: 0| 引用: 0 | 查看次数: 129 | 返回顶部
起因:

有时可能会发生这样的情况,网站做好了,要在服务器上布署。布署中发现,有些地方代码需要小改,然而,在服务器或其他地方没有安装VS系列工具,但服务器上已安装有.net框架,此时仍然需要对已有项目的某些文件进行少量修改,并再次进行编译。此时,在服务器上安装VS系列开发工具并不可能,也不经济。那么下面的方法就可以派上用场了。

(1)将下面一行保存到你项目所在的目录下一个名为:buid.bat文件中:

%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe YourSolutionName.sln /t:Rebuild /p:Configuration=Release /l:FileLogger,Microsoft.Build.Engine;logfile=Build.log

关于buid.bat:前面名字可以随便取,后面一定是.bat,带bat后缀的是批处理文件。

(2)运行此buid.bat文件。

此时发现所在目录下多了PrecompiledWeb\工程名称\bin目录,下面有你需要的.dll。

(3)再COPY到你的相关网站目录下即可。

关于更多的MSBuild.exe命令及参数解释,这里就不多说,查一下MSDN或百度一下即可。

 

补充:有时候从网站上down的demo只有源码,但是又不想通过IDE打开,直接通过msbuild生成也是可以的。

语法: MSBuild.exe [options] [project file]
说明: 在项目文件中生成指定的目标。如果未指定项目文件,则 MSBuild 在当前工作目录中搜索扩展名以“proj”结尾的文件,并使用该文件。
开关:  

/help 

显示此用法信息。(缩写为: /? 或 /h)

/nologo  

不显示启动版权标志和版权信息。

/version  

仅显示版本信息。(缩写为: /ver)

@  

在文本文件中插入命令行设置。若要指定多个响应文件,请分别指定每个响应文件。

/noautoresponse  

不要自动包括 MSBuild.rsp 文件。(缩写为:/noautorsp)

/target:

在此项目中生成这些目标。请使用分号或逗号分隔多个目标,或者分别指定每个目标。(缩写为: /t) 
示例:/target:Resources;Compile

/property:=

设置或重写这些项目级属性。 为属性名, 为属性值。请使用分号或逗号分隔多个属性,或者分别指定每个属性。(缩写为: /p)
示例:/property:WarningLevel=2;OutDir=bin\Debug\

/logger: 

使用此记录器记录 MSBuild 中的事件。若要指定多个记录器,请分别指定每个记录器。
语法为:[,][;]
语法为:[.]
语法为:{[,] | }
是可选的,并按键入的形式原样传递给记录器。(缩写为: /l)
示例:/logger:XMLLogger,MyLogger,Version=1.0.2,Culture=neutral
     /logger:XMLLogger,C:\Loggers\MyLogger.dll;OutputAsHTML

/verbosity:

在事件日志中显示此级别的信息量。可用的详细级别有: q[uiet]、m[inimal]、n[ormal]、d[etailed] 和 diag[nostic]。(缩写为: /v)
示例:/verbosity:quiet

/console

logger

parameters:

控制台记录器的参数。(缩写为: /clp)

可用的参数有:
     PerformanceSummary - 显示任务、目标和项目中花费的时间。
     NoSummary - 不在末尾显示错误和警告摘要。
     NoItemAndPropertyList - 不在每个项目生成的开始显示项和属性的列表。
  示例:/consoleloggerparameters:PerformanceSummary;NoSummary

/noconsolelogger 

禁用默认的控制台记录器并且不将事件记录到控制台。(缩写为: /noconlog)

/validate 

  根据默认架构验证项目。(缩写为: /val)

/validate:

  根据指定架构验证项目。(缩写为: /val)
  示例:/validate:MyExtendedBuildSchema.xsd

示例: MSBuild MyApp.sln /t:Rebuild /p:Configuration=Release
        MSBuild MyApp.csproj /t:Clean /p:Configuration=Debug


Tags: DongPad

分类:C# | 固定链接 |评论: 0| 引用: 0 | 查看次数: 102 | 返回顶部

IIS无法启动之发生意外错误0x8ffe2740

This Article is Published by Live Writer。

解决方法
要解决这个问题,您可以进行以下任一项操作:
• 在IIS管理器中更改网站绑定端口为除80端口外的其它端口. 
• 停止正在使用80端口的应用程序,然后从IIS管理器中启动网站.

Tags: DongPad

分类:C# | 固定链接 |评论: 0| 引用: 0 | 查看次数: 107 | 返回顶部

SketchPath - The XPath Tool

This Article is Published by Live Writer。

I added another tool to my Toolbox yesterday: SketchPath.

The SketchPath site labels it as "The XPath Tool" but I'd say it more like "The XPath Tool."

I've seen a few other tools for quickly building and testing XPath expressions against an XML document, but they pale in comparison to SketchPath. There are a number of online tools that unquestionably require less effort to get started with, but you'll likely find them very limiting as well.

I know I'm not the only one who thinks SketchPath rocks. Scott Hanselman included it in his 2009 Ultimate Developer and Power Users Tool List for Windows.

If you do any significant amount of work with XML, I recommend you download SketchPath today.

 

Published Wednesday, November 18, 2009 4:40 AM by Jeremy Jameson

Filed under: Core Development

Tags: DongPad

分类:C# | 固定链接 |评论: 0| 引用: 0 | 查看次数: 158 | 返回顶部

What’s new in VS2010?

This Article is Published by Live Writer。

To see the highlights and what’s new in vs2010 please visit the follwing links: Visual Studio 2010 Product Highlights and What's New in Visual Studio 2010, especially What's New in Visual C# 2010 and What's New in the .NET Framework 4 !

Tags: DongPad

分类:C# | 固定链接 |评论: 0| 引用: 0 | 查看次数: 204 | 返回顶部

解决“远程下层文档”病毒攻击打印机问题

This Article is Published by Live Writer。

今天客户打印时遇到了一个"远程下层文档"而导致无法打印的问题,Google了一下,在此引用Peadog的文章,如下:

前言:进来集团很多共享打印机出现打印文件名为“远程下层文档”的异常打印任务,导致打印机队列堵塞,无法清除打印任务,甚至无法删除打印机。

解决思路:

1.停止/启动打印池服务

在服务控制面板中,停止/启动print spooler服务;

2.删除打印池文件

删除C:\WINDOWS\system32\spool\PRINTERS中所有队列文件;

3.对共享打印机设置相关访问权限,拒绝无关病毒主机对其进行访问。


补充:感性不知名的“51cto游客”

有一点需要说明:在\spool\Pinters\ 项下的异常打印文件可能无法删除,系统提示有其他用户或进程在使用这些文件。此时打开Task manager,在进程中找到spoolsv.exe并删除之。之后可以顺利删除异常打印文件。

Tags: DongPad

分类:Life | 固定链接 |评论: 0| 引用: 0 | 查看次数: 297 | 返回顶部

VS2010 Beta1升级到Beta2?

This Article is Published by Live Writer。

先卸载Beta1吧,是不是很痛苦,更痛苦的是还需要ISO安装文件,Orz。

参见“VS2010 Beta 2 Installed on a Previous Beta 1 System

I had VS2010 Beta 1 installed. WhenBeta 2 came out today, I found I needed to uninstall Beta 1.Here are some things you have to watch out for:

  1. You have to, of course, uninstall any extras installed after the Beta 1 install. This includes MVC, which is now in the boix.
  2. The main uninstall of Beta 1 will ask you for a Beta 1 ISO, which is a real pain. The way to get around this is to do a manual install of the VS2010 TFS Object Model first and then it will be fine
  3. The main uninstall of VS2010 Beta 1 will NOT uninstall all associated stuff
  4. You must uninstall the VS2010 Beta 1 SDK by itself
  5. Myself, and at least two other Tweeters got a complete Beta 2 install but it failed Silverlight 3 install, *even* though the SDK and the developer runtime *were* installed. It seems to notice it but instead of skipping over it, fails that install. I manually uninstalled the two, re-booted, and then did a re-install of Beta 2 but it did not pick up that it now needed the Silverlight 3 install. I went do dir\WCU\silverlight and manually installed the two files after the fact and it was fine. Someone else was able to just do a Repair after, re-boot and be fine.

All in all, pretty smooth given how large Beta 1 and 2 are and how many complicated pieces there are. I never seem to do fresh installs :)

BTW, lots of things have changed in Windows Workflow from Beta 1 to 2. I could not even open the project files. The project types have changed andMatt Winkler has promised me a post on that.

Tags: DongPad

分类:C# | 固定链接 |评论: 1| 引用: 0 | 查看次数: 350 | 返回顶部