Sends for the fellow dear visitors:welcome to dongpad!


 Welcome to DongPad!

 msn


| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 预览模式: 普通 | 列表

推荐两个免费Visual Studio插件

This Article is Published by Live Writer。

文章原出处http://www.colobu.com,更多插件参见这里

5. Copy As HTML

http://www.lavernockenterprises.co.uk/downloads/copyashtml/copyashtml.aspx

Copy As HTML是一个轻量级的VS插件。你可以利用它在VS中以HTML格式复制你的代码。在复制时它可以保留语法加亮,缩进和背景色,行数等等,方便你复制你的代码到你的博客、文档中。

8. PowerCommands for Visual Studio 2008

http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=PowerCommands&ReleaseId=559

为VS提供了一堆的命令扩展。

Tags: DongPad

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

A Look Back…

This Article is Published by Live Writer。

Tags: DongPad

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

Code Contracts from MSDN

Lots of fixes! Our new release, 1.2.21023.14, has been upgraded to work with Visual Studio 2010 Beta 2. (Of course, it also works with Visual Studio 2008, but this is a great time to download the new beta and get started with it.) There are lots of other improvements: be sure to check out the release notes. And keep using the forum to tell us what you think: many of the fixes were in response to your comments.

Code Contracts provide a language-agnostic way to express coding assumptions in .NET programs. The contracts take the form of pre-conditions, post-conditions, and object invariants. Contracts act as checked documentation of your external and internal APIs. The contracts are used to improve testing via runtime checking, enable static contract verification, and documentation generation. Code Contracts bring the advantages of design-by-contract programming to all .NET programming languages. We currently provide three tools:

  • Runtime Checking. Our binary rewriter modifies a program by injecting the contracts, which are checked as part of program execution. Rewritten programs improve testability: each contract acts as an oracle, giving a test run a pass/fail indication. Automatic testing tools, such as Pex, take advantage of contracts to generate more meaningful unit tests by filtering out meaningless test arguments that don't satisfy the pre-conditions.
  • Static Checking. Our static checker can decide if there are any contract violations without even running the program! It checks for implicit contracts, such as null dereferences and array bounds, as well as the explicit contracts. (VSTS Edition only.)
  • Documentation Generation. Our documentation generator augments existing XML doc files with contract information. There are also new style sheets that can be used with Sandcastle so that the generated documentation pages have contract sections.

Code Contracts comes in two editions:

  • Code Contracts Standard Edition: This version installs if you have any edition of Visual Studio other than the Express Edition. It includes the stand-alone contract library, the binary rewriter (for runtime checking), the reference assembly generator, and a set of reference assemblies for the .NET Framework.
  • Code Contracts VSTS Edition: This version installs only if you have Visual Studio Team System. It includes the static checker in addition to all of the features in the Code Contracts Standard Edition.


Download Code Contracts Standard Editionor VSTS Edition.


Read the Code Contracts documentation.



forgot to leave the oraginal address:http://msdn.microsoft.com/en-us/devlabs/dd491992.aspx

Tags: DongPad

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

WCF之消息队列问题

This Article is Published by Live Writer。

1.Q:此计算机上尚未安装消息队列

A:控制面板 --> 添加或删除程序 --> 添加/删除Windows组件 --> 勾选消息队列 --> 点击详细信息,将包括MSMQ HTTP支持在内的子组件都勾选上 -->确定完成。

上述方法主要是针对XP操作系统,更多安装步骤参见:官方的安装“消息队列 (MSMQ)”

2.Q:消息队列服务不可用

A:运行输入services.msc打开服务,找到Message Queuing服务,该服务主要用来为分布式异步消息应用程序提供通信基础结构,启动该服务即可解决消息队列服务不可用的问题。

Tags: DongPad

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

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 | 返回顶部

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 | 返回顶部
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |